Mercurial > hg
comparison mercurial/context.py @ 34343:255c761a52db
dirstate: use keyword arguments to clarify walk()'s callers
The arguments are especially non-obvious because the order is
different from dirstate.status().
Differential Revision: https://phab.mercurial-scm.org/D846
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 29 Sep 2017 14:19:36 -0700 |
parents | 0fa781320203 |
children | ac0cd81e2f83 |
comparison
equal
deleted
inserted
replaced
34342:b3538c03a804 | 34343:255c761a52db |
---|---|
1476 """return the "best" ancestor context of self and c2""" | 1476 """return the "best" ancestor context of self and c2""" |
1477 return self._parents[0].ancestor(c2) # punt on two parents for now | 1477 return self._parents[0].ancestor(c2) # punt on two parents for now |
1478 | 1478 |
1479 def walk(self, match): | 1479 def walk(self, match): |
1480 '''Generates matching file names.''' | 1480 '''Generates matching file names.''' |
1481 return sorted(self._repo.dirstate.walk(match, sorted(self.substate), | 1481 return sorted(self._repo.dirstate.walk(match, |
1482 True, False)) | 1482 subrepos=sorted(self.substate), |
1483 unknown=True, ignored=False)) | |
1483 | 1484 |
1484 def matches(self, match): | 1485 def matches(self, match): |
1485 return sorted(self._repo.dirstate.matches(match)) | 1486 return sorted(self._repo.dirstate.matches(match)) |
1486 | 1487 |
1487 def ancestors(self): | 1488 def ancestors(self): |