On Wed, Jan 9, 2013 at 6:10 AM, Gilles <[email protected]> wrote:
> Hello > > Am I correct in understanding that this is the right way to proceed to > try some new code, and either save it (whether it works or not, just > as a track-record) or discard it? > > To try some new code: > 1. Commit current code > 2. Try new code > 3. > a. if OK, commit new code : fossil commit -m "New stuff" > b. if NOK and don't care to save it, just go back to previous code: > fossil revert myfile.c > c. if NOK but want to keep track of attempt, commit and go back to n-1 > : > fossil commit -m "Failed attempt" > fossil finfo myfile.c : write down UUID (first hash) of n-1 revision > fossil revert -r UUID myfile.c > I'd do it this way: fossil commit -m "Failed Attempt" --branch dead-end fossil up prev That will save your failed attempt in your history forever. The failed attempt will be on a branch, however, out of the way. I avoid putting non-working code on the trunk, since that will cause problems for future bisects. If you don't what to save your failed attempt forever, but just want to keep it around for a few days (or weeks) in case you later decide to go back it it, I'd save it in the stash instead: fossil stash save The previous command will save all your changes in a stash entry, then revert your check-out to its pristine state. -- D. Richard Hipp [email protected]
_______________________________________________ fossil-users mailing list [email protected] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

