mercurial - getting second newest version of source code -
i’m new mercurial. i’m trying clone second newest commit web interface, , i’ve red says need enter revision number. however, web interface shows “age”, “author”, “description” , @ bottom has “rev 27: (0) tip” know 1 want based on description, , it’s second top. how it? assume when did hg clone https://... got newest version
just clone whole repository, update second newest commit hg update -r -2.
note if have branches, "second newest commit" may on different branch. in case, can list latest 2 changes on particular branch hg log -b <branch> -l 2, hg update -r <rev> older of 2 changesets listed branch.
another way 2nd newest commit on branch following syntax:
hg update <branch>^ for example:
hg update my_branch^ note on windows ^ escape character console, must doubled 1 literal ^:
hg update my_branch^^ another way first ancestor of branch tip is:
hg update my_branch~1 see hg revsets , hg revisions.
Comments
Post a Comment