At work I need to interact with an svn (1.4) repository, but honestly I'm so spoiled by bzr that it just drives me nuts, particularly the (frustratingly frequent) situations where I miss a particular change-set/revision when merging into my tree and wind up reverting someone's changes. The VCS should bloody-well track what revisions are missing, says I.
So, I've been using bzr-svn and bzr-rebase to bridge the gap, and so far it has been quite workable, with a few caveats. The pattern:
- bzr init-repo # create a repository which shares data for all your branches/checkouts
- bzr co http://server/path/to/repo/trunk
- bzr branch trunk working
the co takes an extremely long time (for some of my personal projects it takes hours, enough to make it worth converting the project to bzr as soon as it finishes), but it eventually finishes. Now, your colleagues are going to be committing their changes to trunk, to pull them in (I suggest doing this frequently, which is not something I suggest with svn 1.4):
- cd trunk
- bzr up
- cd ../working
- bzr rebase
which moves your commits to being made against current trunk. Be careful with bzr-rebase, read the docs and understand what you are doing, you can lose your changes if you are not careful. Keep hacking until you're ready to commit to trunk.
DO NOT PUSH or PULL!
While this would normally be fine with bzr, and seems to "work" with bzr-svn, bzr-svn appears to want to modify every revision in the whole SVN repository with its metadata so that other bzr-svn users can work with you using direct bzr to bzr operations. Honestly I've never let it try this (ctrl-c ctrl-c ctrl-c argh!), as I'm pretty sure that would (rightly) tick off all the svn users. Instead, use bzr merge to pull the changes in:
- cd trunk
- bzr up # if there are changes re-rebase
- bzr merge ../working
- bzr commit
since you've rebased onto trunk, your merge should be clean. There are going to be a lot of extra properties added to the svn commit (enough to make other users go "yech" when they look at the Trac view), but that's more than made up for by not having to manually track merged change-sets.
If I didn't get annoyed by git's command-line interface I could use that instead (one of our other devs does that), but I want to reduce the total pain felt.
Comments
2010-08-31 12:04
That template db idea is prett y neat. I have to say it's get ting pretty annoying downloadi ng database backups and [...]
2010-08-23 20:57
Yeah, in a similar boat with t he code I write... upshot, I'v e got some pretty good compat code in snakeoil, just w [...]
2010-08-22 08:40
Yeah, that's what I started do ing (the function to convert t o bytes), as I support down to 2.4. Thing is this is [...]
2010-08-22 06:28
Your blog aparently likes does n't handle the less than char (<) conversion all that wel l.. everything following [...]
2010-08-22 06:24
The annoying thing about suppo rting both py2k and py3k is th at you wind up having to get r ather explicit about you [...]
2010-08-16 00:48
The measure of a man, I have a lways thought, was - that he l oved. And was loved.
2010-08-15 21:28
Hmm, hadn't realized that was what dpush was for. I guess I 'll have to make the trunk a b ranch rather than a chec [...]
2010-08-15 20:43
For what it's worth, newer ver sions of bzr-svn will not remo ve existing revisions from you r mainline unless you ex [...]
2010-08-15 20:40
bzr-svn supports not inserting any unusual revision properti es, it just means that pushing your bzr revisions into [...]
2010-08-15 18:21
Hmm, maybe I missed something there. Do you mean merge supp ort as in being able to pull f rom N branches into your [...]
2010-08-15 17:45
Lack of merge support kills th e main benefit of bzr-svn over just using svk I'd argue. Personally, I'm *extreme [...]
2010-08-15 11:46
You might want to check out hg subversion
2010-07-25 14:02
> and would have no Trac integ ration The trac-bzr plugin[ 1] seems to provide good integ ration between bzr and t [...]
2010-07-13 21:47
I've always been fascinated wi th the Asterisk AMI interface. So much so that I married tha t fascination with the [...]
2010-07-03 21:32
Yes, only references in dicti onaries are replaced, so hold ing references in lists, tuple s, etceteras keeps them alive.