Cannot commit to bound branch

Bug #988272 reported by Tommi Vainikainen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
New
Undecided
Unassigned

Bug Description

I cannot commit to up-to-date bound svn branch.

I've checked out with "bzr checkout svn+ssh://...." and then trying to make a commit with "bzr commit"
Bzr says:
bzr: ERROR: Bound branch BzrBranch7(file:///home/tvainika/branch1/) is out of date with master branch SvnBranch('svn+ssh://server/usr/local/svn2/branches/branch1').
To commit to master branch, run update and then commit.

bzr update does not get any updates.

By adding debug to bzrlib/commit.py nearby lines 565:

        # Make sure the local branch is identical to the master
        master_info = self.master_branch.last_revision_info()
        local_info = self.branch.last_revision_info()
        if local_info != master_info:
            mutter("Local: %s", local_info)
            mutter("Master: %s", master_info)
            raise errors.BoundBranchOutOfDate(self.branch,
                    self.master_branch)

(mutter lines added by me)

Then .bzr.log contains following interesting lines:

0.218 preparing to commit
1.630 Local: (12944, 'svn-v4:6d7ccb3a-1f00-0410-ba74-00005ac6b199:XXX:28622')
1.631 Master: (12946, 'svn-v4:6d7ccb3a-1f00-0410-ba74-00005ac6b199:XXX:28622')

bzr is version from Debian unstable 2.6.0~bzr6522-1
bzr-svn is from Debian unstable version 1.2.1-1

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

Hi,

It seems that for some reason the revnos for your branch doesn't match that of upstream. What is the revision number reported when you run "bzr revno -rrevid:svn-v4:6d7ccb3a-1f00-0410-ba74-00005ac6b199:XXX:28622 URL-for-remote-svn-server" ?

Revision history for this message
Tommi Vainikainen (thv) wrote : Re: [Bug 988272] Re: Cannot commit to bound branch

Jelmer Vernooij <email address hidden> writes:
> It seems that for some reason the revnos for your branch doesn't match
> that of upstream. What is the revision number reported when you run "bzr
> revno -rrevid:svn-v4:6d7ccb3a-1f00-0410-ba74-00005ac6b199:XXX:28622 URL-
> for-remote-svn-server" ?

It says 12946 (same as master).

If I compare output of "bzr log" (local) and "bzr log
svn+ssh://remote...", I noticed that the oldest commit in remote svn
server is:

------------------------------------------------------------
revno: 3
svn revno: 1 (on /main/trunk)
committer: xxx
timestamp: Tue 2005-09-06 19:14:34 +0000
message:
  Initial import

In my local bzr log same is
------------------------------------------------------------
revno: 1
svn revno: 1 (on /main/trunk)
committer: xxx
timestamp: Tue 2005-09-06 19:14:34 +0000
message:
  Initial import

Revnos are mismatching from the beginning.

--
Tommi Vainikainen

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

On Wed, Apr 25, 2012 at 07:25:32PM -0000, Tommi Vainikainen wrote:
> Jelmer Vernooij <email address hidden> writes:
> > It seems that for some reason the revnos for your branch doesn't match
> > that of upstream. What is the revision number reported when you run "bzr
> > revno -rrevid:svn-v4:6d7ccb3a-1f00-0410-ba74-00005ac6b199:XXX:28622 URL-
> > for-remote-svn-server" ?

> It says 12946 (same as master).

> If I compare output of "bzr log" (local) and "bzr log
> svn+ssh://remote...", I noticed that the oldest commit in remote svn
> server is:

> ------------------------------------------------------------
> revno: 3
> svn revno: 1 (on /main/trunk)
> committer: xxx
> timestamp: Tue 2005-09-06 19:14:34 +0000
> message:
> Initial import

> In my local bzr log same is
> ------------------------------------------------------------
> revno: 1
> svn revno: 1 (on /main/trunk)
> committer: xxx
> timestamp: Tue 2005-09-06 19:14:34 +0000
> message:
> Initial import

> Revnos are mismatching from the beginning.
Hmm, that's odd. Does the remote server have any revisions that were
originally pushed from bzr?

My suspicion is that an older version of bzr might have written
invalid data into one of the svn revision properties that is now
tripping it up.

Cheers,

Jelmer

Revision history for this message
Tommi Vainikainen (thv) wrote :

Yes, a long time ago I've used older version of bzr-svn to commit some versions. There is currently bzr:revision-info, bzr:file-ids, bzr:text-revisions, bzr:text-parents, bzr:revision-id:v3-trunk1, and bzr:ancestry:v3-trunk1 properties at least.

If I take revnos out of logs and run compare, I can find following things:

1) timestamp of some commits not made with bzr-svn differ by one second, including some commits made before first ever commit with bzr-svn

2) master log ("bzr log svn+ssh://...") contains committer with my name and email for those commits made with bzr-svn on 2008, and branch nick also. Now I remember after reading logs that I really used bzr-svn whole summer 2008 until bitten by race condition where one of my commits with bzr-svn overwrote commit of my fellow developer...

3) For one (and latest) commit made with bzr-svn (I guess) does not have svn revno property on local log ("bzr log" locally) at all, but remote log contains svn revno property on log.

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

On Thu, Apr 26, 2012 at 08:49:46AM -0000, Tommi Vainikainen wrote:
> Yes, a long time ago I've used older version of bzr-svn to commit some
> versions. There is currently bzr:revision-info, bzr:file-ids, bzr:text-
> revisions, bzr:text-parents, bzr:revision-id:v3-trunk1, and
> bzr:ancestry:v3-trunk1 properties at least.
>
> If I take revnos out of logs and run compare, I can find following
> things:
>
> 1) timestamp of some commits not made with bzr-svn differ by one second,
> including some commits made before first ever commit with bzr-svn
That could be correct, since the commit in bzr is made before it is
pushed to svn.

> 2) master log ("bzr log svn+ssh://...") contains committer with my name
> and email for those commits made with bzr-svn on 2008, and branch nick
> also. Now I remember after reading logs that I really used bzr-svn
> whole summer 2008 until bitten by race condition where one of my commits
> with bzr-svn overwrote commit of my fellow developer...
This is most likely the culprit. I suspect one of the
properties with the revision number will be wrong, and bzr is using
that data to calculate the revision number. If it's a revision
property you should be able to fix it yourself (using the bzr:revno
property).

> 3) For one (and latest) commit made with bzr-svn (I guess) does not
> have svn revno property on local log ("bzr log" locally) at all, but
> remote log contains svn revno property on log.
That's correct too, since the svn revno is only displayed for
revisions that originated in the svn repository. If you create a local
bzr revision and then push that into svn, it originated in bzr, not
svn.

Cheers,

Jelmer

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.