Mercurial > public > mercurial-scm > hg
comparison mercurial/dagparser.py @ 34212:dfd009e5f9f2
py3: iterate bytes as a byte string in dagparser.py
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 03 Sep 2017 15:32:45 +0900 |
parents | a48ad118c558 |
children | f0b6fbea00cf |
comparison
equal
deleted
inserted
replaced
34211:a48ad118c558 | 34212:dfd009e5f9f2 |
---|---|
179 elif ref[0] in pycompat.bytestr(string.digits): | 179 elif ref[0] in pycompat.bytestr(string.digits): |
180 return r - int(ref) | 180 return r - int(ref) |
181 else: | 181 else: |
182 return labels[ref] | 182 return labels[ref] |
183 | 183 |
184 chiter = (c for c in desc) | 184 chiter = pycompat.iterbytestr(desc) |
185 | 185 |
186 def nextch(): | 186 def nextch(): |
187 return next(chiter, '\0') | 187 return next(chiter, '\0') |
188 | 188 |
189 def nextrun(c, allow): | 189 def nextrun(c, allow): |