On Fri, 16 Nov 2012 11:12:23 +0100, Gilles <[email protected]> wrote:
Hello
This is a newbie question.
Prior to using Fossil, to try something and still be able to go back
in case the change didn't work, the only way I had was to comment
things out.
Now that I'm used to using Fossil, I just keep a DOS box open so I can
easily run "fossil.exe commit -m "Some comment"" before making
changes.
However, in case the change didn't work, what is the best/easiest way
to tell Fossil to forget about it and go back to the last commited
version? Is "fossil.exe revert "myfile.txt"" OK?
What about if changes involve multiple files? Will "fossil.exe revert"
forget all the changes made to all the files, and fetch the latest
commited versions from the repo so I can try something else?
what is unclear about the help message for `revert':
8<-----------------------------------
Usage: fossil revert ?-r REVISION? ?FILE ...?
Revert to the current repository version of FILE, or to
the version associated with baseline REVISION if the -r flag
appears.
Revert all files if no file name is provided.
If a file is reverted accidently, it can be restored using
the "fossil undo" command.
Options:
-r REVISION revert given FILE(s) back to given REVISION
See also: redo, undo, update
8<-----------------------------------
in effect `revert' pulls the specified file(s) (ar all, if no name is
specified) out
of the specified revision (or the *CURRENT* (usually the most recent
checked in) one if none is specified) and replaces
your working copies of the file(s) with them.
so there are two slightly different situations:
a) you change your file(s) and discover _before_ check in that the changes
make no sense. in this case
`fossil revert file(s)' resets the file content to that present in the
CURRENT check in (that is prior
to your false edits).
b) you discover the changes didn't make sense "too late", after (possibly
multiple successive) check ins of buggy stuff. in this case you have to
use `fossil revert -r [rev.id] file(s)' where rev.id. points to the last
"sane" state of your files.
note that once things are checked in `fossil' will not (and is not
supposed to: that's mostly the point of such a system) "forget" the stuff.
it remains part of the history,
so you don't erase the erroneous stuff in the repository but put the
corrected (or restored previous) version "on top" as a new check in.
hth
j.
Thank you.
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users