I had a big problem going back in time to an older version of some code.  In
brief I had to go fossil ui, find the version I wanted, copy the code from
the browser into my editor, save and commit because I could not get fossil
revert to do what I wanted.  I've replicated something approximating my
actions here below with a dirt-simple test case (albeit a bit long).  I've
highlighted the interesting bits in bold.

mich...@isolde:~/junk/test$ fossil new ../test.fsl
project-id: 08a20a854e993e02d01c19fc452e51bc39880377
server-id:  368536210f8131b68d08f97f69195b5c514c7ffc
admin-user: michael (initial password is "f9dca9")
mich...@isolde:~/junk/test$ fossil open ../test.fsl
mich...@isolde:~/junk/test$ for a in 1 2 3 4 5 ; do date > $a ; done
mich...@isolde:~/junk/test$ cat 1 2 3 4 5
Sun Oct 25 20:00:38 CST 2009
Sun Oct 25 20:00:38 CST 2009
*Sun Oct 25 20:00:38 CST 2009*
Sun Oct 25 20:00:38 CST 2009
Sun Oct 25 20:00:38 CST 2009
mich...@isolde:~/junk/test$ fossil add .
ADDED  1
ADDED  2
ADDED  3
ADDED  4
ADDED  5
fossil: cannot add _FOSSIL_
mich...@isolde:~/junk/test$ fossil commit -m "Commit 1"

You need a passphrase to unlock the secret key for
user: "Michael T. Richter (Personal Key) <ttmrich...@gmail.com>"
1024-bit DSA key, ID A550E784, created 2006-01-09

New_Version: *f6eb797b4f*d295ca22161cee0a4f89fc8512338b
mich...@isolde:~/junk/test$ for a in 1 3 5 ; do date > $a ; done
mich...@isolde:~/junk/test$ fossil diff
Index: 1
===================================================================
fossil diff /home/michael/junk/test/1
1c1
< Sun Oct 25 20:00:38 CST 2009
---
> Sun Oct 25 20:01:27 CST 2009
Index: 3
===================================================================
fossil diff /home/michael/junk/test/3
1c1
< Sun Oct 25 20:00:38 CST 2009
---
> Sun Oct 25 20:01:27 CST 2009
Index: 5
===================================================================
fossil diff /home/michael/junk/test/5
1c1
< Sun Oct 25 20:00:38 CST 2009
---
> Sun Oct 25 20:01:27 CST 2009
mich...@isolde:~/junk/test$ fossil commit -m "Commit 2"

You need a passphrase to unlock the secret key for
user: "Michael T. Richter (Personal Key) <ttmrich...@gmail.com>"
1024-bit DSA key, ID A550E784, created 2006-01-09

New_Version: c999d7693599a7f4551062a98e83fda9270a4f1f
mich...@isolde:~/junk/test$ date > 3
mich...@isolde:~/junk/test$ fossil diff
Index: 3
===================================================================
fossil diff /home/michael/junk/test/3
1c1
< Sun Oct 25 20:01:27 CST 2009
---
> Sun Oct 25 20:01:50 CST 2009
mich...@isolde:~/junk/test$ fossil commit -m "Commit 3"

You need a passphrase to unlock the secret key for
user: "Michael T. Richter (Personal Key) <ttmrich...@gmail.com>"
1024-bit DSA key, ID A550E784, created 2006-01-09

New_Version: 08f71893204692d6ea4efc714f03e6cb79c38097
mich...@isolde:~/junk/test$ cat 1 2 3 4 5
Sun Oct 25 20:01:27 CST 2009
Sun Oct 25 20:00:38 CST 2009
*Sun Oct 25 20:01:50 CST 2009*
Sun Oct 25 20:00:38 CST 2009
Sun Oct 25 20:01:27 CST 2009
mich...@isolde:~/junk/test$ fossil timeline
=== 2009-10-25 ===
12:02:06 [08f7189320] *CURRENT* Commit 3 (user: michael tags: trunk)
12:01:37 [c999d76935] Commit 2 (user: michael tags: trunk)
12:00:58 [*f6eb797b4f*] Commit 1 (user: michael tags: trunk)
12:00:02 [5d21199bba] initial empty check-in (user: michael tags: trunk)
mich...@isolde:~/junk/test$ *fossil revert f6eb797b4f 3*
revert file '3'? this will destroy local changes [y/N]? y
3 reverted
mich...@isolde:~/junk/test$ fossil diff
mich...@isolde:~/junk/test$ cat 1 2 3 4 5
Sun Oct 25 20:01:27 CST 2009
Sun Oct 25 20:00:38 CST 2009
*Sun Oct 25 20:01:50 CST 2009*
Sun Oct 25 20:00:38 CST 2009
Sun Oct 25 20:01:27 CST 2009

I'm looking this over and looking this over.  I cannot see what I'm doing
wrong according to fossil help revert and yet I cannot get files to revert.
_______________________________________________
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