bzr svn-import with a deep branch layout

Algis Kabaila akabaila at pcug.org.au
Wed Oct 28 02:03:22 GMT 2009


On Wednesday 28 October 2009 12:46:24 Russ Brown wrote:
> On Tuesday 27 October 2009 04:51:53 pm Algis Kabaila wrote:
> > On Wednesday 28 October 2009 02:28:05 Russ Brown wrote:
> > > On Tuesday 27 October 2009 10:05:21 am John Arbash Meinel wrote:
> > > > Russ Brown wrote:
> > > > > Are my suspicions correct, and if so is there any way to get
> > > > > svn-import to detect branches by noticing copies of trunk, rather
> > > > > than simply looking for subdirectories of branches?
>
> Thanks for the suggestions. In our case, our development bzr migration was
> done ages ago: we just decided to take the opportunity to clean the
> codebase up and start with a completely fresh set of repositories, leaving
> the old svn repository in a dormant a read-only state.
>

It was not a suggestion; just sharing an experience of transferring a *small* 
repository from svn to bzr.  Your repository is *big* - a different cattle of 
fish. 

> However, digging through history on it is a royal pain. More often than
> not, you encounter an svk merge with a monstrous commit message, where
> digging into the merged revisions is pretty much impossible.
>
> That's why I'm trying to import it into bzr: since svn-import follows svk
> merges, it will be far easier to dig through history using qbzr.
>
> The good news is that I think I have found a way to workaround this
> problem. First, you need a list of all branches ever created in the history
> of the repository [1], and then set the branches setting in the appropriate
> place in subversion.conf (I also added trunk/ to this list to following the
> docs on the setting). With this in place, the import seems to be doing a
> *lot* better, and is actually properly picking up branches and is also
> handling some of the merges properly too.
>
> I'm not even halfway through the revisions yet, but it's looking good. I'll
> update if/when it's done to report on things like repository size (the svn
> repo is 13G: it will be interesting to see what size this 2a repository
> ends up being).
>
> However, I would like to know if there is any reason why svn-import cannot
> do this itself: detecting a branch creation can be as simple as spotting a
> copy of trunk to anywhere under a specific folder. It would be nice if it
> could do it on the fly.
>
> [1] Getting a list of all branches ever created from trunk should be
> possible using something like this:
>
> svn log -v --xml file:///path/to/repos/branches | xmlstarlet sel -T -t -m
> "/log/logentry/paths/path[@copyfrom-path='/trunk' and @action='A']" -v . -n
> | sort | uniq > all_branches_ever
>
> In my case however this didn't work, as our monstrous svk merge commit
> comments exceeded a libxml limit that I was unable to disable. The xml log
> output from the svn part of the command above was 1.5G. I went through
> attempts in four other languages before finally finding that C# (via mono)
> was able to do it. I can post the (simple) code if anyone would find it
> useful.

Russ, I am trying to avoid any avoidable work.  For me all the programming 
stuff is a hobby and a replacement for my (weak) chess.  So do not post the 
code on my account.  Why not put it in your project's wiki?

Thanks for your nice reply!
OldAl.




More information about the bazaar mailing list