##// END OF EJS Templates
Benoit Boissinot -
r3592:fffc8a73 default
parent child Browse files
Show More
@@ -384,13 +384,9 b' def update(repo, node, branchmerge, forc'
384 384 if branchmerge:
385 385 raise util.Abort(_("there is nothing to merge, just use "
386 386 "'hg update' or look at 'hg heads'"))
387 elif not branchmerge:
388 if not overwrite:
389 if wc.files():
390 raise util.Abort(_("outstanding uncommited changes, use "
391 "'hg update -C' to lose changes"))
392 else:
393 overwrite = True
387 elif not (overwrite or branchmerge):
388 raise util.Abort(_("update spans branches, use 'hg merge' "
389 "or 'hg update -C' to lose changes"))
394 390 if branchmerge and not forcemerge:
395 391 if wc.modified() or wc.added() or wc.removed():
396 392 raise util.Abort(_("outstanding uncommitted changes"))
@@ -12,13 +12,9 b' hg commit -m"comment #1" -d "1000000 0"'
12 12 hg update 0
13 13 rm b
14 14 hg commit -A -m"comment #2" -d "1000000 0"
15
16 echo This is file a > a
17 15 # in theory, we shouldn't need the "-y" below, but it prevents
18 16 # this test from hanging when "hg update" erroneously prompts the
19 17 # user for "keep or delete"
20 hg update -y 1 # should fail (unclean repo)
21 hg revert a
22 18 hg update -y 1
23 19
24 20 exit 0
@@ -1,4 +1,3 b''
1 1 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
2 2 removing b
3 abort: outstanding uncommited changes, use 'hg update -C' to lose changes
4 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3 abort: update spans branches, use 'hg merge' or 'hg update -C' to lose changes
@@ -93,7 +93,7 b' user: test'
93 93 date: Mon Jan 12 13:46:40 1970 +0000
94 94 summary: 2
95 95
96 abort: outstanding uncommited changes, use 'hg update -C' to lose changes
96 abort: update spans branches, use 'hg merge' or 'hg update -C' to lose changes
97 97 failed
98 98 abort: outstanding uncommitted changes
99 99 failed
General Comments 0
You need to be logged in to leave comments. Login now