##// END OF EJS Templates
mq: align columns in verbose qseries output.
Dan Villiom Podlaski Christiansen -
r9016:894c5b4b default
parent child Browse files
Show More
@@ -1343,19 +1343,24 b' class queue(object):'
1343
1343
1344 def qseries(self, repo, missing=None, start=0, length=None, status=None,
1344 def qseries(self, repo, missing=None, start=0, length=None, status=None,
1345 summary=False):
1345 summary=False):
1346 def displayname(patchname):
1346 def displayname(pfx, patchname):
1347 if summary:
1347 if summary:
1348 ph = patchheader(self.join(patchname))
1348 ph = patchheader(self.join(patchname))
1349 msg = ph.message
1349 msg = ph.message
1350 msg = msg and ': ' + msg[0] or ': '
1350 msg = msg and ': ' + msg[0] or ': '
1351 else:
1351 else:
1352 msg = ''
1352 msg = ''
1353 return '%s%s' % (patchname, msg)
1353 msg = "%s%s%s" % (pfx, patchname, msg)
1354 if self.ui.interactive():
1355 msg = util.ellipsis(msg, util.termwidth())
1356 self.ui.write(msg + '\n')
1354
1357
1355 applied = set([p.name for p in self.applied])
1358 applied = set([p.name for p in self.applied])
1356 if length is None:
1359 if length is None:
1357 length = len(self.series) - start
1360 length = len(self.series) - start
1358 if not missing:
1361 if not missing:
1362 if self.ui.verbose:
1363 idxwidth = len(str(start+length - 1))
1359 for i in xrange(start, start+length):
1364 for i in xrange(start, start+length):
1360 patch = self.series[i]
1365 patch = self.series[i]
1361 if patch in applied:
1366 if patch in applied:
@@ -1366,10 +1371,10 b' class queue(object):'
1366 stat = 'G'
1371 stat = 'G'
1367 pfx = ''
1372 pfx = ''
1368 if self.ui.verbose:
1373 if self.ui.verbose:
1369 pfx = '%d %s ' % (i, stat)
1374 pfx = '%*d %s ' % (idxwidth, i, stat)
1370 elif status and status != stat:
1375 elif status and status != stat:
1371 continue
1376 continue
1372 self.ui.write('%s%s\n' % (pfx, displayname(patch)))
1377 displayname(pfx, patch)
1373 else:
1378 else:
1374 msng_list = []
1379 msng_list = []
1375 for root, dirs, files in os.walk(self.path):
1380 for root, dirs, files in os.walk(self.path):
@@ -1383,7 +1388,7 b' class queue(object):'
1383 msng_list.append(fl)
1388 msng_list.append(fl)
1384 for x in sorted(msng_list):
1389 for x in sorted(msng_list):
1385 pfx = self.ui.verbose and ('D ') or ''
1390 pfx = self.ui.verbose and ('D ') or ''
1386 self.ui.write("%s%s\n" % (pfx, displayname(x)))
1391 displayname(pfx, x)
1387
1392
1388 def issaveline(self, l):
1393 def issaveline(self, l):
1389 if l.name == '.hg.patches.save.line':
1394 if l.name == '.hg.patches.save.line':
General Comments 0
You need to be logged in to leave comments. Login now