On 8/16/17, Steve Schow <st...@bstage.com> wrote:
> I know the fossil paradigm generally frowns on the idea of undoing commits.
> Please tell me your thoughts about the best approach to handle the following
> situation.
>
> a few file is added to the checkout and committed.  So the commit has one
> new file, nothing else.  It is later determined that the entirely wrong
> version of that file was committed for the first version of the file and
> we’d like to back it out to do it properly…
>
> Is that possible at all or if not, what is the best way to handle that kind
> of situation with fossil?

To "undo" a commit:

(1)  Bring up the /info page for the bad commit in the web interface.
(Use "fossil ui" if you do not have a server at hand.)

(2)  Click on the "edit" link to the right of the "Other Links:" label

(3)  Click on "Make this check-in the start of a new branch named:"
and type in "mistake" for the new branch name.

(4)  Click on "Mark this leaf as closed"

(5)  Edit the check-in comment to explain why the check-in is being backed out.

(6)  Click the "Apply" button

(7)  You are done with the web interface for the moment.  Go back to
your shell in your check-out directory and type "fossil update trunk"
to move your check-out back to what it was before you made the bad
check-in.

There are lots of examples of this in the SQLite source tree.  One
such example: https://www.sqlite.org/src/timeline?c=4b0f44848

-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
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