diff hgext/mq.py @ 3763:955475d237fc

fix qseries -v and guards interaction - rename "status" variable to avoid shadowing an argument - use a better test to determine whether a patch is applied
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sat, 02 Dec 2006 18:41:07 -0200
parents 1debe70db9d7
children b3b868113d24
line wrap: on
line diff
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -1124,21 +1124,21 @@ class queue:
             else:
                 return self.series[i]
 
-        unapplied = self.series_end(all_patches=True)
+        applied = dict.fromkeys([p.name for p in self.applied])
         if not length:
             length = len(self.series) - start
         if not missing:
             for i in xrange(start, start+length):
                 pfx = ''
+                patch = pname(i)
                 if self.ui.verbose:
-                    if i < unapplied:
-                        status = 'A'
+                    if patch in applied:
+                        stat = 'A'
                     elif self.pushable(i)[0]:
-                        status = 'U'
+                        stat = 'U'
                     else:
-                        status = 'G'
-                    pfx = '%d %s ' % (i, status)
-                patch = pname(i)
+                        stat = 'G'
+                    pfx = '%d %s ' % (i, stat)
                 self.ui.write('%s%s\n' % (pfx, displayname(patch)))
         else:
             msng_list = []