Jump to content

Import from SVN into PSCM 4


CodingGorilla

Recommended Posts

Hello CodingGorilla!

well, we don't have any guide but the process is quite simple you just have to fast-export your svn repository.

There are several tools to create a fast-export package from svn, for example:

http://packages.debi...all-fast-export

https://github.com/b...ump-fast-export

You can also move your repository to Git and then use the Git fast-export utility.

Check this blog post to learn how to use the basic commands: http://codicesoftwar...-to-github.html

Regards,

Manu

Link to comment
Share on other sites

If I can offer up my 2 cents; I think that's a mistake since fast-export/fast-import isn't native to SVN, VSS, etc. My team isn't thrilled with the idea of having to rely on a third-party, unsupported, tool (that we have to download the source and compile ourselves) to convert from an SVN Dump to fast-export, so that we can then import it.

I realize you have limited resources and you have to pick and choose what you can support. But, I think, for teams like mine where we have literally 50+ projects already in subversion, this makes the migration to Plastic at lot more difficult and it scares the "powers that be".

That being said, I still love Plastic and I'm pushing full-steam-ahead to make the move! =)

Link to comment
Share on other sites

Hi!

Definitely you've your point.

But, look:

- the SVN importer was hard to maintain, really hard, since people tend to do nasty things with SVN and... well, branches in SVN are just directories, so it is really, really a hard thing to map.

- There's a native path from SVN to Git, really native since the git folks put a lot of effort into it. Take a look at git svn and so on

- Fast exporting from git is easy and works

So, from SVN to plastic should be quite well supported since the jump from SVN to Git is a well-known one.

Regarding VSS, I'm considering coming up with our own VSS-fast-export to streamline the whole thing. Maybe we can reuse or old importer somehow.

The challenge there is:

- extracting the baselines

- creating changesets (commits) since there's no such a concept in VSS

pablo

Link to comment
Share on other sites

  • 5 weeks later...

What about importing to PSCM 3.x using the old import tool and then using fast-export from there to import into PSCM 4 using fast-import ... ? I've had hit-and-miss luck using fast-import to import from PSCM3 to PSCM4 but it seems like an easier migration path ....

Thanks!

Link to comment
Share on other sites

  • 2 weeks later...

The problem is that Git has no way to correlates a commit to a branch. SVN does it, Git not, Plastic does it (which is good :-)). So, importing from Git will not place your commits nicely on the correct branch. But, maybe OK if you JUST originates from SVN, then Git, then Plastic, and do not commit using Git in the meanwhile.

Link to comment
Share on other sites

  • 2 months later...

Hi everyone,

I have a question about making use of the Svn MergeInfo property when importing from Svn->Plastic via Git.

I've followed the advice for doing a quick export/import [see bottom of this post for details]

Now, it all works OK, and I do get the same branches in the Plastic repository as I had in Svn, but what I see is that the information about which branches were merged into each other isn't accurate. For instance, I might look at a specific commit in Svn, and the mergeinfo properties say that it contained merges from two other branches. However, in Plastic the corresponding changeset (most likely) says that it's a straight commit (not a merge), or in some cases says that it was a merge, but from an unrelated branch.

I understand why this is happening... it's because in Subversion all the merge-tracking is done locally, and basically there's no way to enforce whether the mergeInfo is "true", and in addition a commit can be a merge from multiple branches. E.g. someone might locally merge a change from version 2.1->trunk, something else from 2.2->trunk, something else from their_personal_branch->trunk... and then commit one change that contains all of those changes. How is PlasticSCM meant to represent that in the branch explorer? It's a very hard problem.

But... I was wondering whether anyone has come up against this problem and at least solved it partially? For instance, if a mergeinfo property mentioned multiple merges, and it was possible to clearly separate the files changed in one merge from the files changed in another, then the importer could represent that as multiple changesets, one for each merge... that sort of thing.

If anyone has any advice I'd appreciate it. Perhaps it's just an impossible problem. But if I can get some kind of history in PlasticSCM that accurately represents what happened in the Svn repository, it'll make it a lot easier to convince management to consider Plastic as a viable alternative to Svn!

For reference, this is what I did to export to git and import to Plastic:

git svn clone <Svn repo URL> --stdlayout [To make a local git repo which is a clone of our SVN repo]

git fast-export --all -C --tag-of-filtered-object=drop --signed-tags=strip > repo.fe [To export the newly-created git repo to a file]

cm fi NewRepository@localhost:8087 repo.fe [To import the repo into Plastic]

Link to comment
Share on other sites

Maybe some of the users that have migrated successfully can give you some help! :)

Can you take a look into the Git repository to find if it's ok? I guess it will look like the Plastic one and the merge info is translated, as best as possible, into a modern SCM system.

We have to keep in mind that branches and merges operations are quite different in SVN than Git or Plastic SCM.

Link to comment
Share on other sites

  • 5 weeks later...

Hi,

I tried to migrate from SVN to Plastic4 according to this guide/script http://codicesoftwar...plasticscm.html

My experiences:

  • it seems there much less revisions in plastic afterwards as well as there are files missing (Revision in SVN: 1722 vs. Changeset 268 in Plastic)
  • There are a lot of bransches in SVN which I don't see in plastic.
  • The owners of all the commits are mapped to just one user (the current plastic user who does the import)
  • If there is a directory besides trunk, branches, trunk (I know that is not a good idea, but it is as it is) this directory will not be migrated

Are there some other experiences?

It is really necessary that we can transfer all history data (branches, commits) from SVN to plastic. Are there any other possibilities to do this?

Link to comment
Share on other sites

The best option for importing non-trivial svn repositories appears to be reposurgeon. Note that its svn support is not yet completed, but most features are reported to work for svn. I have not yet had time to test it, but it is worth trying.

I can confirm that using any other tool (to import a complete svn repository) is a complete waste of time - before learning of reposurgeon I spent many hours this winter attempting to migrate our repository with nested branches. The result is that we still use svn ... I won't be able to test another export until mid-June.

http://catb.org/~esr/reposurgeon/

http://gitorious.org/reposurgeon

http://svn.haxx.se/d...0-11/0188.shtml

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...