[MERGE] revised revert help text

John Arbash Meinel john at arbash-meinel.com
Thu Sep 21 00:21:55 BST 2006


John Yates wrote:
> What happens if I do the following?
> 
> [[ edit A -> A.1 ]]
> [[ edit B -> B.1 ]]
> 
> bzr commit
> 
> [[ edit A -> A.2 ]]
> [[ edit C -> C.1 ]]
> 
> bzr commit
> bzr revert A B
> 
> I think that it is intuitive that I should end up with B.1.  But
> what about A?  Should I get A.1 or A.2?

Well, from what you typed, you didn't change anything between the last
commit an the last revert, so it hasn't changed anything.

> 
> This points up a hole in the bzr UI.  While I can use revert to
> chain backward through the subset of revisions in which a given
> file was modified the is no revision spec that provides access
> to a simple numbering of those revisions that modified that file.
> 
> /john

I'm not positive it is a complete hole. Bzr generally works at a
tree-wide view. So when you do 'bzr revert -r 10' it reverts the whole
tree to how it looked at revision 10. If you specify a file, it reverts
that file to whatever contents it had at revision 10.

So I'm not sure that we really want a simple number which defines the
revisions which modified a file. But I do know that you can already do:

bzr log B
# Oh, revisions 5 and 7 modified B
bzr revert -r 7 B
bzr revert -r 5 B

The only real deficiency is how to determine the revisions that modified
a file which is now deleted. And I don't have a good answer for that
one. (Some would say you could supply the last known path, and it should
match anything in the history, but with renames does that mean it should
match anything that was ever named that, and all other versions of the
file, or only things while they have that name, etc).

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060920/5df5fe57/attachment.pgp 


More information about the bazaar mailing list