On Jul 6, 2017, at 11:36 AM, Natacha Porté <[email protected]> wrote:
>
> In shell terms, I'm looking for something equivalent to:
> $ mkdir ../tmp-checkout
> $ cd ../tmp-checkout
> $ fossil open /path/to/fosisl
> $ fossil checkout $targetcommit
> $ cp -r ../working-checkout/* ./
> $ cd ..
> $ rm -rf working-checkout
> $ mv tmp-checkout working-checkout
That seems different from what you described in your later email.
I’m imagining a timeline that looks like this:
12:00:00 [12345] Bogus checkin
11:00:00 [abcde] Another bogus checkin
10:00:00 [fedce] Last point of sanity
It sounds like you are working on some code on top of [12345] but then realized
that the last two checkins (in this example) are worthless and want to apply
the current work on top of [fedce] instead, then possibly revert some of that
work before checking in.
If that’s the case, Fossil lets you move those two bogus checkins to a hidden
branch, re-exposing [fedce] as the tip of that branch:
$ fossil stash save
$ fossil amend --branch bogus abcde --hide --close
$ fossil up trunk # probably not necessary
$ fossil merge --cherrypick 12345 # optional
$ fossil merge --cherrypick abcde # ditto
$ fossil stash pop # bring uncommitted changes atop [12345]
back
…manual fix-ups, test, etc…
$ fossil ci
I’m unclear about whether you want the “merge --cherrypick” bits here or just
the “stash pop” part. Maybe in different situations, you want a mixture of all
of these possibilities. For example, maybe the bogus checkins are only
partially bogus, so that with a bit of editing they can safely be checked back
in on that branch with the new “bogus” branch holding the failed attempt at
solving the problem.
A good reason to do that sort of thing is when a checkin breaks a key branch
like trunk that you need to be able to bisect against, so that every checkin
must build on all platforms.
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users