Reverting a lightweight checkout confuses bzr about revision number

Bug #158306 reported by Maciej Katafiasz
2
Affects Status Importance Assigned to Milestone
Bazaar
New
Undecided
Unassigned

Bug Description

Run this script:

cd /tmp/
mkdir bzr-test
cd bzr-test/
mkdir repo
cd repo/
bzr init
echo foo > file.txt
bzr add file.txt
bzr commit -m "a change"
echo baz > file.txt
bzr commit -m "another change"
cd ..
bzr checkout --lightweight repo/ checkout
cd checkout/
bzr revno
cat file.txt
bzr revert -r 1
cat file.txt
bzr update
bzr revno
bzr revert -r 2
cat file.txt

bzr will claim the tree is at revision two, even though files are actually from r1.

Revision history for this message
Aaron Bentley (abentley) wrote : Re: [Bug 158306] Reverting a lightweight checkout confuses bzr about revision number

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

mathrick wrote:
> bzr will claim the tree is at revision two, even though files are
> actually from r1.

Revert changes state of [selected] files. It does not move your
checkout back in time. If it did that, you would no longer be able to
commit, because your checkout would be out-of-date with your branch.

You are looking for update -r, which hasn't been implemented yet.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHJeQ+0F+nu1YWqI0RAt0dAJ96K0orBL+XkHDgoNGHkTfAKVKi/gCeJ4nH
1VtbN23HFH/+36s9I0acE9Y=
=ryYd
-----END PGP SIGNATURE-----

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.