Reverting a lightweight checkout confuses bzr about revision number
Bug #158306 reported by
Maciej Katafiasz
This bug report is a duplicate of:
Bug #33973: Documentation should clarify that revert only changes files, not last-revision.
Edit
Remove
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.
To post a comment you must log in.
-----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 enigmail. mozdev. org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://
iD8DBQFHJeQ+ 0F+nu1YWqI0RAt0 dAJ96K0orBL+ XkHDgoNGHkTfAKV Ki/gCeJ4nH +36s9I0acE9Y=
1VtbN23HFH/
=ryYd
-----END PGP SIGNATURE-----