support creating bound branch commits in master branch first

Bug #562319 reported by Dennis Craven
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

There are some benefits to committing new revisions to the master repository directly rather than committing in the local repository first and then pushing the changes into the master repository. Whether this is beneficial might depend on the repository formats of the local and master branch.

For example commits created directly in Subversion contain information about the Subversion revision number with which the commit was created.

This is also a requirement for bug 587721

Revision history for this message
edam (edam) wrote :

Confirmed with bzr-svn-1.0.2 (on bzr-2.1.1).

It appears that revisions created in a bzr branch/checkout of an svn repository never have their svn revision no. displayed in 'bzr log'. This is not limited to the user, or even to the bzr branch/checkout. This can be seen in the following simple test case:

  $ svnadmin create repo
  $ svn co file:///home/edam/tmp/repo a
  $ echo content > a/file
  $ svn add a/file
  $ svn ci a -m foo
  $ bzr co repo b
  $ echo new-content > b/file
  $ bzr ci b -m bar
  $ bzr log b
  ------------------------------------------------------------
  revno: 3
  committer: edam <email address hidden>
  branch nick: repo
  timestamp: Tue 2010-05-25 12:01:52 +0100
  message:
    bar
  ------------------------------------------------------------
  revno: 2
  svn revno: 1 (on /)
  committer: edam
  timestamp: Tue 2010-05-25 10:47:05 +0000
  message:
    foo
  ------------------------------------------------------------
  revno: 1
  svn revno: 0 (on /)
  committer:
  timestamp: Tue 2010-05-25 10:46:46 +0000
  message:
    (no message)

The third revision doesn't have it's "svn reno" listed. Making another checkout/branch of the svn repo doesn't help and the same problem can be seen:

  $ bzr co repo c
  $ bzr log -l1 c
  ------------------------------------------------------------
  revno: 3
  committer: edam <email address hidden>
  branch nick: repo
  timestamp: Tue 2010-05-25 12:01:52 +0100
  message:
    bar

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

I realize this behaviour is a bit confusing but it is caused by the fact that Bazaar creates a revision locally first and then pushes it to the master branch. Creating that revision locally happens in a Bazaar repository so no revision number is associated with it at that point.

Revisions are immutable so when the revision is pushed to the remote Subversion repository the local copy of it isn't updated to contain the Subversion revision number.

The only real fix here is to change the commit-in-bound-branch code to (optionally) commit in the master repository first and then pull that revision back into the local repository.

affects: bzr-svn → bzr
Changed in bzr:
status: New → Confirmed
importance: Undecided → Medium
summary: - log command only shows SVN revno for commits by other users.
+ support creating bound branch commits in master branch first
description: updated
Jelmer Vernooij (jelmer)
tags: added: bound-branch commit
tags: added: foreign
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.