Branching the 0. revision leads to weird behaviour

Bug #670291 reported by kgeri
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned

Bug Description

The following reproduces the problem (bzr v2.2.0 on Windows XP)

C:\> cd test
C:\> bzr init-repo .
 Shared repository with trees (format: 2a)
 Location:
  shared repository: .

C:\> bzr init trunk
 Created a repository tree (format: 2a)
 Using shared repository: C:/test/

C:\> bzr branch trunk dev
 Branched 0 revision(s).

C:\> bzr co dev working
C:\> cd working
 <creating a file named aaa>

C:\> bzr add
 adding aaa

C:\> bzr ci
 Committing to: C:/test/dev/
 added aaa
 Committed revision 1.

C:\> bzr switch trunk
 Tree is up to date at revision 1. <--- uh-oh...
 Switched to branch: C:/test/trunk/

Everything fails from now on...
C:\> bzr ci
 bzr: ERROR: Bound branch BzrBranch7(file:///C:/test/working/) is out of date with master branch BzrBranch7(file:///C:/test/trunk/).
 To commit to master branch, run update and then commit.
 You can also pass --local to commit to continue working disconnected.

Okay, let's try an update...
C:\> bzr up
 Tree is up to date at revision 1 of branch C:/test/trunk

Hmmm... maybe try to switch back then:
C:\> bzr switch dev
 bzr: ERROR: Cannot switch as local commits found in the checkout. Commit these to the bound branch or use --force to throw them away.

Okay, so force it... that worked!
C:\> bzr switch --force dev

Now let's try merging directly to the trunk:
C:\> cd ../trunk
C:\> bzr merge ../dev
  +N aaa
 All changes applied successfully.

C:\> bzr ci
 Committing to: C:/test/trunk/
 deleted <-- deleted what?
 modified aaa
 working tree is out of date, run 'bzr update' <-- ???
 Committed revision 1.

So none of this happens if I branch _after_ at least one revision was committed to the trunk.

Revision history for this message
Vincent Ladeuil (vila) wrote :

Right, there are grey areas when dealing with revision 0 that should be addressed, thanks for the reproducing recipe,

Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

this is related to bug 249074 and 308562

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.