--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -1146,7 +1146,8 @@ class queue:
for f in files:
fl = os.path.join(d, f)
if (fl not in self.series and
- fl not in (self.status_path, self.series_path)
+ fl not in (self.status_path, self.series_path,
+ self.guards_path)
and not fl.startswith('.')):
msng_list.append(fl)
msng_list.sort()
--- a/tests/test-mq-guards
+++ b/tests/test-mq-guards
@@ -143,3 +143,8 @@ for patch in `hg qseries`; do
echo % hg qunapplied $patch
hg qunapplied $patch
done
+
+echo % hg qseries -m: only b.patch should be shown
+echo the guards file was not ignored in the past
+hg qdelete -k b.patch
+hg qseries -m
--- a/tests/test-mq-guards.out
+++ b/tests/test-mq-guards.out
@@ -174,3 +174,6 @@ d.patch
new.patch
c.patch
% hg qunapplied d.patch
+% hg qseries -m: only b.patch should be shown
+the guards file was not ignored in the past
+b.patch