Show More
@@ -103,9 +103,11 b" def fetch(ui, repo, source='default', **" | |||||
103 | try: |
|
103 | try: | |
104 | wlock = repo.wlock() |
|
104 | wlock = repo.wlock() | |
105 | lock = repo.lock() |
|
105 | lock = repo.lock() | |
106 |
mod, add, rem = repo.status()[: |
|
106 | mod, add, rem, del_ = repo.status()[:4] | |
107 | if mod or add or rem: |
|
107 | if mod or add or rem: | |
108 | raise util.Abort(_('outstanding uncommitted changes')) |
|
108 | raise util.Abort(_('outstanding uncommitted changes')) | |
|
109 | if del_: | |||
|
110 | raise util.Abort(_('working directory is missing some files')) | |||
109 | if len(repo.heads()) > 1: |
|
111 | if len(repo.heads()) > 1: | |
110 | raise util.Abort(_('multiple heads in this repository ' |
|
112 | raise util.Abort(_('multiple heads in this repository ' | |
111 | '(use "hg heads" and "hg merge" to merge)')) |
|
113 | '(use "hg heads" and "hg merge" to merge)')) |
@@ -52,5 +52,12 b" hg --cwd f ci -d '6 0' -Amf" | |||||
52 | echo g > g/g |
|
52 | echo g > g/g | |
53 | hg --cwd g ci -d '6 0' -Amg |
|
53 | hg --cwd g ci -d '6 0' -Amg | |
54 |
|
54 | |||
|
55 | hg clone -q f h | |||
|
56 | hg clone -q g i | |||
|
57 | ||||
55 | echo % should merge f into g |
|
58 | echo % should merge f into g | |
56 | hg --cwd g fetch -d '7 0' --switch -m 'automated merge' ../f |
|
59 | hg --cwd g fetch -d '7 0' --switch -m 'automated merge' ../f | |
|
60 | ||||
|
61 | rm i/g | |||
|
62 | echo % should abort, because i is modified | |||
|
63 | hg --cwd i fetch ../h |
@@ -71,3 +71,5 b' 0 files updated, 0 files merged, 0 files' | |||||
71 | merging with 3:cc6a3744834d |
|
71 | merging with 3:cc6a3744834d | |
72 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
72 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
73 | new changeset 4:55aa4f32ec59 merges remote changes with local |
|
73 | new changeset 4:55aa4f32ec59 merges remote changes with local | |
|
74 | % should abort, because i is modified | |||
|
75 | abort: working directory is missing some files |
General Comments 0
You need to be logged in to leave comments.
Login now