Fossil SCM - Revert to a specific revision, such as Mercurial

When using Mercurial, if I want to change the current working copy with a specific revision, I just do:

$> hg revert good_revision
$> hg commit -m "Now I'm in the good revision"

Then I see that all my files are in good_revision state and can start working on it.

So far, on the fossil, I can make a return, but only to certain files, and not to the entire repository, and updating or checking does not work as I expected.

How can a fossil return my entire repository to a specific revision?

+4
source share
3 answers

, , , , " " Fossil. , Fossil , "", "forking".

,

fossil update good_revision

fossil commit --allow-fork

fossil ui, , .

.

, , , , , . Fossil :

  • "" "" ( , ). , "" .

    , "" - ; .

  • "" .

  • last-good fossil update, .

    "last-good" commit , , , "".

, , SQLite; . . this.

+6

, - , . , , . Fossil Mercurial:

fossil revert -r good_revision
fossil commit -m "Now I'm in the good revision"

, . - , ( , ). , .

:

fossil revert  -r good_revision  my_file
    (or)
fossil revert  my_file_from_the_last_commit

, , . . https://www.fossil-scm.org/index.html/help?cmd=revert

, , - . , - , , Fossil.

+2

, , , , (: "_", /, bad_leaf, , "good_revision" "), , / :

() good_revision, bad_leaf ; , , , good_revision, , , . , , "" , , .

fossil update good_revision
fossil commit --allow-fork --allow-empty
# note the uuid from that commit (for use as forked_basis below)
fossil merge -f --integrate --baseline bad_leaf forked_basis

, , ,

fossil commit

, "", good_revision bad_leaf bad_leaf, , , () , bad_leaf.

A diff ( gnu, diff) good_revision . , , / .

: , , , : cvs/svn/ git/hg/perforce/clearcase.

: , , .

+1

Source: https://habr.com/ru/post/1547451/


All Articles