Changes to ticket 83af1f5401
By bharder on 2009-04-08 17:19:16. See also: artifact content, and ticket history
- Appended to comment:
bharder added on 2009-04-08 17:19:16:
Perhaps call it "fossil rewind" to "unplay" the commits, up to a certain point? I.e. if "fossil timeline" initially displays something like this:- [beddable] checkin of big fix
- [deadbeef] code change xyz...
- [cafebabe] update code for new password changes...
- [debac1e5] Closed ticket xyz...
- [f005ba11] correct feature A as per ticket debac1e5...
- [decaf000] update supporting libabc to version 2...
"fossil rewind debac1e5 -m 'password accidentally checked-in with code'" would leave the repository in a state where ticket [debac1e5] is the last entry. The manifest would be rebuilt to reflect repo state. I'd hope that syncing the checked-out files would not be done automatically. From there, a user could "fossil commit" to commit current diffs again, or re-checkout whatever baseline they want reflected on disk...
As I think of it, perhaps a "rewind" entry could be installed as an artifact, too. So, after the above operation the "fossil timeline" might read:
- [c0ffee55] Rewind: (to [debac1e5]) password accidentally checked-in with code
- [debac1e5] Closed ticket xyz...
- [f005ba11] correct feature A as per ticket debac1e5...
- [decaf000] update supporting libabc to version 2...
I'm guessing, too, that the "rewind" entries would *absolutely* need to be immutable (ie: non-rewindable themselves).
...as I think about this more, it could also be nice to rewind artifacts to a temp storage, fix the point-in-time error (ie: take out the CC#, or password), then replay the temp storage back to the main repo... correctly only the mistake of entering a CC# or password, etc., but allowing the repo to otherwise easily be brought back to initial (pre-rewind) state. That's really breaking the "must not be mutable" philosophy of drh's though.
fossil rewind debac1e5 ;# rewinds main repo to "debac1e5", storing unwound items on temporary stack
[do local edits] ;# i.e.: remove the CC#
fossil commit ;# now there is no embedded CC#, or secret password
fossil replay deadbeef ;# replays stack taken with "fossil rewind", starting with deadbeef, to end (beddable)
fossil timeline ;# new state after rewind/edit/replay
- [be55077d] Replay: end of replay [ca5caded]
- [ace55ab1] checkin of big fix
- [defaced1] code change xyz
- [ca5caded] Replay: start
- [1dec0ded] password changes in code, but didn't commit actual password this time
- [c0ffee55] Rewind: (to [debac1e5]) password accidentally checked-in with code
- [debac1e5] Closed ticket xyz...
- [f005ba11] correct feature A as per ticket debac1e5...
- [decaf000] update supporting libabc to version 2...
I'm sure there are corner cases, and details to be worked-out, but it sounds interesting...
- Change private_contact to "5c164664f608e8049128be696a3d13e04aa6fafd"