mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
hg update hint
Differential Revision: https://phab.mercurial-scm.org/D834
This commit is contained in:
parent
1ac1a987b3
commit
60ea7b5141
@ -433,6 +433,11 @@ def update(orig, ui, repo, node=None, rev=None, **kwargs):
|
||||
if inactive:
|
||||
extensions.unwrapfunction(hg, 'updatetotally', _wrapupdatetotally)
|
||||
|
||||
# If the command succeed a message for 'hg update .^' will appear
|
||||
# suggesting to use hg prev
|
||||
if node == '.^':
|
||||
ui.status(_("(hint: use 'hg prev' to move to the parent changeset)\n"))
|
||||
|
||||
return result
|
||||
|
||||
def _wrapupdatetotally(orig, ui, repo, checkout, brev, *args, **kwargs):
|
||||
|
@ -20,6 +20,7 @@ Run test
|
||||
$ hg up ".^"
|
||||
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
||||
(leaving bookmark AB)
|
||||
(hint: use 'hg prev' to move to the parent changeset)
|
||||
$ touch c
|
||||
$ hg commit -Aqm c
|
||||
$ hg bookmark C -t AB
|
||||
|
@ -23,6 +23,7 @@ Set up the repository.
|
||||
|
|
||||
o 0
|
||||
|
||||
|
||||
$ hg up 3
|
||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
|
||||
@ -68,3 +69,6 @@ Certain flags shouldn't work together.
|
||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ hg st
|
||||
? foo
|
||||
$ hg update .^
|
||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
(hint: use 'hg prev' to move to the parent changeset)
|
||||
|
@ -79,6 +79,7 @@ Dirty update allowed to same rev, with no conflicts, and --clean
|
||||
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ hg update ".^"
|
||||
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
||||
(hint: use 'hg prev' to move to the parent changeset)
|
||||
$ hg update --clean 1
|
||||
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user