comparison tests/test-tag.t @ 13134:ea3c93b53fdb stable

tag: fix uncommitted merge check and error message (issue2542) This patch corrects the check for tagging on an uncommitted merge. We should never commit a new tag changeset on an uncommitted merge, whether or not --rev is specified. It also changes the error message from: abort: cannot partially commit a merge (do not specify files or patterns) to the much more accurate (and terse): abort: uncommitted merge Local tags are ok.
author Kevin Bullock <kbullock@ringworld.org>
date Tue, 07 Dec 2010 08:02:54 +0100
parents c1492615cdee
children 1c1ca9d393f4
comparison
equal deleted inserted replaced
13133:c1492615cdee 13134:ea3c93b53fdb
206 M .hgtags 206 M .hgtags
207 ? .hgtags.orig 207 ? .hgtags.orig
208 ? editor 208 ? editor
209 $ hg tag --local baz 209 $ hg tag --local baz
210 $ hg revert --no-backup .hgtags 210 $ hg revert --no-backup .hgtags
211
212 $ cd ..
213
214 tagging on an uncommitted merge (issue2542)
215
216 $ hg init repo-tag-uncommitted-merge
217 $ cd repo-tag-uncommitted-merge
218 $ echo c1 > f1
219 $ hg ci -Am0
220 adding f1
221 $ hg branch b1
222 marked working directory as branch b1
223 $ echo c2 >> f1
224 $ hg ci -m1
225 $ hg up default
226 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
227 $ hg merge b1
228 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
229 (branch merge, don't forget to commit)
230
231 $ hg tag t1
232 abort: uncommitted merge
233 [255]
234 $ hg status
235 M f1
236 $ hg tag --rev 1 t2
237 abort: uncommitted merge
238 [255]
239 $ hg tag --rev 1 --local t3
240 $ hg tags -v
241 tip 1:9466ada9ee90
242 t3 1:9466ada9ee90 local
243
244 $ cd ..