Mercurial > hg > mercurial-crew-with-dirclash
comparison 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 |
comparison
equal
deleted
inserted
replaced
3762:b9d3e12da485 | 3763:955475d237fc |
---|---|
1122 if status == 'A': | 1122 if status == 'A': |
1123 return self.applied[i].name | 1123 return self.applied[i].name |
1124 else: | 1124 else: |
1125 return self.series[i] | 1125 return self.series[i] |
1126 | 1126 |
1127 unapplied = self.series_end(all_patches=True) | 1127 applied = dict.fromkeys([p.name for p in self.applied]) |
1128 if not length: | 1128 if not length: |
1129 length = len(self.series) - start | 1129 length = len(self.series) - start |
1130 if not missing: | 1130 if not missing: |
1131 for i in xrange(start, start+length): | 1131 for i in xrange(start, start+length): |
1132 pfx = '' | 1132 pfx = '' |
1133 patch = pname(i) | |
1133 if self.ui.verbose: | 1134 if self.ui.verbose: |
1134 if i < unapplied: | 1135 if patch in applied: |
1135 status = 'A' | 1136 stat = 'A' |
1136 elif self.pushable(i)[0]: | 1137 elif self.pushable(i)[0]: |
1137 status = 'U' | 1138 stat = 'U' |
1138 else: | 1139 else: |
1139 status = 'G' | 1140 stat = 'G' |
1140 pfx = '%d %s ' % (i, status) | 1141 pfx = '%d %s ' % (i, stat) |
1141 patch = pname(i) | |
1142 self.ui.write('%s%s\n' % (pfx, displayname(patch))) | 1142 self.ui.write('%s%s\n' % (pfx, displayname(patch))) |
1143 else: | 1143 else: |
1144 msng_list = [] | 1144 msng_list = [] |
1145 for root, dirs, files in os.walk(self.path): | 1145 for root, dirs, files in os.walk(self.path): |
1146 d = root[len(self.path) + 1:] | 1146 d = root[len(self.path) + 1:] |