Question about how bzr-svn handles revisions and logs

John Arbash Meinel john at arbash-meinel.com
Thu May 1 18:40:47 BST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark Dillavou wrote:
| We are long time subversion users and have recently found the need to
| work in a more distributed way with one of our projects.  I have been
| reviewing systems and so far have been really happy with bzr-svn,
| however, I have a question about how it handles sub revisions and logs.
| I am using the distributed workflow described here:
|
| http://doc.bazaar-vcs.org/latest/en/user-guide/index.html#organizing-branches
|
| where I create a local mirror of my subversion repository's trunk, then
| branch from it.  When my branch is finished, I merge back into my local
| mirror and push that back to trunk.  I'm new to distributed systems, so
| if my workflow isn't optimal, please let me know:
|
| (Example of my workflow)
|
| bzr branch svn+https://mydomain.com/svn/project/trunk mirror # create my
| mirror of subversion repo
| bzr branch mirror fix1  # create a branch to work on bugfix #1
| cd fix1
|  (make changes)
|  bzr commit
|   ...
| cd ../mirror
|  bzr pull # update the mirror
| cd ../fix1
|  bzr merge # merged changes from trunk into my fix branch
|  bzr commit -m "merged changes from trunk"
|  (make more changes)
|  bzr commit
|  ...
|
| Once my fix1 branch is done:
|
| cd ../mirror
| bzr merge ../fix1
| bzr commit -m "merged in bugfix #1"
| bzr push svn+https://mydomain.com/svn/project/trunk
|
| This all works fine, and I like that I get all my changes from my fix1
| branch as a single subversion commit since this allows me to easily go
| back and remove a whole fix, even if it was several sub commits in the
| fix1 branch.  The problem I am running into is that the only log others
| see is "merged in bugfix #1".  I guess I expected to see each commit log
| from the fix1 branch tacked onto the final commit.  But, in my mirror
| where I did the merge of fix1, if I run a bzr log, I see all the logs
| and sub revisions:
|
| revno: 201
|  ...
|  message:
|    merged in buxfix #1
|    -------------
|    revno: 200.1.2
|    ...
|    message:
|      commit #2 in fix1 branch
|    -------------
|    revno: 200.1.1
|    ...
|    message:
|      commit #1 in fix1 branch
|
| But, If I make a fresh branch from my subversion repository on another
| machine:
|
| bzr branch svn+https://mydomain.com/svn/project/trunk mirror
|
| and run a bzr log in this directory, all I see is:
|
| revno: 201
|  ...
|  message:
|    merged in buxfix #1
|
| Does this mean that all the individual commits and logs I did in the
| fix1 branch (200.1.1 and 200.1.2) are lost, and they are only seen as
| one final commit?  Is there anyway to get back this information as it is
| really helpful when going back and reviewing commits.

Subversion doesn't know about the merged revisions. bzr-svn stores a simple
property that references them, so that the bzr client can show them if it has
access to them.
|
| Thank you in advance,
| /Mark

The only way I know of to get SVN to see the full commit logs is to include the
whole set in the final message.

I believe we have a default-message hook, which plugins can use to change what
the default commit message is. This is one of those places where it would be
appropriate. You could set it up to see that it was a merge, and then include
the text of all merged revisions as the default text shown in your editor when
you do a plain 'bzr commit'.

John
=:_>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgaAJ4ACgkQJdeBCYSNAANW1ACgtXI5GdXhOOxWIrXA9Y9naOEg
FcUAn2EVEwvR2VDnXNLjm+W3un9iHH8J
=Segk
-----END PGP SIGNATURE-----



More information about the bazaar mailing list