Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 2022:a59da8cc35e4
New option -i/--ignored for 'hg status' to show ignored files.
localrepo.changes() now returns an additional list of ignored files if
it is called with show_ignored=True.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Wed, 29 Mar 2006 22:58:34 +0200 |
parents | fc22ed56afe3 |
children | d436b21b20dc |
line wrap: on
line diff
--- a/mercurial/localrepo.py Wed Mar 29 22:35:21 2006 +0200 +++ b/mercurial/localrepo.py Wed Mar 29 22:58:34 2006 +0200 @@ -498,7 +498,7 @@ yield src, fn def changes(self, node1=None, node2=None, files=[], match=util.always, - wlock=None): + wlock=None, show_ignored=None): """return changes between two nodes or node and working directory If node1 is None, use the first dirstate parent instead. @@ -531,8 +531,8 @@ wlock = self.wlock(wait=0) except lock.LockException: wlock = None - lookup, modified, added, removed, deleted, unknown = ( - self.dirstate.changes(files, match)) + lookup, modified, added, removed, deleted, unknown, ignored = ( + self.dirstate.changes(files, match, show_ignored)) # are we comparing working dir against its parent? if not node1: @@ -555,7 +555,7 @@ del mf2[f] else: # we are comparing two revisions - deleted, unknown = [], [] + deleted, unknown, ignored = [], [], [] mf2 = mfmatches(node2) if node1: @@ -573,9 +573,12 @@ removed = mf1.keys() # sort and return results: - for l in modified, added, removed, deleted, unknown: + for l in modified, added, removed, deleted, unknown, ignored: l.sort() - return (modified, added, removed, deleted, unknown) + if show_ignored is None: + return (modified, added, removed, deleted, unknown) + else: + return (modified, added, removed, deleted, unknown, ignored) def add(self, list, wlock=None): if not wlock: