Show More
@@ -481,6 +481,14 b' class basectx(object):' | |||||
481 | '%s does not implement mergestate()' % self.__class__ |
|
481 | '%s does not implement mergestate()' % self.__class__ | |
482 | ) |
|
482 | ) | |
483 |
|
483 | |||
|
484 | def isempty(self): | |||
|
485 | return not ( | |||
|
486 | len(self.parents()) > 1 | |||
|
487 | or self.branch() != self.p1().branch() | |||
|
488 | or self.closesbranch() | |||
|
489 | or self.files() | |||
|
490 | ) | |||
|
491 | ||||
484 |
|
492 | |||
485 | class changectx(basectx): |
|
493 | class changectx(basectx): | |
486 | """A changecontext object makes access to data related to a particular |
|
494 | """A changecontext object makes access to data related to a particular |
@@ -2995,14 +2995,9 b' class localrepository(object):' | |||||
2995 | mergeutil.checkunresolved(ms) |
|
2995 | mergeutil.checkunresolved(ms) | |
2996 |
|
2996 | |||
2997 | # internal config: ui.allowemptycommit |
|
2997 | # internal config: ui.allowemptycommit | |
2998 | allowemptycommit = ( |
|
2998 | if cctx.isempty() and not self.ui.configbool( | |
2999 | cctx.branch() != cctx.p1().branch() |
|
2999 | b'ui', b'allowemptycommit' | |
3000 | or extra.get(b'close') |
|
3000 | ): | |
3001 | or merge |
|
|||
3002 | or cctx.files() |
|
|||
3003 | or self.ui.configbool(b'ui', b'allowemptycommit') |
|
|||
3004 | ) |
|
|||
3005 | if not allowemptycommit: |
|
|||
3006 | self.ui.debug(b'nothing to commit, clearing merge state\n') |
|
3001 | self.ui.debug(b'nothing to commit, clearing merge state\n') | |
3007 | ms.reset() |
|
3002 | ms.reset() | |
3008 | return None |
|
3003 | return None |
General Comments 0
You need to be logged in to leave comments.
Login now