Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/context.py @ 21665:d2743be1bb06
memctx: inherit from committablectx
This patch marks the start of having memctx inherit from committablectx,
thereby making it a full-fledged context that will eventually grow the ability
to perform diffing and also merging.
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Thu, 15 Aug 2013 15:00:03 -0500 |
parents | 151a992c3874 |
children | 31bdc51b0f1e |
comparison
equal
deleted
inserted
replaced
21664:151a992c3874 | 21665:d2743be1bb06 |
---|---|
1529 """ | 1529 """ |
1530 # fctx should be a filectx (not a workingfilectx) | 1530 # fctx should be a filectx (not a workingfilectx) |
1531 # invert comparison to reuse the same code path | 1531 # invert comparison to reuse the same code path |
1532 return fctx.cmp(self) | 1532 return fctx.cmp(self) |
1533 | 1533 |
1534 class memctx(object): | 1534 class memctx(committablectx): |
1535 """Use memctx to perform in-memory commits via localrepo.commitctx(). | 1535 """Use memctx to perform in-memory commits via localrepo.commitctx(). |
1536 | 1536 |
1537 Revision information is supplied at initialization time while | 1537 Revision information is supplied at initialization time while |
1538 related files data and is made available through a callback | 1538 related files data and is made available through a callback |
1539 mechanism. 'repo' is the current localrepo, 'parents' is a | 1539 mechanism. 'repo' is the current localrepo, 'parents' is a |