annotate tests/test-unamend.t @ 51926:70fe33bdab54

typing: add type hints for the overloads of `matchmod.readpatternfile()` The return type is conditional on an argument passed, and it very much confused both pytype and PyCharm inside `dirstate._ignorefileandline()` after adding type hints for the return value there.
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 27 Sep 2024 11:57:42 -0400
parents 2f2682f40ea0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
1 Test for command `hg unamend` which lives in uncommit extension
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
2 ===============================================================
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
3
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
4 $ cat >> $HGRCPATH << EOF
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
5 > [alias]
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
6 > glog = log -G -T '{rev}:{node|short} {desc}'
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
7 > [experimental]
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
8 > evolution = createmarkers, allowunstable
47020
ba6881c6a178 rewriteutil: check for divergence
Martin von Zweigbergk <martinvonz@google.com>
parents: 47018
diff changeset
9 > evolution.allowdivergence = true
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
10 > [extensions]
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
11 > rebase =
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
12 > amend =
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
13 > uncommit =
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
14 > EOF
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
15
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
16 Repo Setup
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
17
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
18 $ hg init repo
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
19 $ cd repo
35195
900ed9853017 tests: removes bashism from test-unamend.t
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35182
diff changeset
20 $ for ch in a b c d e f g h; do touch $ch; echo "foo" >> $ch; hg ci -Aqm "Added "$ch; done
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
21
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
22 $ hg glog
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
23 @ 7:ec2426147f0e Added h
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
24 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
25 o 6:87d6d6676308 Added g
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
26 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
27 o 5:825660c69f0c Added f
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
28 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
29 o 4:aa98ab95a928 Added e
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
30 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
31 o 3:62615734edd5 Added d
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
32 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
33 o 2:28ad74487de9 Added c
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
34 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
35 o 1:29becc82797a Added b
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
36 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
37 o 0:18d04c59bb5d Added a
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
38
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
39 Trying to unamend when there was no amend done
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
40
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
41 $ hg unamend
48979
9120c0cd935c unamend: abort if commit was not created by `hg [un]amend`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48581
diff changeset
42 abort: working copy parent was not created by 'hg amend' or 'hg unamend'
9120c0cd935c unamend: abort if commit was not created by `hg [un]amend`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48581
diff changeset
43 [10]
9120c0cd935c unamend: abort if commit was not created by `hg [un]amend`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48581
diff changeset
44 $ echo "bar" >> h
9120c0cd935c unamend: abort if commit was not created by `hg [un]amend`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48581
diff changeset
45
9120c0cd935c unamend: abort if commit was not created by `hg [un]amend`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48581
diff changeset
46 Trying to unamend when the obsmarker is missing
9120c0cd935c unamend: abort if commit was not created by `hg [un]amend`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48581
diff changeset
47
9120c0cd935c unamend: abort if commit was not created by `hg [un]amend`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48581
diff changeset
48 $ hg amend
9120c0cd935c unamend: abort if commit was not created by `hg [un]amend`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48581
diff changeset
49 $ hg debugobsolete --delete 0
9120c0cd935c unamend: abort if commit was not created by `hg [un]amend`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48581
diff changeset
50 deleted 1 obsolescence markers
9120c0cd935c unamend: abort if commit was not created by `hg [un]amend`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48581
diff changeset
51 $ hg unamend
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
52 abort: changeset must have one predecessor, found 0 predecessors
46465
0e2becd1fe0c errors: use InputError in uncommit extension
Martin von Zweigbergk <martinvonz@google.com>
parents: 45853
diff changeset
53 [10]
48979
9120c0cd935c unamend: abort if commit was not created by `hg [un]amend`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48581
diff changeset
54 $ hg strip tip --config extensions.strip=
9120c0cd935c unamend: abort if commit was not created by `hg [un]amend`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48581
diff changeset
55 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
9120c0cd935c unamend: abort if commit was not created by `hg [un]amend`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48581
diff changeset
56 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/c9fa1a715c1b-06e5c233-backup.hg
9120c0cd935c unamend: abort if commit was not created by `hg [un]amend`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48581
diff changeset
57 $ hg up tip
9120c0cd935c unamend: abort if commit was not created by `hg [un]amend`
Martin von Zweigbergk <martinvonz@google.com>
parents: 48581
diff changeset
58 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
59
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
60 Unamend on clean wdir and tip
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
61
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
62 $ echo "bar" >> h
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
63 $ hg amend
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
64
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
65 $ hg exp
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
66 # HG changeset patch
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
67 # User test
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
68 # Date 0 0
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
69 # Thu Jan 01 00:00:00 1970 +0000
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
70 # Node ID c9fa1a715c1b7661c0fafb362a9f30bd75878d7d
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
71 # Parent 87d6d66763085b629e6d7ed56778c79827273022
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
72 Added h
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
73
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
74 diff -r 87d6d6676308 -r c9fa1a715c1b h
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
75 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
76 +++ b/h Thu Jan 01 00:00:00 1970 +0000
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
77 @@ -0,0 +1,2 @@
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
78 +foo
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
79 +bar
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
80
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
81 $ hg glog --hidden
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
82 @ 8:c9fa1a715c1b Added h
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
83 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
84 | x 7:ec2426147f0e Added h
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
85 |/
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
86 o 6:87d6d6676308 Added g
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
87 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
88 o 5:825660c69f0c Added f
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
89 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
90 o 4:aa98ab95a928 Added e
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
91 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
92 o 3:62615734edd5 Added d
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
93 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
94 o 2:28ad74487de9 Added c
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
95 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
96 o 1:29becc82797a Added b
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
97 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
98 o 0:18d04c59bb5d Added a
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
99
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
100 $ hg unamend
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
101 $ hg glog --hidden
35200
9e339c97fabb unamend: drop unused vars, query after taking lock, use ctx.hex() for extras
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35195
diff changeset
102 @ 9:46d02d47eec6 Added h
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
103 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
104 | x 8:c9fa1a715c1b Added h
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
105 |/
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
106 | x 7:ec2426147f0e Added h
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
107 |/
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
108 o 6:87d6d6676308 Added g
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
109 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
110 o 5:825660c69f0c Added f
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
111 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
112 o 4:aa98ab95a928 Added e
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
113 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
114 o 3:62615734edd5 Added d
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
115 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
116 o 2:28ad74487de9 Added c
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
117 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
118 o 1:29becc82797a Added b
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
119 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
120 o 0:18d04c59bb5d Added a
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
121
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
122 $ hg diff
35200
9e339c97fabb unamend: drop unused vars, query after taking lock, use ctx.hex() for extras
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35195
diff changeset
123 diff -r 46d02d47eec6 h
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
124 --- a/h Thu Jan 01 00:00:00 1970 +0000
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
125 +++ b/h Thu Jan 01 00:00:00 1970 +0000
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
126 @@ -1,1 +1,2 @@
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
127 foo
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
128 +bar
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
129
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
130 $ hg exp
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
131 # HG changeset patch
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
132 # User test
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
133 # Date 0 0
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
134 # Thu Jan 01 00:00:00 1970 +0000
35200
9e339c97fabb unamend: drop unused vars, query after taking lock, use ctx.hex() for extras
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35195
diff changeset
135 # Node ID 46d02d47eec6ca096b8dcab3f8f5579c40c3dd9a
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
136 # Parent 87d6d66763085b629e6d7ed56778c79827273022
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
137 Added h
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
138
35200
9e339c97fabb unamend: drop unused vars, query after taking lock, use ctx.hex() for extras
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35195
diff changeset
139 diff -r 87d6d6676308 -r 46d02d47eec6 h
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
140 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
141 +++ b/h Thu Jan 01 00:00:00 1970 +0000
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
142 @@ -0,0 +1,1 @@
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
143 +foo
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
144
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
145 $ hg status
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
146 M h
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
147
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
148 $ hg log -r . -T '{extras % "{extra}\n"}' --config alias.log=log
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
149 branch=default
35200
9e339c97fabb unamend: drop unused vars, query after taking lock, use ctx.hex() for extras
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35195
diff changeset
150 unamend_source=c9fa1a715c1b7661c0fafb362a9f30bd75878d7d
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
151
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
152 Using unamend to undo an unamed (intentional)
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
153
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
154 $ hg unamend
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
155 $ hg exp
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
156 # HG changeset patch
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
157 # User test
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
158 # Date 0 0
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
159 # Thu Jan 01 00:00:00 1970 +0000
35200
9e339c97fabb unamend: drop unused vars, query after taking lock, use ctx.hex() for extras
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35195
diff changeset
160 # Node ID 850ddfc1bc662997ec6094ada958f01f0cc8070a
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
161 # Parent 87d6d66763085b629e6d7ed56778c79827273022
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
162 Added h
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
163
35200
9e339c97fabb unamend: drop unused vars, query after taking lock, use ctx.hex() for extras
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35195
diff changeset
164 diff -r 87d6d6676308 -r 850ddfc1bc66 h
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
165 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
166 +++ b/h Thu Jan 01 00:00:00 1970 +0000
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
167 @@ -0,0 +1,2 @@
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
168 +foo
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
169 +bar
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
170 $ hg diff
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
171
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
172 Unamend on a dirty working directory
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
173
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
174 $ echo "bar" >> a
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
175 $ hg amend
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
176 $ echo "foobar" >> a
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
177 $ echo "bar" >> b
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
178 $ hg status
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
179 M a
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
180 M b
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
181
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
182 $ hg unamend
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
183
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
184 $ hg status
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
185 M a
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
186 M b
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
187
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
188 $ hg diff
35200
9e339c97fabb unamend: drop unused vars, query after taking lock, use ctx.hex() for extras
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35195
diff changeset
189 diff -r ec338db45d51 a
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
190 --- a/a Thu Jan 01 00:00:00 1970 +0000
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
191 +++ b/a Thu Jan 01 00:00:00 1970 +0000
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
192 @@ -1,1 +1,3 @@
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
193 foo
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
194 +bar
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
195 +foobar
35200
9e339c97fabb unamend: drop unused vars, query after taking lock, use ctx.hex() for extras
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35195
diff changeset
196 diff -r ec338db45d51 b
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
197 --- a/b Thu Jan 01 00:00:00 1970 +0000
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
198 +++ b/b Thu Jan 01 00:00:00 1970 +0000
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
199 @@ -1,1 +1,2 @@
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
200 foo
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
201 +bar
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
202
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
203 Unamending an added file
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
204
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
205 $ hg ci -m "Added things to a and b"
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
206 $ echo foo > bar
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
207 $ hg add bar
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
208 $ hg amend
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
209
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
210 $ hg unamend
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
211 $ hg status
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
212 A bar
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
213
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
214 $ hg revert --all
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
215 forgetting bar
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
216
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
217 Unamending a removed file
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
218
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
219 $ hg remove a
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
220 $ hg amend
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
221
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
222 $ hg unamend
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
223 $ hg status
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
224 R a
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
225 ? bar
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
226
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
227 $ hg revert --all
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
228 undeleting a
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
229
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
230 Unamending an added file with dirty wdir status
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
231
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
232 $ hg add bar
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
233 $ hg amend
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
234 $ echo bar >> bar
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
235 $ hg status
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
236 M bar
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
237
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
238 $ hg unamend
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
239 $ hg status
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
240 A bar
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
241 $ hg diff
35200
9e339c97fabb unamend: drop unused vars, query after taking lock, use ctx.hex() for extras
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35195
diff changeset
242 diff -r 7f79409af972 bar
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
243 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
244 +++ b/bar Thu Jan 01 00:00:00 1970 +0000
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
245 @@ -0,0 +1,2 @@
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
246 +foo
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
247 +bar
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
248
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
249 $ hg revert --all
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
250 forgetting bar
41337
713fbf057c7d tests: clean up after each test in test-unamend.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35709
diff changeset
251 $ rm bar
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
252
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
253 Unamending in middle of a stack
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
254
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
255 $ hg glog
35200
9e339c97fabb unamend: drop unused vars, query after taking lock, use ctx.hex() for extras
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35195
diff changeset
256 @ 19:7f79409af972 Added things to a and b
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
257 |
35200
9e339c97fabb unamend: drop unused vars, query after taking lock, use ctx.hex() for extras
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35195
diff changeset
258 o 12:ec338db45d51 Added h
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
259 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
260 o 6:87d6d6676308 Added g
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
261 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
262 o 5:825660c69f0c Added f
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
263 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
264 o 4:aa98ab95a928 Added e
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
265 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
266 o 3:62615734edd5 Added d
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
267 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
268 o 2:28ad74487de9 Added c
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
269 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
270 o 1:29becc82797a Added b
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
271 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
272 o 0:18d04c59bb5d Added a
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
273
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
274 $ hg up 5
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
275 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
276 $ echo bar >> f
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
277 $ hg amend
35709
1a09dad8b85a evolution: report new unstable changesets
Martin von Zweigbergk <martinvonz@google.com>
parents: 35435
diff changeset
278 3 new orphan changesets
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
279 $ hg rebase -s 6 -d . -q
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
280
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
281 $ hg glog
35200
9e339c97fabb unamend: drop unused vars, query after taking lock, use ctx.hex() for extras
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35195
diff changeset
282 o 23:03ddd6fc5af1 Added things to a and b
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
283 |
35200
9e339c97fabb unamend: drop unused vars, query after taking lock, use ctx.hex() for extras
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35195
diff changeset
284 o 22:3e7b64ee157b Added h
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
285 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
286 o 21:49635b68477e Added g
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
287 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
288 @ 20:93f0e8ffab32 Added f
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
289 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
290 o 4:aa98ab95a928 Added e
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
291 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
292 o 3:62615734edd5 Added d
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
293 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
294 o 2:28ad74487de9 Added c
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
295 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
296 o 1:29becc82797a Added b
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
297 |
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
298 o 0:18d04c59bb5d Added a
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
299
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
300
35435
f01101100043 unamend: allow unamending if allowunstable is set
Martin von Zweigbergk <martinvonz@google.com>
parents: 35200
diff changeset
301 $ hg --config experimental.evolution=createmarkers unamend
47070
d90f6237b3aa rewriteutil: say how many commits would become orphan if commit is rewritten
Martin von Zweigbergk <martinvonz@google.com>
parents: 47069
diff changeset
302 abort: cannot unamend changeset, as that will orphan 3 descendants
47018
7a90fddb13b0 rewriteutil: point to help about instability when rewriting creates orphan
Martin von Zweigbergk <martinvonz@google.com>
parents: 46465
diff changeset
303 (see 'hg help evolution.instability')
45853
b4694ef45db5 errors: raise more specific errors from rewriteutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45812
diff changeset
304 [10]
35435
f01101100043 unamend: allow unamending if allowunstable is set
Martin von Zweigbergk <martinvonz@google.com>
parents: 35200
diff changeset
305
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
306 $ hg unamend
35709
1a09dad8b85a evolution: report new unstable changesets
Martin von Zweigbergk <martinvonz@google.com>
parents: 35435
diff changeset
307 3 new orphan changesets
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
308
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
309 Trying to unamend a public changeset
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
310
35435
f01101100043 unamend: allow unamending if allowunstable is set
Martin von Zweigbergk <martinvonz@google.com>
parents: 35200
diff changeset
311 $ hg up -C 23
f01101100043 unamend: allow unamending if allowunstable is set
Martin von Zweigbergk <martinvonz@google.com>
parents: 35200
diff changeset
312 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
313 $ hg phase -r . -p
35709
1a09dad8b85a evolution: report new unstable changesets
Martin von Zweigbergk <martinvonz@google.com>
parents: 35435
diff changeset
314 1 new phase-divergent changesets
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
315 $ hg unamend
47069
5b6dd0d9171b rewriteutil: give examples of public changesets that can't be rewritten
Martin von Zweigbergk <martinvonz@google.com>
parents: 47020
diff changeset
316 abort: cannot unamend public changesets: 03ddd6fc5af1
35435
f01101100043 unamend: allow unamending if allowunstable is set
Martin von Zweigbergk <martinvonz@google.com>
parents: 35200
diff changeset
317 (see 'hg help phases' for details)
45853
b4694ef45db5 errors: raise more specific errors from rewriteutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 45812
diff changeset
318 [10]
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
319
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
320 Testing whether unamend retains copies or not
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
321
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
322 $ hg status
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
323
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
324 $ hg mv a foo
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
325
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
326 $ hg ci -m "Moved a to foo"
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
327 $ hg exp --git
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
328 # HG changeset patch
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
329 # User test
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
330 # Date 0 0
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
331 # Thu Jan 01 00:00:00 1970 +0000
35200
9e339c97fabb unamend: drop unused vars, query after taking lock, use ctx.hex() for extras
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35195
diff changeset
332 # Node ID cfef290346fbee5126313d7e1aab51d877679b09
9e339c97fabb unamend: drop unused vars, query after taking lock, use ctx.hex() for extras
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35195
diff changeset
333 # Parent 03ddd6fc5af19e028c44a2fd6d790dd22712f231
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
334 Moved a to foo
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
335
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
336 diff --git a/a b/foo
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
337 rename from a
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
338 rename to foo
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
339
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
340 $ hg mv b foobar
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
341 $ hg diff --git
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
342 diff --git a/b b/foobar
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
343 rename from b
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
344 rename to foobar
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
345 $ hg amend
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
346
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
347 $ hg exp --git
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
348 # HG changeset patch
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
349 # User test
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
350 # Date 0 0
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
351 # Thu Jan 01 00:00:00 1970 +0000
35200
9e339c97fabb unamend: drop unused vars, query after taking lock, use ctx.hex() for extras
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35195
diff changeset
352 # Node ID eca050985275bb271ce3092b54e56ea5c85d29a3
9e339c97fabb unamend: drop unused vars, query after taking lock, use ctx.hex() for extras
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35195
diff changeset
353 # Parent 03ddd6fc5af19e028c44a2fd6d790dd22712f231
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
354 Moved a to foo
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
355
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
356 diff --git a/a b/foo
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
357 rename from a
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
358 rename to foo
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
359 diff --git a/b b/foobar
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
360 rename from b
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
361 rename to foobar
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
362
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
363 $ hg mv c wat
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
364 $ hg unamend
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
365
49825
2f2682f40ea0 tests: use the `--quiet` flag for verify when applicable
Raphaël Gomès <rgomes@octobus.net>
parents: 48979
diff changeset
366 $ hg verify -q
44113
e77b57e09bfa verify: avoid spurious integrity warnings in verbose mode (issue6172)
Matt Harbison <matt_harbison@yahoo.com>
parents: 41341
diff changeset
367
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
368 Retained copies in new prdecessor commit
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
369
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
370 $ hg exp --git
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
371 # HG changeset patch
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
372 # User test
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
373 # Date 0 0
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
374 # Thu Jan 01 00:00:00 1970 +0000
35200
9e339c97fabb unamend: drop unused vars, query after taking lock, use ctx.hex() for extras
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35195
diff changeset
375 # Node ID 552e3af4f01f620f88ca27be1f898316235b736a
9e339c97fabb unamend: drop unused vars, query after taking lock, use ctx.hex() for extras
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35195
diff changeset
376 # Parent 03ddd6fc5af19e028c44a2fd6d790dd22712f231
35182
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
377 Moved a to foo
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
378
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
379 diff --git a/a b/foo
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
380 rename from a
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
381 rename to foo
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
382
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
383 Retained copies in working directoy
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
384
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
385 $ hg diff --git
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
386 diff --git a/b b/foobar
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
387 rename from b
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
388 rename to foobar
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
389 diff --git a/c b/wat
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
390 rename from c
867990238dc6 unamend: move fb extension unamend to core
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
391 rename to wat
41337
713fbf057c7d tests: clean up after each test in test-unamend.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35709
diff changeset
392 $ hg revert -qa
713fbf057c7d tests: clean up after each test in test-unamend.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 35709
diff changeset
393 $ rm foobar wat
41338
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
394
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
395 Rename a->b, then amend b->c. After unamend, should look like b->c.
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
396
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
397 $ hg co -q 0
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
398 $ hg mv a b
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
399 $ hg ci -qm 'move to a b'
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
400 $ hg mv b c
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
401 $ hg amend
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
402 $ hg unamend
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
403 $ hg st --copies --change .
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
404 A b
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
405 a
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
406 R a
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
407 $ hg st --copies
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
408 A c
41341
19c590ce8661 unamend: fix unamending of renamed rename
Martin von Zweigbergk <martinvonz@google.com>
parents: 41338
diff changeset
409 b
41338
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
410 R b
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
411 $ hg revert -qa
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
412 $ rm c
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
413
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
414 Rename a->b, then amend b->c, and working copy change c->d. After unamend, should look like b->d
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
415
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
416 $ hg co -q 0
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
417 $ hg mv a b
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
418 $ hg ci -qm 'move to a b'
45812
976b26bdd0d8 commit: warn the user when a commit already exists
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 44113
diff changeset
419 warning: commit already existed in the repository!
41338
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
420 $ hg mv b c
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
421 $ hg amend
45812
976b26bdd0d8 commit: warn the user when a commit already exists
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 44113
diff changeset
422 warning: commit already existed in the repository!
41338
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
423 $ hg mv c d
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
424 $ hg unamend
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
425 $ hg st --copies --change .
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
426 A b
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
427 a
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
428 R a
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
429 $ hg st --copies
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
430 A d
41341
19c590ce8661 unamend: fix unamending of renamed rename
Martin von Zweigbergk <martinvonz@google.com>
parents: 41338
diff changeset
431 b
41338
c7d425f7f5c9 tests: add more tests of uncommit/unamend with copies
Martin von Zweigbergk <martinvonz@google.com>
parents: 41337
diff changeset
432 R b
48580
f1898680d713 tests: demonstrate how `hg unamend` fails on merge commits
Martin von Zweigbergk <martinvonz@google.com>
parents: 47070
diff changeset
433
f1898680d713 tests: demonstrate how `hg unamend` fails on merge commits
Martin von Zweigbergk <martinvonz@google.com>
parents: 47070
diff changeset
434 Try to unamend a merge
f1898680d713 tests: demonstrate how `hg unamend` fails on merge commits
Martin von Zweigbergk <martinvonz@google.com>
parents: 47070
diff changeset
435
f1898680d713 tests: demonstrate how `hg unamend` fails on merge commits
Martin von Zweigbergk <martinvonz@google.com>
parents: 47070
diff changeset
436 $ cd ..
f1898680d713 tests: demonstrate how `hg unamend` fails on merge commits
Martin von Zweigbergk <martinvonz@google.com>
parents: 47070
diff changeset
437 $ hg init merge
f1898680d713 tests: demonstrate how `hg unamend` fails on merge commits
Martin von Zweigbergk <martinvonz@google.com>
parents: 47070
diff changeset
438 $ cd merge
f1898680d713 tests: demonstrate how `hg unamend` fails on merge commits
Martin von Zweigbergk <martinvonz@google.com>
parents: 47070
diff changeset
439 $ echo initial > initial
f1898680d713 tests: demonstrate how `hg unamend` fails on merge commits
Martin von Zweigbergk <martinvonz@google.com>
parents: 47070
diff changeset
440 $ hg ci -Aqm initial
f1898680d713 tests: demonstrate how `hg unamend` fails on merge commits
Martin von Zweigbergk <martinvonz@google.com>
parents: 47070
diff changeset
441 $ echo left > left
f1898680d713 tests: demonstrate how `hg unamend` fails on merge commits
Martin von Zweigbergk <martinvonz@google.com>
parents: 47070
diff changeset
442 $ hg ci -Aqm left
f1898680d713 tests: demonstrate how `hg unamend` fails on merge commits
Martin von Zweigbergk <martinvonz@google.com>
parents: 47070
diff changeset
443 $ hg co -q 0
f1898680d713 tests: demonstrate how `hg unamend` fails on merge commits
Martin von Zweigbergk <martinvonz@google.com>
parents: 47070
diff changeset
444 $ echo right > right
f1898680d713 tests: demonstrate how `hg unamend` fails on merge commits
Martin von Zweigbergk <martinvonz@google.com>
parents: 47070
diff changeset
445 $ hg ci -Aqm right
f1898680d713 tests: demonstrate how `hg unamend` fails on merge commits
Martin von Zweigbergk <martinvonz@google.com>
parents: 47070
diff changeset
446 $ hg merge -q 1
f1898680d713 tests: demonstrate how `hg unamend` fails on merge commits
Martin von Zweigbergk <martinvonz@google.com>
parents: 47070
diff changeset
447 $ hg ci -m merge
f1898680d713 tests: demonstrate how `hg unamend` fails on merge commits
Martin von Zweigbergk <martinvonz@google.com>
parents: 47070
diff changeset
448 $ echo accidental > initial
f1898680d713 tests: demonstrate how `hg unamend` fails on merge commits
Martin von Zweigbergk <martinvonz@google.com>
parents: 47070
diff changeset
449 $ hg st --rev 1 --rev .
f1898680d713 tests: demonstrate how `hg unamend` fails on merge commits
Martin von Zweigbergk <martinvonz@google.com>
parents: 47070
diff changeset
450 A right
f1898680d713 tests: demonstrate how `hg unamend` fails on merge commits
Martin von Zweigbergk <martinvonz@google.com>
parents: 47070
diff changeset
451 $ hg st --rev 2 --rev .
f1898680d713 tests: demonstrate how `hg unamend` fails on merge commits
Martin von Zweigbergk <martinvonz@google.com>
parents: 47070
diff changeset
452 A left
f1898680d713 tests: demonstrate how `hg unamend` fails on merge commits
Martin von Zweigbergk <martinvonz@google.com>
parents: 47070
diff changeset
453 $ hg amend
f1898680d713 tests: demonstrate how `hg unamend` fails on merge commits
Martin von Zweigbergk <martinvonz@google.com>
parents: 47070
diff changeset
454 $ hg unamend
48581
4f01821fa0ec unamend: error out when running on merge commit
Martin von Zweigbergk <martinvonz@google.com>
parents: 48580
diff changeset
455 abort: cannot unamend merge changeset
4f01821fa0ec unamend: error out when running on merge commit
Martin von Zweigbergk <martinvonz@google.com>
parents: 48580
diff changeset
456 [10]