Branching the 0. revision leads to weird behaviour
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(
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.
tags: | added: check-for-breezy |
Right, there are grey areas when dealing with revision 0 that should be addressed, thanks for the reproducing recipe,