equal
deleted
inserted
replaced
1561 _exportsingle( |
1561 _exportsingle( |
1562 repo, ctx, match, switch_parent, rev, seqno, write, opts) |
1562 repo, ctx, match, switch_parent, rev, seqno, write, opts) |
1563 if fo is not None: |
1563 if fo is not None: |
1564 fo.close() |
1564 fo.close() |
1565 |
1565 |
1566 class _regrettablereprbytes(bytes): |
|
1567 """Bytes subclass that makes the repr the same on Python 3 as Python 2. |
|
1568 |
|
1569 This is a huge hack. |
|
1570 """ |
|
1571 def __repr__(self): |
|
1572 return repr(pycompat.sysstr(self)) |
|
1573 |
|
1574 def _maybebytestr(v): |
1566 def _maybebytestr(v): |
1575 if pycompat.ispy3 and isinstance(v, bytes): |
1567 if isinstance(v, bytes): |
1576 return _regrettablereprbytes(v) |
1568 return pycompat.bytestr(v) |
1577 return v |
1569 return v |
1578 |
1570 |
1579 def showmarker(fm, marker, index=None): |
1571 def showmarker(fm, marker, index=None): |
1580 """utility function to display obsolescence marker in a readable way |
1572 """utility function to display obsolescence marker in a readable way |
1581 |
1573 |