##// END OF EJS Templates
context: add workingcommitctx for exact context to be committed...
FUJIWARA Katsunori -
r23710:745e3b48 default
parent child Browse files
Show More
@@ -1622,6 +1622,18 b' class workingfilectx(committablefilectx)'
1622 """wraps repo.wwrite"""
1622 """wraps repo.wwrite"""
1623 self._repo.wwrite(self._path, data, flags)
1623 self._repo.wwrite(self._path, data, flags)
1624
1624
1625 class workingcommitctx(workingctx):
1626 """A workingcommitctx object makes access to data related to
1627 the revision being committed convenient.
1628
1629 This hides changes in the working directory, if they aren't
1630 committed in this context.
1631 """
1632 def __init__(self, repo, changes,
1633 text="", user=None, date=None, extra=None):
1634 super(workingctx, self).__init__(repo, text, user, date, extra,
1635 changes)
1636
1625 class memctx(committablectx):
1637 class memctx(committablectx):
1626 """Use memctx to perform in-memory commits via localrepo.commitctx().
1638 """Use memctx to perform in-memory commits via localrepo.commitctx().
1627
1639
@@ -1343,7 +1343,8 b' class localrepository(object):'
1343 elif f not in self.dirstate:
1343 elif f not in self.dirstate:
1344 fail(f, _("file not tracked!"))
1344 fail(f, _("file not tracked!"))
1345
1345
1346 cctx = context.workingctx(self, text, user, date, extra, status)
1346 cctx = context.workingcommitctx(self, status,
1347 text, user, date, extra)
1347
1348
1348 if (not force and not extra.get("close") and not merge
1349 if (not force and not extra.get("close") and not merge
1349 and not cctx.files()
1350 and not cctx.files()
General Comments 0
You need to be logged in to leave comments. Login now