Details
Details
- Reviewers
indygreg - Group Reviewers
hg-reviewers - Commits
- rHG8e89b6e1e0cd: pvec: add an explicit type hint to help pytype
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
indygreg |
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/pvec.py (1 line) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
622e80df9b3d | ceea3ae860ea | Augie Fackler | Nov 6 2019, 3:15 PM |
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 | ||
Closed | durin42 | ||
Closed | durin42 |
'''convert a bytestring to a long''' | '''convert a bytestring to a long''' | ||||
v = 0 | v = 0 | ||||
for b in bs: | for b in bs: | ||||
v = v * 256 + ord(b) | v = v * 256 + ord(b) | ||||
return v | return v | ||||
def _str(v, l): | def _str(v, l): | ||||
# type: (int, int) -> bytes | |||||
bs = b"" | bs = b"" | ||||
for p in pycompat.xrange(l): | for p in pycompat.xrange(l): | ||||
bs = pycompat.bytechr(v & 255) + bs | bs = pycompat.bytechr(v & 255) + bs | ||||
v >>= 8 | v >>= 8 | ||||
return bs | return bs | ||||
def _split(b): | def _split(b): |