##// END OF EJS Templates
Simplified qseries and hg qapplied to fix some bugs caused by optimization:...
Thomas Arendsen Hein -
r4239:417c2068 default
parent child Browse files
Show More
@@ -1111,7 +1111,7 b' class queue:'
1111 1111 self.explain_pushable(i)
1112 1112 return unapplied
1113 1113
1114 def qseries(self, repo, missing=None, start=0, length=0, status=None,
1114 def qseries(self, repo, missing=None, start=0, length=None, status=None,
1115 1115 summary=False):
1116 1116 def displayname(patchname):
1117 1117 if summary:
@@ -1121,28 +1121,22 b' class queue:'
1121 1121 msg = ''
1122 1122 return '%s%s' % (patchname, msg)
1123 1123
1124 def pname(i):
1125 if status == 'A':
1126 return self.applied[i].name
1127 else:
1128 return self.series[i]
1129
1130 1124 applied = dict.fromkeys([p.name for p in self.applied])
1131 if not length:
1125 if length is None:
1132 1126 length = len(self.series) - start
1133 1127 if not missing:
1134 1128 for i in xrange(start, start+length):
1129 patch = self.series[i]
1130 if patch in applied:
1131 stat = 'A'
1132 elif self.pushable(i)[0]:
1133 stat = 'U'
1134 else:
1135 stat = 'G'
1135 1136 pfx = ''
1136 patch = pname(i)
1137 1137 if self.ui.verbose:
1138 if patch in applied:
1139 stat = 'A'
1140 elif self.pushable(i)[0]:
1141 stat = 'U'
1142 else:
1143 stat = 'G'
1144 1138 pfx = '%d %s ' % (i, stat)
1145 elif status == 'U' and not self.pushable(i)[0]:
1139 elif status and status != stat:
1146 1140 continue
1147 1141 self.ui.write('%s%s\n' % (pfx, displayname(patch)))
1148 1142 else:
@@ -1426,10 +1420,7 b' def applied(ui, repo, patch=None, **opts'
1426 1420 raise util.Abort(_("patch %s is not in series file") % patch)
1427 1421 end = q.series.index(patch) + 1
1428 1422 else:
1429 end = len(q.applied)
1430 if not end:
1431 return
1432
1423 end = q.series_end(True)
1433 1424 return q.qseries(repo, length=end, status='A', summary=opts.get('summary'))
1434 1425
1435 1426 def unapplied(ui, repo, patch=None, **opts):
General Comments 0
You need to be logged in to leave comments. Login now