##// END OF EJS Templates
overlayworkingctx: rename misleadingly named `isempty()` method...
Manuel Jacob -
r45647:83f75f1e default
parent child Browse files
Show More
@@ -1427,8 +1427,10 b' def externalparent(repo, state, destance'
1427 def commitmemorynode(repo, wctx, editor, extra, user, date, commitmsg):
1427 def commitmemorynode(repo, wctx, editor, extra, user, date, commitmsg):
1428 '''Commit the memory changes with parents p1 and p2.
1428 '''Commit the memory changes with parents p1 and p2.
1429 Return node of committed revision.'''
1429 Return node of committed revision.'''
1430 # Replicates the empty check in ``repo.commit``.
1430 # FIXME: make empty commit check consistent with ``repo.commit``
1431 if wctx.isempty() and not repo.ui.configbool(b'ui', b'allowemptycommit'):
1431 if wctx.nofilechanges() and not repo.ui.configbool(
1432 b'ui', b'allowemptycommit'
1433 ):
1432 return None
1434 return None
1433
1435
1434 # By convention, ``extra['branch']`` (set by extrafn) clobbers
1436 # By convention, ``extra['branch']`` (set by extrafn) clobbers
@@ -2519,7 +2519,7 b' class overlayworkingctx(committablectx):'
2519 def isdirty(self, path):
2519 def isdirty(self, path):
2520 return path in self._cache
2520 return path in self._cache
2521
2521
2522 def isempty(self):
2522 def nofilechanges(self):
2523 # We need to discard any keys that are actually clean before the empty
2523 # We need to discard any keys that are actually clean before the empty
2524 # commit check.
2524 # commit check.
2525 self._compact()
2525 self._compact()
General Comments 0
You need to be logged in to leave comments. Login now