##// END OF EJS Templates
Add test case for backout on named branches (issue665)
Thomas Arendsen Hein -
r6162:554715e5 default
parent child Browse files
Show More
@@ -123,4 +123,37 b' hg update -C'
123
123
124 hg backout -d '6 0' --parent 3 4
124 hg backout -d '6 0' --parent 3 4
125
125
126 cd ..
127
128 echo '# named branches'
129
130 hg init named_branches
131 cd named_branches
132
133 echo default > default
134 hg ci -d '0 0' -Am default
135 hg branch branch1
136 echo branch1 > file1
137 hg ci -d '1 0' -Am file1
138 hg branch branch2
139 echo branch2 > file2
140 hg ci -d '2 0' -Am file2
141 hg backout -d '3 0' -r 1 -m 'backout on branch1'
142 # XXX maybe backout shouldn't suggest a merge here as it is a different branch?
143
144 echo '% on branch2 with branch1 not merged, so file1 should still exist:'
145 hg id
146 hg st -A
147
148 echo '% on branch2 with branch1 merged, so file1 should be gone:'
149 hg merge
150 hg ci -d '4 0' -m 'merge backout of branch1'
151 hg id
152 hg st -A
153
154 echo '% on branch1, so no file1 and file2:'
155 hg co -C branch1
156 hg id
157 hg st -A
158
126 exit 0
159 exit 0
@@ -62,3 +62,28 b' rolling back last transaction'
62 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
62 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
63 removing c
63 removing c
64 changeset 5:033590168430 backs out changeset 4:b2f3bb92043e
64 changeset 5:033590168430 backs out changeset 4:b2f3bb92043e
65 # named branches
66 adding default
67 marked working directory as branch branch1
68 adding file1
69 marked working directory as branch branch2
70 adding file2
71 removing file1
72 changeset 3:f1c642b1d8e5 backs out changeset 1:bf1602f437f3
73 the backout changeset is a new head - do not forget to merge
74 (use "backout --merge" if you want to auto-merge)
75 % on branch2 with branch1 not merged, so file1 should still exist:
76 45bbcd363bf0 (branch2)
77 C default
78 C file1
79 C file2
80 % on branch2 with branch1 merged, so file1 should be gone:
81 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
82 (branch merge, don't forget to commit)
83 21d4dc6f9a41 (branch2) tip
84 C default
85 C file2
86 % on branch1, so no file1 and file2:
87 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
88 f1c642b1d8e5 (branch1)
89 C default
General Comments 0
You need to be logged in to leave comments. Login now