Mercurial > hg
comparison hgext/histedit.py @ 43376:b27cf9f52194 stable
histedit: restore hex nodeids to be 12 digits long
I accidentally switched from 12 digits to 40 digits while making the
code py3-compatible. Thanks to Yuya for noticing.
Differential Revision: https://phab.mercurial-scm.org/D7200
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 01 Nov 2019 21:46:34 -0700 |
parents | de2c8722a787 |
children | 9f70512ae2cf 40db695040eb |
comparison
equal
deleted
inserted
replaced
43375:c2c3ee8794dd | 43376:b27cf9f52194 |
---|---|
1400 win.box() | 1400 win.box() |
1401 | 1401 |
1402 maxy, maxx = win.getmaxyx() | 1402 maxy, maxx = win.getmaxyx() |
1403 length = maxx - 3 | 1403 length = maxx - 3 |
1404 | 1404 |
1405 line = b"changeset: %d:%s" % (ctx.rev(), ctx.hex()) | 1405 line = b"changeset: %d:%s" % (ctx.rev(), ctx.hex()[:12]) |
1406 win.addstr(1, 1, line[:length]) | 1406 win.addstr(1, 1, line[:length]) |
1407 | 1407 |
1408 line = b"user: %s" % ctx.user() | 1408 line = b"user: %s" % ctx.user() |
1409 win.addstr(2, 1, line[:length]) | 1409 win.addstr(2, 1, line[:length]) |
1410 | 1410 |
1430 win.addstr(y, fnx, _trunc_head(line1, fnmaxx)) | 1430 win.addstr(y, fnx, _trunc_head(line1, fnmaxx)) |
1431 y = y + 1 | 1431 y = y + 1 |
1432 | 1432 |
1433 conflicts = rule.conflicts | 1433 conflicts = rule.conflicts |
1434 if len(conflicts) > 0: | 1434 if len(conflicts) > 0: |
1435 conflictstr = b','.join(map(lambda r: r.ctx.hex(), conflicts)) | 1435 conflictstr = b','.join(map(lambda r: r.ctx.hex()[:12], conflicts)) |
1436 conflictstr = b"changed files overlap with %s" % conflictstr | 1436 conflictstr = b"changed files overlap with %s" % conflictstr |
1437 else: | 1437 else: |
1438 conflictstr = b'no overlap' | 1438 conflictstr = b'no overlap' |
1439 | 1439 |
1440 win.addstr(y, 1, conflictstr[:length]) | 1440 win.addstr(y, 1, conflictstr[:length]) |