Mercurial > hg
comparison hgext/mq.py @ 9874:c51494c53841 stable
qseries: don't truncate the patch name (issue1912)
Instead of truncating the entire output line of `qseries', only the
summary is truncated.
author | Dan Villiom Podlaski Christiansen <danchr@gmail.com> |
---|---|
date | Tue, 17 Nov 2009 22:16:41 +0100 |
parents | 81f1462ef2c7 |
children | 46de82e50790 |
comparison
equal
deleted
inserted
replaced
9873:541218fbad2a | 9874:c51494c53841 |
---|---|
1382 def qseries(self, repo, missing=None, start=0, length=None, status=None, | 1382 def qseries(self, repo, missing=None, start=0, length=None, status=None, |
1383 summary=False): | 1383 summary=False): |
1384 def displayname(pfx, patchname): | 1384 def displayname(pfx, patchname): |
1385 if summary: | 1385 if summary: |
1386 ph = patchheader(self.join(patchname)) | 1386 ph = patchheader(self.join(patchname)) |
1387 msg = ph.message | 1387 msg = ph.message and ph.message[0] or '' |
1388 msg = msg and ': ' + msg[0] or ': ' | 1388 if self.ui.interactive(): |
1389 width = util.termwidth() - len(pfx) - len(patchname) - 2 | |
1390 if width > 0: | |
1391 msg = util.ellipsis(msg, width) | |
1392 else: | |
1393 msg = '' | |
1394 msg = "%s%s: %s" % (pfx, patchname, msg) | |
1389 else: | 1395 else: |
1390 msg = '' | 1396 msg = pfx + patchname |
1391 msg = "%s%s%s" % (pfx, patchname, msg) | |
1392 if self.ui.interactive(): | |
1393 msg = util.ellipsis(msg, util.termwidth()) | |
1394 self.ui.write(msg + '\n') | 1397 self.ui.write(msg + '\n') |
1395 | 1398 |
1396 applied = set([p.name for p in self.applied]) | 1399 applied = set([p.name for p in self.applied]) |
1397 if length is None: | 1400 if length is None: |
1398 length = len(self.series) - start | 1401 length = len(self.series) - start |