equal
deleted
inserted
replaced
1081 return text |
1081 return text |
1082 return utext.encode(encoding.encoding) |
1082 return utext.encode(encoding.encoding) |
1083 except (UnicodeDecodeError, UnicodeEncodeError): |
1083 except (UnicodeDecodeError, UnicodeEncodeError): |
1084 return _ellipsis(text, maxlength)[0] |
1084 return _ellipsis(text, maxlength)[0] |
1085 |
1085 |
1086 def os_rcpath(): |
|
1087 '''return default os-specific hgrc search path''' |
|
1088 path = system_rcpath() |
|
1089 path.extend(user_rcpath()) |
|
1090 path = [os.path.normpath(f) for f in path] |
|
1091 return path |
|
1092 |
|
1093 def bytecount(nbytes): |
1086 def bytecount(nbytes): |
1094 '''return byte count formatted as readable string, with units''' |
1087 '''return byte count formatted as readable string, with units''' |
1095 |
1088 |
1096 units = ( |
1089 units = ( |
1097 (100, 1 << 30, _('%.0f GB')), |
1090 (100, 1 << 30, _('%.0f GB')), |