How do I revert an unversioned file?

Vincent Ladeuil v.ladeuil+lp at free.fr
Thu Jan 13 16:06:07 UTC 2011


>>>>> Eli Zaretskii <eliz at gnu.org> writes:

    >> On some conflicts bzr renames files to file.OTHER / file.THIS.
    >> You should see that fact in the bzr status output.

    > Yes, I know about THIS and OTHER.  But none of them is a versioned
    > file, right?

Wrong. Look at 'bzr st' output, the file has been renamed and is now
known to bzr under its new name.

    > So what is the semantics of "bzr revert path/to/file.OTHER"?  What
    > does "bzr revert" do in this case?

It reverts 'file.OTHER' to its state in the basis tree which  in this
case is 'deleted' (IIUC the original example).

With recent enough bzr versions, 'bzr resolve file --take-this' should
do the same thing (and mark the conflict as resolved too). The
difference between 'revert' and 'resolve' is that the later is a bit
smarter about recognizing paths involved in conflicts whereas 'revert'
really want an existing path.

'Content conflicts' are certainly the... hardest to understand and bzr
should provide easier ways to deal with them, we're working on that.

     Vincent



More information about the bazaar mailing list