[PATCH 1 of 3] inotify: files is always a list: 'files or []' is redundant
Nicolas Dumazet
nicdumz at gmail.com
Wed Apr 8 05:17:58 UTC 2009
# HG changeset patch
# User Nicolas Dumazet <nicdumz.commits at gmail.com>
# Date 1239164848 -32400
# Node ID 31f842e68e3427c2bf4df166c77dd8f4d37a45ee
# Parent 685ce2f7ee35dfe29d296f80ba2dff124a1caa63
inotify: files is always a list: 'files or []' is redundant
files comes from match.files() : it always returns a list.
diff --git a/hgext/inotify/__init__.py b/hgext/inotify/__init__.py
--- a/hgext/inotify/__init__.py
+++ b/hgext/inotify/__init__.py
@@ -96,7 +96,7 @@
'%s\n') % inst)
if query:
try:
- return query(ui, repo, files or [], match,
+ return query(ui, repo, files, match,
ignored, clean, unknown)
except socket.error, err:
ui.warn(_('could not talk to new inotify '
diff --git a/hgext/inotify/client.py b/hgext/inotify/client.py
--- a/hgext/inotify/client.py
+++ b/hgext/inotify/client.py
@@ -23,7 +23,7 @@
raise
def genquery():
- for n in names or []:
+ for n in names:
yield n
states = 'almrx!'
if ignored:
More information about the Mercurial-devel
mailing list