Show More
@@ -384,9 +384,13 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 |
|
|
388 | raise util.Abort(_("update spans branches, use 'hg merge' " | |
|
389 | "or 'hg update -C' to lose changes")) | |
|
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 | |
|
390 | 394 | if branchmerge and not forcemerge: |
|
391 | 395 | if wc.modified() or wc.added() or wc.removed(): |
|
392 | 396 | raise util.Abort(_("outstanding uncommitted changes")) |
@@ -12,9 +12,13 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 | |
|
15 | 17 | # in theory, we shouldn't need the "-y" below, but it prevents |
|
16 | 18 | # this test from hanging when "hg update" erroneously prompts the |
|
17 | 19 | # user for "keep or delete" |
|
20 | hg update -y 1 # should fail (unclean repo) | |
|
21 | hg revert a | |
|
18 | 22 | hg update -y 1 |
|
19 | 23 | |
|
20 | 24 | exit 0 |
@@ -1,3 +1,4 b'' | |||
|
1 | 1 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
2 | 2 | removing b |
|
3 |
abort: |
|
|
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 |
@@ -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: |
|
|
96 | abort: outstanding uncommited changes, use '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