D6367: context: add modified(), added(), removed() to changectx too
yuja (Yuya Nishihara)
phabricator at mercurial-scm.org
Sat May 11 23:07:50 EDT 2019
yuja added a comment.
> + def modified(self):
> + modified = set(self.files())
> + modified.difference_update(self.added())
> + modified.difference_update(self.removed())
> + return sorted(modified)
> + def added(self):
> + added = []
> + for f in self.files():
> + if not any(f in p for p in self.parents()):
> + added.append(f)
> + return added
> + def removed(self):
> + removed = []
> + for f in self.files():
> + if f not in self:
> + removed.append(f)
> + return removed
Do these definitions agree with the committablectx ones?
I think the committablectx calculates them based on the status from p1.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D6367
To: martinvonz, #hg-reviewers
Cc: yuja, mercurial-devel
More information about the Mercurial-devel
mailing list