pull overwrite does not always find revisions after bind
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Due to some external tools and applications, I am using a fixed location on my local disk for a heavyweight checkout and need to be able to switch between branches. It typically works well using:
bzr bind $BZR/branchname
bzr pull --overwrite $BZR/branchname
If, however, I mistakenly forget to include the location in the pull command, my working directory gets into a state where bzr always reports 'No revisions to pull', regardless of what steps I do after that:
~/dev/work$ bzr bind $BZR/trunk/bug1234
~/dev/work$ bzr pull --overwrite # oops! forgot to specifiy the location
Using saved location: /Users/
No revisions to pull.
~/dev/work$ bzr pull --overwrite $BZR/trunk/bug1234 # specifying it here is too late
No revisions to pull.
Even if I try to get a new checkout, the problem persists:
~/dev/work$ cd ..
~/dev$ rm -Rf work
~/dev$ bzr co $BZR/trunk ./work
~/dev$ cd work
~/dev/work$ bzr bind $BZR/trunk/bug1234
~/dev/work$ bzr pull --overwrite $BZR/trunk/bug1234
No revisions to pull.
Maybe it's just a documentation bug - I just have no idea how to recover without nuking my .bzr directory and creating my entire local working tree from scratch.
The problem occurs both in 0.92 and bzr.dev 3020.
Below are the steps I used to reproduce the problem:
1) Create a tree-less shared repository (created it locally for simplicity) with a "trunk" project inside it:
bzr init-repo --no-trees ~/repo
bzr init ~/repo/trunk
export BZR=~/repo
2) Obtain a checkout of the project and add a file to it:
~$ cd dev
~/dev$ bzr co $BZR/trunk ./work
~/dev$ cd work
~/dev/work$ echo some file > file.txt
~/dev/work$ bzr add file.txt
added file.txt
~/dev/work$ bzr commit -m "added"
Committing revision 1 to "/Users/
added file.txt
Committed revision 1.
3) Branch the project and commit a change to the file:
~/dev/work$ cd ..
~/dev$ rm -Rf work
~/dev$ bzr branch $BZR/trunk $BZR/trunk/bug1234
Branched 1 revision(s).
~/dev$ bzr co $BZR/trunk/bug1234 ./work
~/dev/work$ echo a change >> file.txt
~/dev/work$ bzr commit -m "changed it"
Committing revision 2 to "/Users/
modified file.txt
Committed revision 2.
4) Verify that switching branches works if I remember to include the location in the pull command:
~/dev/work$ bzr bind $BZR/trunk
~/dev/work$ bzr pull --overwrite $BZR/trunk
M file.txt
All changes applied successfully.
Now on revision 1.
~/dev/work$ cat file.txt
some file
5) Omit the location in the pull command and get into the stuck state:
~/dev/work$ bzr bind $BZR/trunk/bug1234
~/dev/work$ bzr pull --overwrite
Using saved location: /Users/
No revisions to pull.
~/dev/work$ bzr pull --overwrite $BZR/trunk/bug1234
No revisions to pull.
~/dev/work$ bzr bind $BZR/trunk
~/dev/work$ bzr pull --overwrite $BZR/trunk
No revisions to pull.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Dave Brueck пишет:
> Public bug reported:
>
> Due to some external tools and applications, I am using a fixed location
> on my local disk for a heavyweight checkout and need to be able to
> switch between branches. It typically works well using:
>
> bzr bind $BZR/branchname
> bzr pull --overwrite $BZR/branchname
I usually do
bzr unbind
bzr pull --overwrite $BZR/branchname
bzr bind $BZR/branchname
and it works. enigmail. mozdev. org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://
iD8DBQFHSxCQzYr 338mxwCURAhoSAJ 9CM+h/10XxZguiD VgMM9IJMTZAdQCc DZJR fj+yZdcM=
2bPFHABbzivZb4e
=wzUc
-----END PGP SIGNATURE-----