Forgive me if this has been posted many times before (I didn't find it with a quick search). Just bumping this to the list in case others get stuck using revert.

I was stuck trying to revert to a previous version of a file. Of course, the fossil revert command is documented:

fossil revert ?-r REVISION? ?FILE ...?


But a newbie like me doesn't exactly know what a "REVISION" is. Sample from the Fossil GUI (click on a file name to see the revision history, something similar to the following):

11:16 [78192ab676dd84a7] part of check-in [e9b579c062] Syncing up minor changes with repo. (user: ezaron branch: trunk) [diff] [annotate]

The REVISION string to use is not the artifact, "78192ab676dd84a7 ... ." Instead, proper use of the revert command must use the check-in hash, "e9b579c062 ... ." For example, to revert to an older version of "makefile":

fossil revert -r e9b579c062f8c8a5d33205545ca5d19711162318 makefile

It seems that if you enter an invalid REVISION string, the file will simply be deleted. Happily, the fossil undo command returns to previous state.

All the best,

Ed

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Edward D. Zaron
Research Assistant Professor
Department of Civil and Environmental Engineering
Portland State University
Portland, OR 97207-0751
Phone: (503)-725-2435
FAX: (503)-725-5950
za...@cecs.pdx.edu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to