##// END OF EJS Templates
commit: when committing the results of a merge, it's all or nothing...
Bryan O'Sullivan -
r6385:0d4e068e default
parent child Browse files
Show More
@@ -67,7 +67,7 b" def fetch(ui, repo, source='default', **"
67 67 util.removeauth(other.url())))
68 68 force_editor = opts.get('force_editor') or opts.get('edit')
69 69 n = repo.commit(mod + add + rem, message,
70 opts['user'], opts['date'],
70 opts['user'], opts['date'], force=True,
71 71 force_editor=force_editor)
72 72 ui.status(_('new changeset %d:%s merges remote changes '
73 73 'with local\n') % (repo.changelog.rev(n),
@@ -539,6 +539,9 b' def commit(ui, repo, *pats, **opts):'
539 539 If a list of files is omitted, all changes reported by "hg status"
540 540 will be committed.
541 541
542 If you are committing the result of a merge, do not provide any
543 file names or -I/-X filters.
544
542 545 If no commit message is specified, the configured editor is started to
543 546 enter a message.
544 547
@@ -781,6 +781,11 b' class localrepository(repo.repository):'
781 781 if use_dirstate:
782 782 p1, p2 = self.dirstate.parents()
783 783 update_dirstate = True
784
785 if (not force and p2 != nullid and
786 (files or match != util.always)):
787 raise util.Abort(_('cannot partially commit a merge '
788 '(do not specify files or patterns)'))
784 789 else:
785 790 p1, p2 = p1, p2 or nullid
786 791 update_dirstate = (self.dirstate.parents()[0] == p1)
@@ -82,7 +82,7 b' commit()'
82 82 fi
83 83 echo $rev > $rev
84 84 hg add $rev
85 hg ci -d "$rev 0" -m "($rev) $msg" $rev
85 hg rawcommit -q -d "$rev 0" -m "($rev) $msg" $rev
86 86 }
87 87
88 88 echo "[extensions]" >> $HGRCPATH
@@ -1,11 +1,41 b''
1 1 % init
2 2 % empty repo
3 3 % building tree
4 created new head
5 created new head
6 created new head
7 created new head
8 created new head
4 (the rawcommit command is deprecated)
5 (the rawcommit command is deprecated)
6 (the rawcommit command is deprecated)
7 (the rawcommit command is deprecated)
8 (the rawcommit command is deprecated)
9 (the rawcommit command is deprecated)
10 (the rawcommit command is deprecated)
11 (the rawcommit command is deprecated)
12 (the rawcommit command is deprecated)
13 (the rawcommit command is deprecated)
14 (the rawcommit command is deprecated)
15 (the rawcommit command is deprecated)
16 (the rawcommit command is deprecated)
17 (the rawcommit command is deprecated)
18 (the rawcommit command is deprecated)
19 (the rawcommit command is deprecated)
20 (the rawcommit command is deprecated)
21 (the rawcommit command is deprecated)
22 (the rawcommit command is deprecated)
23 (the rawcommit command is deprecated)
24 (the rawcommit command is deprecated)
25 (the rawcommit command is deprecated)
26 (the rawcommit command is deprecated)
27 (the rawcommit command is deprecated)
28 (the rawcommit command is deprecated)
29 (the rawcommit command is deprecated)
30 (the rawcommit command is deprecated)
31 (the rawcommit command is deprecated)
32 (the rawcommit command is deprecated)
33 (the rawcommit command is deprecated)
34 (the rawcommit command is deprecated)
35 (the rawcommit command is deprecated)
36 (the rawcommit command is deprecated)
37 (the rawcommit command is deprecated)
38 (the rawcommit command is deprecated)
9 39 % glog -q
10 40 @ 34:0eed7cd895e0
11 41 |
@@ -16,7 +16,7 b' commit()'
16 16
17 17 echo >> foo
18 18
19 hg commit -d '0 0' -qAm "$msg" foo
19 hg commit -d '0 0' -qAm "$msg"
20 20 }
21 21
22 22 hg init repo
General Comments 0
You need to be logged in to leave comments. Login now