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