##// END OF EJS Templates
Add -s option to qseries: display first line of patch header.
Brendan Cully -
r2756:caa6d992 default
parent child Browse files
Show More
@@ -934,17 +934,23 b' class queue:'
934 self.ui.write("%d " % self.series.index(p))
934 self.ui.write("%d " % self.series.index(p))
935 self.ui.write("%s\n" % p)
935 self.ui.write("%s\n" % p)
936
936
937 def qseries(self, repo, missing=None):
937 def qseries(self, repo, missing=None, summary=False):
938 start = self.series_end()
938 start = self.series_end()
939 if not missing:
939 if not missing:
940 for p in self.series[:start]:
940 for i in range(len(self.series)):
941 patch = self.series[i]
941 if self.ui.verbose:
942 if self.ui.verbose:
942 self.ui.write("%d A " % self.series.index(p))
943 if i < start:
943 self.ui.write("%s\n" % p)
944 status = 'A'
944 for p in self.series[start:]:
945 else:
945 if self.ui.verbose:
946 status = 'U'
946 self.ui.write("%d U " % self.series.index(p))
947 self.ui.write('%d %s ' % (i, status))
947 self.ui.write("%s\n" % p)
948 if summary:
949 msg = self.readheaders(patch)[0]
950 msg = msg and ': ' + msg[0] or ': '
951 else:
952 msg = ''
953 self.ui.write('%s%s\n' % (patch, msg))
948 else:
954 else:
949 list = []
955 list = []
950 for root, dirs, files in os.walk(self.path):
956 for root, dirs, files in os.walk(self.path):
@@ -1255,7 +1261,7 b' def commit(ui, repo, *pats, **opts):'
1255
1261
1256 def series(ui, repo, **opts):
1262 def series(ui, repo, **opts):
1257 """print the entire series file"""
1263 """print the entire series file"""
1258 repo.mq.qseries(repo, missing=opts['missing'])
1264 repo.mq.qseries(repo, missing=opts['missing'], summary=opts['summary'])
1259 return 0
1265 return 0
1260
1266
1261 def top(ui, repo, **opts):
1267 def top(ui, repo, **opts):
@@ -1604,7 +1610,8 b' cmdtable = {'
1604 'hg qsave [-m TEXT] [-l FILE] [-c] [-n NAME] [-e] [-f]'),
1610 'hg qsave [-m TEXT] [-l FILE] [-c] [-n NAME] [-e] [-f]'),
1605 "qseries":
1611 "qseries":
1606 (series,
1612 (series,
1607 [('m', 'missing', None, 'print patches not in series')],
1613 [('m', 'missing', None, 'print patches not in series'),
1614 ('s', 'summary', None, _('print first line of patch header'))],
1608 'hg qseries [-m]'),
1615 'hg qseries [-m]'),
1609 "^strip":
1616 "^strip":
1610 (strip,
1617 (strip,
General Comments 0
You need to be logged in to leave comments. Login now