Bazaar completely lost files by "revert"

Jelmer Vernooij jelmer at samba.org
Fri Feb 24 15:25:09 UTC 2012


On 02/24/2012 04:11 PM, Artur Rataj wrote:
> Hello. I have reverted some files, not supposing that Bazaar can 
> completely lost the newer versions by one inadvertent command.
>
> But it turned out some "tilde" files are missing!
>
> $ bzr revert -r -2
>  M  
> GraphUtils/src/pl/gliwice/iitis/graphutils/view/AbstractCentralView.java
>  M  GraphUtils/src/pl/gliwice/iitis/graphutils/view/AbstractImageView.java
>  M  GraphUtils/src/pl/gliwice/iitis/graphutils/view/AbstractRectView.java
>  M  GraphUtils/src/pl/gliwice/iitis/graphutils/view/AbstractView.java
> -D  GraphUtils/src/pl/gliwice/iitis/graphutils/view/DrawMode.java
>  M  SpatialNN/src/pl/gliwice/iitis/spatialnn/Main.java
>  M  SpatialNN/src/pl/gliwice/iitis/spatialnn/network/construct/Wood.java
>  M  
> SpatialNN/src/pl/gliwice/iitis/spatialnn/network/view/ExpressionView.java
>  M  
> SpatialNN/src/pl/gliwice/iitis/spatialnn/network/view/MembraneView.java
>
> $ find . -name "*~?~"
> ./SpatialNN/src/pl/gliwice/iitis/spatialnn/Main.java.~1~
> ./SpatialNN/src/pl/gliwice/iitis/spatialnn/network/construct/Wood.java.~1~
>
> What about the other modifies files? Do I have completely lost 
> AbstractView.java or DrawMode.java, for example?
Were these files actually modified in your working tree, or were they 
just at the current tip revision ?

Note that "bzr revert" only changes the contents of the working tree to 
revision -2, it doesn't change the branch history in any way.
>
> Is Bazaar so immature, that it plainly loses files contrary to the 
> documentation?
>
> Excuse me, I am really sorrow, these files contained code that is very 
> valuable for me... Is there *any* way of recovering these files?

You can recover the other files by simply going back to the branch tip, 
by using "bzr revert 
GraphUtils/src/pl/gliwice/iitis/graphutils/view/AbstractView.java".

Or you can print their contents to standard out by running something 
like "bzr cat -r -1 
GraphUtils/src/pl/gliwice/iitis/graphutils/view/AbstractView.java".

Cheers,

Jelmer



More information about the bazaar mailing list