diff --git a/hgext/inotify/__init__.py b/hgext/inotify/__init__.py --- a/hgext/inotify/__init__.py +++ b/hgext/inotify/__init__.py @@ -47,13 +47,12 @@ def reposetup(ui, repo): # to recurse. inotifyserver = False - def status(self, match, list_ignored, list_clean, - list_unknown=True): + def status(self, match, ignored, clean, unknown=True): files = match.files() try: - if not list_ignored and not self.inotifyserver: + if not ignored and not self.inotifyserver: result = client.query(ui, repo, files, match, False, - list_clean, list_unknown) + clean, unknown) if result is not None: return result except socket.error, err: @@ -82,15 +81,14 @@ def reposetup(ui, repo): if query: try: return query(ui, repo, files or [], match, - list_ignored, list_clean, list_unknown) + ignored, clean, unknown) except socket.error, err: ui.warn(_('could not talk to new inotify ' 'server: %s\n') % err[1]) ui.print_exc() return super(inotifydirstate, self).status( - match, list_ignored, list_clean, - list_unknown) + match, ignored, clean, unknown) repo.dirstate.__class__ = inotifydirstate diff --git a/hgext/inotify/client.py b/hgext/inotify/client.py --- a/hgext/inotify/client.py +++ b/hgext/inotify/client.py @@ -11,7 +11,7 @@ from mercurial import ui import common import os, select, socket, stat, struct, sys -def query(ui, repo, names, match, list_ignored, list_clean, list_unknown=True): +def query(ui, repo, names, match, ignored, clean, unknown=True): sock = socket.socket(socket.AF_UNIX) sockpath = repo.join('inotify.sock') sock.connect(sockpath) @@ -20,10 +20,10 @@ def query(ui, repo, names, match, list_i for n in names or []: yield n states = 'almrx!' - if list_ignored: + if ignored: raise ValueError('this is insanity') - if list_clean: states += 'n' - if list_unknown: states += '?' + if clean: states += 'n' + if unknown: states += '?' yield states req = '\0'.join(genquery()) diff --git a/hgext/keyword.py b/hgext/keyword.py --- a/hgext/keyword.py +++ b/hgext/keyword.py @@ -258,7 +258,7 @@ def _status(ui, repo, kwt, *pats, **opts Returns status of working directory.''' if kwt: matcher = cmdutil.match(repo, pats, opts) - return repo.status(match=matcher, list_clean=True) + return repo.status(match=matcher, clean=True) if ui.configitems('keyword'): raise util.Abort(_('[keyword] patterns cannot match')) raise util.Abort(_('no [keyword] patterns configured')) diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -629,7 +629,9 @@ class dirstate(object): if imatch(k): yield 'm', k, None - def status(self, match, list_ignored, list_clean, list_unknown): + def status(self, match, ignored, clean, unknown): + listignored, listclean, listunknown = ignored, clean, unknown + lookup, modified, added, unknown, ignored = [], [], [], [], [] removed, deleted, clean = [], [], [] @@ -646,13 +648,12 @@ class dirstate(object): dadd = deleted.append cadd = clean.append - for src, fn, st in self.statwalk(match, unknown=list_unknown, - ignored=list_ignored): + for src, fn, st in self.statwalk(match, listunknown, listignored): if fn not in dmap: - if (list_ignored or match.exact(fn)) and self._dirignore(fn): - if list_ignored: + if (listignored or match.exact(fn)) and self._dirignore(fn): + if listignored: iadd(fn) - elif list_unknown: + elif listunknown: uadd(fn) continue @@ -685,7 +686,7 @@ class dirstate(object): madd(fn) elif time != int(st.st_mtime): ladd(fn) - elif list_clean: + elif listclean: cadd(fn) elif state == 'm': madd(fn) diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -972,7 +972,7 @@ class localrepository(repo.repository): yield fn def status(self, node1=None, node2=None, match=None, - list_ignored=False, list_clean=False, list_unknown=True): + ignored=False, clean=False, unknown=True): """return status of files between two nodes or node and working directory If node1 is None, use the first dirstate parent instead. @@ -994,6 +994,7 @@ class localrepository(repo.repository): if not match: match = match_.always(self.root, self.getcwd()) + listignored, listclean, listunknown = ignored, clean, unknown modified, added, removed, deleted, unknown = [], [], [], [], [] ignored, clean = [], [] @@ -1010,8 +1011,8 @@ class localrepository(repo.repository): # are we comparing the working directory? if not node2: (lookup, modified, added, removed, deleted, unknown, - ignored, clean) = self.dirstate.status(match, list_ignored, - list_clean, list_unknown) + ignored, clean) = self.dirstate.status(match, listignored, + listclean, listunknown) # are we comparing working dir against its parent? if compareworking: if lookup: @@ -1025,7 +1026,7 @@ class localrepository(repo.repository): modified.append(f) else: fixup.append(f) - if list_clean: + if listclean: clean.append(f) # update dirstate for files that are actually clean @@ -1073,7 +1074,7 @@ class localrepository(repo.repository): (mf1[fn] != mf2[fn] and (mf2[fn] != "" or fcmp(fn, getnode)))): modified.append(fn) - elif list_clean: + elif listclean: clean.append(fn) del mf1[fn] else: