Show More
@@ -142,10 +142,9 b" def fetch(ui, repo, source='default', **" | |||||
142 | message = (cmdutil.logmessage(ui, opts) or |
|
142 | message = (cmdutil.logmessage(ui, opts) or | |
143 | ('Automated merge with %s' % |
|
143 | ('Automated merge with %s' % | |
144 | util.removeauth(other.url()))) |
|
144 | util.removeauth(other.url()))) | |
145 | editor = cmdutil.commiteditor |
|
145 | editopt = opts.get('edit') or opts.get('force_editor') | |
146 | if opts.get('force_editor') or opts.get('edit'): |
|
146 | n = repo.commit(message, opts['user'], opts['date'], | |
147 |
editor |
|
147 | editor=cmdutil.getcommiteditor(edit=editopt)) | |
148 | n = repo.commit(message, opts['user'], opts['date'], editor=editor) |
|
|||
149 | ui.status(_('new changeset %d:%s merges remote changes ' |
|
148 | ui.status(_('new changeset %d:%s merges remote changes ' | |
150 | 'with local\n') % (repo.changelog.rev(n), |
|
149 | 'with local\n') % (repo.changelog.rev(n), | |
151 | short(n))) |
|
150 | short(n))) |
@@ -68,8 +68,9 b' should merge c into a' | |||||
68 | $ cat a/hg.pid >> "$DAEMON_PIDS" |
|
68 | $ cat a/hg.pid >> "$DAEMON_PIDS" | |
69 |
|
69 | |||
70 | fetch over http, no auth |
|
70 | fetch over http, no auth | |
|
71 | (this also tests that editor is invoked if '--edit' is specified) | |||
71 |
|
72 | |||
72 | $ hg --cwd d fetch http://localhost:$HGPORT/ |
|
73 | $ HGEDITOR=cat hg --cwd d fetch --edit http://localhost:$HGPORT/ | |
73 | pulling from http://localhost:$HGPORT/ |
|
74 | pulling from http://localhost:$HGPORT/ | |
74 | searching for changes |
|
75 | searching for changes | |
75 | adding changesets |
|
76 | adding changesets | |
@@ -80,13 +81,29 b' fetch over http, no auth' | |||||
80 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
81 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
81 | merging with 1:d36c0562f908 |
|
82 | merging with 1:d36c0562f908 | |
82 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
83 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
84 | Automated merge with http://localhost:$HGPORT/ | |||
|
85 | ||||
|
86 | ||||
|
87 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |||
|
88 | HG: Leave message empty to abort commit. | |||
|
89 | HG: -- | |||
|
90 | HG: user: test | |||
|
91 | HG: branch merge | |||
|
92 | HG: branch 'default' | |||
|
93 | HG: changed c | |||
83 | new changeset 3:* merges remote changes with local (glob) |
|
94 | new changeset 3:* merges remote changes with local (glob) | |
84 | $ hg --cwd d tip --template '{desc}\n' |
|
95 | $ hg --cwd d tip --template '{desc}\n' | |
85 | Automated merge with http://localhost:$HGPORT/ |
|
96 | Automated merge with http://localhost:$HGPORT/ | |
|
97 | $ hg --cwd d status --rev 'tip^1' --rev tip | |||
|
98 | A c | |||
|
99 | $ hg --cwd d status --rev 'tip^2' --rev tip | |||
|
100 | A b | |||
86 |
|
101 | |||
87 | fetch over http with auth (should be hidden in desc) |
|
102 | fetch over http with auth (should be hidden in desc) | |
|
103 | (this also tests that editor is not invoked if '--edit' is not | |||
|
104 | specified, even though commit message is not specified explicitly) | |||
88 |
|
105 | |||
89 | $ hg --cwd e fetch http://user:password@localhost:$HGPORT/ |
|
106 | $ HGEDITOR=cat hg --cwd e fetch http://user:password@localhost:$HGPORT/ | |
90 | pulling from http://user:***@localhost:$HGPORT/ |
|
107 | pulling from http://user:***@localhost:$HGPORT/ | |
91 | searching for changes |
|
108 | searching for changes | |
92 | adding changesets |
|
109 | adding changesets |
General Comments 0
You need to be logged in to leave comments.
Login now