Skip to content
Snippets Groups Projects
Commit 4c1aa6af authored by Matt Mackall's avatar Matt Mackall
Browse files

Merge with crew

parents 210ee620 bd61e44e
No related merge requests found
......@@ -65,5 +65,6 @@
message = (cmdutil.logmessage(opts) or
(_('Automated merge with %s') %
util.removeauth(other.url())))
force_editor = opts.get('force_editor') or opts.get('edit')
n = repo.commit(mod + add + rem, message,
opts['user'], opts['date'],
......@@ -68,6 +69,6 @@
n = repo.commit(mod + add + rem, message,
opts['user'], opts['date'],
force_editor=opts.get('force_editor'))
force_editor=force_editor)
ui.status(_('new changeset %d:%s merges remote changes '
'with local\n') % (repo.changelog.rev(n),
short(n)))
......@@ -102,6 +103,6 @@
try:
wlock = repo.wlock()
lock = repo.lock()
mod, add, rem = repo.status()[:3]
mod, add, rem, del_ = repo.status()[:4]
if mod or add or rem:
raise util.Abort(_('outstanding uncommitted changes'))
......@@ -106,5 +107,7 @@
if mod or add or rem:
raise util.Abort(_('outstanding uncommitted changes'))
if del_:
raise util.Abort(_('working directory is missing some files'))
if len(repo.heads()) > 1:
raise util.Abort(_('multiple heads in this repository '
'(use "hg heads" and "hg merge" to merge)'))
......@@ -116,7 +119,8 @@
'fetch':
(fetch,
[('r', 'rev', [], _('a specific revision you would like to pull')),
('f', 'force-editor', None, _('edit commit message')),
('e', 'edit', None, _('edit commit message')),
('', 'force-editor', None, _('edit commit message (DEPRECATED)')),
('', 'switch-parent', None, _('switch parents when merging')),
] + commands.commitopts + commands.commitopts2 + commands.remoteopts,
_('hg fetch [SOURCE]')),
......
......@@ -52,5 +52,8 @@
echo g > g/g
hg --cwd g ci -d '6 0' -Amg
hg clone -q f h
hg clone -q g i
echo % should merge f into g
hg --cwd g fetch -d '7 0' --switch -m 'automated merge' ../f
......@@ -55,2 +58,6 @@
echo % should merge f into g
hg --cwd g fetch -d '7 0' --switch -m 'automated merge' ../f
rm i/g
echo % should abort, because i is modified
hg --cwd i fetch ../h
......@@ -71,3 +71,5 @@
merging with 3:cc6a3744834d
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
new changeset 4:55aa4f32ec59 merges remote changes with local
% should abort, because i is modified
abort: working directory is missing some files
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment