Show More
@@ -798,10 +798,10 b' class localrepository(repo.repository):' | |||
|
798 | 798 | |
|
799 | 799 | wlock = self.wlock() |
|
800 | 800 | try: |
|
801 | p1, p2 = self.dirstate.parents() | |
|
802 | 801 | wctx = self[None] |
|
802 | merge = len(wctx.parents()) > 1 | |
|
803 | 803 | |
|
804 |
if (not force and |
|
|
804 | if (not force and merge and match and | |
|
805 | 805 | (match.files() or match.anypats())): |
|
806 | 806 | raise util.Abort(_('cannot partially commit a merge ' |
|
807 | 807 | '(do not specify files or patterns)')) |
@@ -841,9 +841,9 b' class localrepository(repo.repository):' | |||
|
841 | 841 | elif f not in self.dirstate: |
|
842 | 842 | fail(f, _("file not tracked!")) |
|
843 | 843 | |
|
844 |
if (not force and not extra.get("close") and |
|
|
844 | if (not force and not extra.get("close") and not merge | |
|
845 | 845 | and not (changes[0] or changes[1] or changes[2]) |
|
846 |
and |
|
|
846 | and wctx.branch() == wctx.p1().branch()): | |
|
847 | 847 | return None |
|
848 | 848 | |
|
849 | 849 | ms = mergemod.mergestate(self) |
@@ -873,8 +873,9 b' class localrepository(repo.repository):' | |||
|
873 | 873 | msgfile.write(cctx._text) |
|
874 | 874 | msgfile.close() |
|
875 | 875 | |
|
876 | p1, p2 = self.dirstate.parents() | |
|
877 | hookp1, hookp2 = hex(p1), (p2 != nullid and hex(p2) or '') | |
|
876 | 878 | try: |
|
877 | hookp1, hookp2 = hex(p1), (p2 != nullid and hex(p2) or '') | |
|
878 | 879 | self.hook("precommit", throw=True, parent1=hookp1, parent2=hookp2) |
|
879 | 880 | ret = self.commitctx(cctx, True) |
|
880 | 881 | except: |
General Comments 0
You need to be logged in to leave comments.
Login now