Mercurial > public > mercurial-scm > hg
diff 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 |
line wrap: on
line diff
--- a/hgext/mq.py Tue Nov 17 16:23:05 2009 -0600 +++ b/hgext/mq.py Tue Nov 17 22:16:41 2009 +0100 @@ -1384,13 +1384,16 @@ def displayname(pfx, patchname): if summary: ph = patchheader(self.join(patchname)) - msg = ph.message - msg = msg and ': ' + msg[0] or ': ' + msg = ph.message and ph.message[0] or '' + if self.ui.interactive(): + width = util.termwidth() - len(pfx) - len(patchname) - 2 + if width > 0: + msg = util.ellipsis(msg, width) + else: + msg = '' + msg = "%s%s: %s" % (pfx, patchname, msg) else: - msg = '' - msg = "%s%s%s" % (pfx, patchname, msg) - if self.ui.interactive(): - msg = util.ellipsis(msg, util.termwidth()) + msg = pfx + patchname self.ui.write(msg + '\n') applied = set([p.name for p in self.applied])