Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHGb755eab7e677: revset: use %d to turn an int into a bytestr
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/revset.py (2 lines) |
Status | Author | Revision | |
---|---|---|---|
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Abandoned | 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 | ||
Abandoned | durin42 |
# because different symbols can point to the same rev. | # because different symbols can point to the same rev. | ||||
cl = repo.changelog | cl = repo.changelog | ||||
ls = [] | ls = [] | ||||
seen = set() | seen = set() | ||||
for t in s.split('\0'): | for t in s.split('\0'): | ||||
try: | try: | ||||
# fast path for integer revision | # fast path for integer revision | ||||
r = int(t) | r = int(t) | ||||
if str(r) != t or r not in cl: | if ('%d' % r) != t or r not in cl: | ||||
raise ValueError | raise ValueError | ||||
revs = [r] | revs = [r] | ||||
except ValueError: | except ValueError: | ||||
revs = stringset(repo, subset, t, defineorder) | revs = stringset(repo, subset, t, defineorder) | ||||
for r in revs: | for r in revs: | ||||
if r in seen: | if r in seen: | ||||
continue | continue |