Stupid Question

Erik Bågfors zindar at
Thu Apr 28 07:55:41 BST 2005

You can always go back to what you had before. That is, you can always
remove any none commited changes (such as screwing up a file badly) or
even back up to an earlier version of the repository if you screwed up
and then commited.

There has been talk about a revert command but I don't think that's
implemented yet...

Here is one way right now.

: [bagfors at zyrgelkwytng]$ ; bzr init
: [bagfors at zyrgelkwytng]$ ; echo hello > file
: [bagfors at zyrgelkwytng]$ ; bzr add file
: [bagfors at zyrgelkwytng]$ ; bzr commit -m 'added file'
: [bagfors at zyrgelkwytng]$ ; echo "screw up" > file
: [bagfors at zyrgelkwytng]$ ; bzr diff
*** modified file 'file'
--- file
+++ file
@@ -1,1 +1,1 @@
+screw up

: [bagfors at zyrgelkwytng]$ ; bzr revno

: [bagfors at zyrgelkwytng]$ ; bzr cat -r 1 file > file
: [bagfors at zyrgelkwytng]$ ; bzr diff
: [bagfors at zyrgelkwytng]$ ;

On 4/28/05, Sam Williams <sam-williams at> wrote:
> I come mostly from using cvs, so I'm still grappling with the paradigm
> thats being used for bazaar-ng. In cvs, if you screwed up a file badly
> you could just remove it and check it out again from the repository. In
> the case of bzr, ate you only working on changesets? Is it possible to
> restore just one file?
> Sorry for the stupid question, but I'm a little puzzled at this point...
> Thanks for the help,
> Sam Williams
> --
> bazaar-ng mailing list
> bazaar-ng at

More information about the bazaar mailing list