Find current working revision number in bzr after revert -rN

95 Views Asked by At

How can I tell which revision number I am currently compiling/linking (is there a "canonical" name for this revno?), in a bzr repo on which I have performed bzr revert -rN?

I remember some time ago finding a python script that obtained this info, but I cannot find it now.

Note:

http://doc.bazaar.canonical.com/development/en/user-reference/update-help.html is an old question, and the answer involves the use of bzr update. I am not sure if it worked, and if it works now. But the script I mention did not involve update (if so, it was under the hood).

1

There are 1 best solutions below

1
jelmer On

"bzr log", "bzr revno" or "bzr revision-info" will tell you where your branch is at.

Unlike "bzr update", "bzr revert" only changes the specified files in the working tree to the specified revision. It does not affect history or the metadata for the working tree, and thus there is no way afterwards to find the revision those files came from.

In fact, it's possible to revert different files to different revisions in history.