mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
fbamend: edit hint to mention hg restack
instead of hg amend --fixup
Summary: To encourage people to learn about and use `hg restack` (which is a more general fixup tool), tell users about it instead of `hg amend --fixup`. I wasn't sure whether to advertise it as `hg rebase --restack` or just `hg restack`, so I've included both. Test Plan: Do an amend in the middle of a stack and observe the new wording. Unit tests reflect changed wording. Reviewers: durham, #sourcecontrol, rmcelroy Reviewed By: rmcelroy Subscribers: mjpieters Differential Revision: https://phabricator.intern.facebook.com/D4390111 Signature: t1:4390111:1483962208:46951c8f5e4c499840b0b4b0ee8ac1e1b6c14ca9
This commit is contained in:
parent
0e50fa2aa0
commit
041eae0180
@ -360,7 +360,8 @@ def amend(ui, repo, *pats, **opts):
|
||||
else:
|
||||
_usereducation(ui)
|
||||
ui.warn(msg)
|
||||
ui.status(_("(use 'hg amend --fixup' to rebase them)\n"))
|
||||
ui.status(_("(use 'hg rebase --restack' (alias: 'hg restack') "
|
||||
"to rebase them)\n"))
|
||||
|
||||
newbookmarks = repo._bookmarks
|
||||
|
||||
|
@ -42,7 +42,7 @@ Rebasing single changeset.
|
||||
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ hg amend -m "amended"
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ hg next
|
||||
abort: current changeset has no children
|
||||
[255]
|
||||
@ -71,7 +71,7 @@ Rebasing multiple changesets at once.
|
||||
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ hg amend -m "amended"
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ hg next --rebase --top
|
||||
rebasing 2:776c07fa2b12 "r2"
|
||||
rebasing 3:137d867d71d5 "r3"
|
||||
@ -97,7 +97,7 @@ Rebasing a stack one changeset at a time.
|
||||
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ hg amend -m "amended"
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ hg next --rebase
|
||||
rebasing 2:776c07fa2b12 "r2"
|
||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
@ -147,7 +147,7 @@ Rebasing a stack two changesets at a time.
|
||||
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ hg amend -m "amended"
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ hg next --rebase 2
|
||||
rebasing 2:776c07fa2b12 "r2"
|
||||
rebasing 3:137d867d71d5 "r3"
|
||||
@ -198,7 +198,7 @@ Rebasing after multiple amends.
|
||||
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ hg amend -m "amend 1"
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ hg amend -m "amend 2"
|
||||
$ hg amend -m "amend 3"
|
||||
$ showgraph
|
||||
@ -239,7 +239,7 @@ Rebasing from below the amended changeset with the --newest flag.
|
||||
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ hg amend -m "amended"
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ hg up 0
|
||||
0 files updated, 0 files merged, 2 files removed, 0 files unresolved
|
||||
$ showgraph
|
||||
@ -285,7 +285,7 @@ rolled back and the final state should be as it was before `hg next --rebase`.
|
||||
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ hg amend -m "amended"
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ mkcommit a
|
||||
$ hg prev
|
||||
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
||||
@ -347,7 +347,7 @@ Test a situation where there is a conflict.
|
||||
$ hg add c
|
||||
$ hg amend -m "amended to add c"
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ showgraph
|
||||
@ 5 amended to add c
|
||||
|
|
||||
|
@ -67,7 +67,7 @@ Test basic case of a single amend in a small stack.
|
||||
$ echo b >> b
|
||||
$ hg amend
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ showgraph
|
||||
@ 5 add b
|
||||
|
|
||||
@ -109,7 +109,7 @@ Test multiple amends of same commit.
|
||||
$ echo b >> b
|
||||
$ hg amend
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ echo b >> b
|
||||
$ hg amend
|
||||
$ showgraph
|
||||
@ -144,7 +144,7 @@ Test conflict during rebasing.
|
||||
$ hg add d
|
||||
$ hg amend
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ showgraph
|
||||
@ 6 add b
|
||||
|
|
||||
@ -202,7 +202,7 @@ Test finding a stable base commit from within the old stack.
|
||||
$ echo b >> b
|
||||
$ hg amend
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ hg up 3
|
||||
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ showgraph
|
||||
@ -240,7 +240,7 @@ Test finding a stable base commit from a new child of the amended commit.
|
||||
$ echo b >> b
|
||||
$ hg amend
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ mkcommit e
|
||||
$ showgraph
|
||||
@ 6 add e
|
||||
@ -282,7 +282,7 @@ a commit on top of one of the obsolete intermediate commits.
|
||||
$ echo b >> b
|
||||
$ hg amend
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ mkcommit e
|
||||
$ hg prev
|
||||
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
||||
@ -290,7 +290,7 @@ a commit on top of one of the obsolete intermediate commits.
|
||||
$ echo b >> b
|
||||
$ hg amend
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ hg up 6
|
||||
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ showgraph
|
||||
@ -337,13 +337,13 @@ behavior is now incorrect -- restack should always fix the whole stack.)
|
||||
$ echo b >> b
|
||||
$ hg amend
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ hg up 2
|
||||
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ echo c >> c
|
||||
$ hg amend
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ hg up 3
|
||||
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ showgraph
|
||||
@ -387,7 +387,7 @@ below the current commit alone.
|
||||
$ echo d >> d
|
||||
$ hg amend
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ hg up 0
|
||||
0 files updated, 0 files merged, 3 files removed, 0 files unresolved
|
||||
$ mkcommit f
|
||||
@ -436,7 +436,7 @@ Test having an unamended commit.
|
||||
$ echo b >> b
|
||||
$ hg amend -m "Amended"
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ echo b >> b
|
||||
$ hg amend -m "Unamended"
|
||||
$ hg unamend
|
||||
@ -473,12 +473,12 @@ onto the newest successor of their parent.
|
||||
[*] add b (glob)
|
||||
$ hg amend -m "successor 1"
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ hg up 1
|
||||
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ hg amend -m "successor 2"
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ hg up 1
|
||||
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ showgraph
|
||||
@ -517,13 +517,13 @@ since the successor is obsolete.
|
||||
$ echo b >> b
|
||||
$ hg amend
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ hg up 1
|
||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ echo c >> b
|
||||
$ hg amend
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ hg unamend
|
||||
$ hg up -C 1
|
||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
@ -558,13 +558,13 @@ Test recursive restacking -- basic case.
|
||||
$ echo b >> b
|
||||
$ hg amend
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ hg up 2
|
||||
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ echo c >> c
|
||||
$ hg amend
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ hg up 1
|
||||
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
||||
$ showgraph
|
||||
@ -609,7 +609,7 @@ stack is lost upon rebasing lower levels.
|
||||
$ echo b >> b
|
||||
$ hg amend
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ mkcommit e
|
||||
$ mkcommit f
|
||||
$ hg prev
|
||||
@ -618,13 +618,13 @@ stack is lost upon rebasing lower levels.
|
||||
$ echo e >> e
|
||||
$ hg amend
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ hg up 2
|
||||
2 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
||||
$ echo c >> c
|
||||
$ hg amend
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ mkcommit g
|
||||
$ mkcommit h
|
||||
$ hg prev
|
||||
@ -633,7 +633,7 @@ stack is lost upon rebasing lower levels.
|
||||
$ echo g >> g
|
||||
$ hg amend
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ hg up 1
|
||||
0 files updated, 0 files merged, 2 files removed, 0 files unresolved
|
||||
$ showgraph
|
||||
|
@ -42,7 +42,7 @@ Test that no preamend bookmark is created.
|
||||
0 files updated, 0 files merged, 2 files removed, 0 files unresolved
|
||||
$ hg amend -m "amended"
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ hg book
|
||||
no bookmarks set
|
||||
|
||||
|
@ -58,7 +58,7 @@ Test basic functions
|
||||
$ echo a >> a
|
||||
$ hg amend
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ hg up 0
|
||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ echo x >> x
|
||||
@ -107,7 +107,7 @@ Test that bookmarked re-amends work well
|
||||
user education
|
||||
second line
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ hg log -G -T '{node|short} {desc} {bookmarks}\n'
|
||||
@ edf5fd2f5332 aa bm
|
||||
|
|
||||
@ -158,7 +158,7 @@ Test that unbookmarked re-amends work well
|
||||
user education
|
||||
second line
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ hg log -G -T '{node|short} {desc} {bookmarks}\n'
|
||||
@ 94eb429c9465 aa
|
||||
|
|
||||
@ -359,7 +359,7 @@ Fbamend respects the createmarkers option
|
||||
user education
|
||||
second line
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ hg amend --fixup
|
||||
rebasing the children of 3a4d2824efc1.preamend
|
||||
rebasing 3:3166f3b5587d "commit --amend message"
|
||||
@ -501,7 +501,7 @@ Test fbamend with inhibit
|
||||
user education
|
||||
second line
|
||||
warning: the changeset's children were left behind
|
||||
(use 'hg amend --fixup' to rebase them)
|
||||
(use 'hg rebase --restack' (alias: 'hg restack') to rebase them)
|
||||
$ hg amend --fixup
|
||||
rebasing the children of f2d4abddbbcd.preamend
|
||||
rebasing 2:4538525df7e2 "add c"
|
||||
|
Loading…
Reference in New Issue
Block a user