Figuring out a workflow (bzr-svn, local changes I never want to push upstream)

Russel Winder russel.winder at concertant.com
Sat Aug 16 06:47:09 BST 2008


Tom,

First and foremost, I don't think you are doing anything insane.  I have
also found this problem.

On Fri, 2008-08-15 at 16:16 -0500, Tom Tobin wrote:
[ . . . ]
> cd shared_repo/trunk (this is the bzr-svn branch)
> bzr pull
> cd ../local (this is a branch off of trunk with an extra commit for
> the aforementioned local changes)
> bzr rebase
> cd ../feature_branch (this is a branch off of local)
> bzr rebase
> [hack hack hack]
> bzr ci -m "hack hack hack"
> cd ../trunk
> bzr merge -r -2..-1 ../feature_branch
> bzr dpush
> cd ../local
> bzr rebase
> cd ../feature_branch
> bzr rebase (now I get spurious history, with both the upstream svn
> commit and the bzr commit for "hack hack hack", as well as the
> local-change commit showing up twice)

The problem here is that the dpush causes a renaming of the "changeset"
so different branches now have different names for the same "changeset"
-- I know Bazaar doesn't have a notion of changeset but how else to
label the set of changes between one revision and another?  Thus merging
two branches with the same changeset leads to it appearing twice.  So
effectively you cannot branch sanely from a branch that is being used as
a dpush mirror of a Subversion repository.

I claim (but this is from memory of experiments not from recent data)
that Git doesn't have this problem.  I believe I can have a git-svn
clone of a Subversion repository and then clone that and "svn rebase/svn
push" from the Subversion clone and pull/push from the secondary clone
-- very much in the way you are working above -- and it all works.
Jelmer tells me that the Git rebasing renames the changesets just as
Bazaar dpush does.  It seems though that Git's use of repository as the
cloned thing rather than a branch as the branched thing means that you
don't get the duplication that you do with Bazaar when you merge.

Of course the experiments need to be done, to ensure I am not just
mis-remembering things.

> I *have* to be doing something utterly wrong/insane; can anyone point
> it out to me?  :-)

Hopefully, the above is true, accurate and even correct :-)

I consider the problem you highlight above to be more or less a blocker
to use of Bazaar as a Subversion client where the Subversion repository
is the master copy.  Where there is only ever one branch used there is
no problem -- I know I am doing this every day.  However this is such a
sever restriction of workflow, especially in the general Bazaar context,
that it should be treated as a blocker.

NB  If you store the Bazaar branch in the Subversion repository, i.e.
don't use dpush, use push, then none of the problems happen, arbitrary
branching is possible.  The downside of this is that if the Subversion
repository uses svnlook or certain other commit mail hooks, then you get
increasing and arbitrarily large commit emails -- but this has been the
topic of previous exchanges on this list.

PS  It is worth remembering that  storing a Bazaar branch in a
Subversion repository is the primary purpose of bzr-svn, dpush was only
added as an extra because I moaned long enough and loud enough.  Clearly
more work needs doing to allow dpush to be part of the workflow you
highlight above, which I think will be an important transitioning
workflow.  I think though, it means people need to volunteer to do more
than just raise the point -- something I have not been able to do to
date.  Based on the sort of workflow above, the issues of how to not
create duplicate "changesets" needs to be worked out so that necessary
changes to bzr-svn can be planned.
 

-- 
Russel.
====================================================
Dr Russel Winder                 Partner

Concertant LLP                   t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road,              f: +44 8700 516 084
London SW11 1EN, UK.             m: +44 7770 465 077
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080816/9ecfd89d/attachment.pgp 


More information about the bazaar mailing list