Details
Details
- Reviewers
pulkit - Group Reviewers
hg-reviewers - Commits
- rHG120c343c38b7: cvsps: convert encoding name to sysstr
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
| pulkit |
| hg-reviewers |
| Lint Skipped |
| Unit Tests Skipped |
| Path | Packages | |||
|---|---|---|---|---|
| M | hgext/convert/cvsps.py (3 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| Augie Fackler | Apr 27 2018, 1:32 AM |
| Status | Author | Revision | |
|---|---|---|---|
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 |
| # this is needed, because logentry.revision is a tuple of "int" | # this is needed, because logentry.revision is a tuple of "int" | ||||
| # (e.g. (1, 2) for "1.2") | # (e.g. (1, 2) for "1.2") | ||||
| return '.'.join(pycompat.maplist(pycompat.bytestr, r)) | return '.'.join(pycompat.maplist(pycompat.bytestr, r)) | ||||
| for entry in log: | for entry in log: | ||||
| comment = entry.comment | comment = entry.comment | ||||
| for e in encodings: | for e in encodings: | ||||
| try: | try: | ||||
| entry.comment = comment.decode(e).encode('utf-8') | entry.comment = comment.decode( | ||||
| pycompat.sysstr(e)).encode('utf-8') | |||||
| if ui.debugflag: | if ui.debugflag: | ||||
| ui.debug("transcoding by %s: %s of %s\n" % | ui.debug("transcoding by %s: %s of %s\n" % | ||||
| (e, revstr(entry.revision), entry.file)) | (e, revstr(entry.revision), entry.file)) | ||||
| break | break | ||||
| except UnicodeDecodeError: | except UnicodeDecodeError: | ||||
| pass # try next encoding | pass # try next encoding | ||||
| except LookupError as inst: # unknown encoding, maybe | except LookupError as inst: # unknown encoding, maybe | ||||
| raise error.Abort(inst, | raise error.Abort(inst, | ||||