Show More
@@ -79,9 +79,11 b" def fetch(ui, repo, source='default', **" | |||||
79 | ui.status(_('pulling from %s\n') % |
|
79 | ui.status(_('pulling from %s\n') % | |
80 | util.hidepassword(ui.expandpath(source))) |
|
80 | util.hidepassword(ui.expandpath(source))) | |
81 | revs = None |
|
81 | revs = None | |
82 |
if opts['rev'] |
|
82 | if opts['rev']: | |
83 | raise util.Abort(_("fetch -r doesn't work for remote repositories yet")) |
|
83 | if not other.local(): | |
84 | elif opts['rev']: |
|
84 | raise util.Abort(_("fetch -r doesn't work for remote " | |
|
85 | "repositories yet")) | |||
|
86 | else: | |||
85 | revs = [other.lookup(rev) for rev in opts['rev']] |
|
87 | revs = [other.lookup(rev) for rev in opts['rev']] | |
86 | modheads = repo.pull(other, heads=revs) |
|
88 | modheads = repo.pull(other, heads=revs) | |
87 | return postincoming(other, modheads) |
|
89 | return postincoming(other, modheads) |
@@ -24,6 +24,10 b" hg --cwd c commit -d '3 0' -Amc" | |||||
24 | hg clone c d |
|
24 | hg clone c d | |
25 | hg clone c e |
|
25 | hg clone c e | |
26 |
|
26 | |||
|
27 | # We cannot use the default commit message if fetching from a local | |||
|
28 | # repo, because the path of the repo will be included in the commit | |||
|
29 | # message, making every commit appear different. | |||
|
30 | ||||
27 | echo % should merge c into a |
|
31 | echo % should merge c into a | |
28 | hg --cwd c fetch -d '4 0' -m 'automated merge' ../a |
|
32 | hg --cwd c fetch -d '4 0' -m 'automated merge' ../a | |
29 | ls c |
|
33 | ls c | |
@@ -49,4 +53,4 b' echo g > g/g' | |||||
49 | hg --cwd g ci -d '6 0' -Amg |
|
53 | hg --cwd g ci -d '6 0' -Amg | |
50 |
|
54 | |||
51 | echo % should merge f into g |
|
55 | echo % should merge f into g | |
52 | hg --cwd g fetch --switch ../f |
|
56 | hg --cwd g fetch -d '7 0' --switch -m 'automated merge' ../f |
@@ -70,4 +70,4 b' added 1 changesets with 1 changes to 1 f' | |||||
70 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
70 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
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: |
|
73 | new changeset 4:55aa4f32ec59 merges remote changes with local |
General Comments 0
You need to be logged in to leave comments.
Login now