Histedit uses the / operator, which does type conversion to float in
Python 3 instead of integer division likeon Python 2. Let's preserve
the Python 2 behavior by importing and using the // operator.
Details
Details
- Reviewers
durin42 marmoute - Group Reviewers
hg-reviewers - Commits
- rHGd06e748cfd02: py3: use integer division in histedit
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
hgext/histedit.py | ||
---|---|---|
193 | That import is not needed unless there are other location where you intend / to return float. If this is the case, this is unrelated to the / → // change and should go in an independant changesets. |
hgext/histedit.py | ||
---|---|---|
193 | Oops, I didn't even realize that the // operator existed in py2. I only noticed that / behaves differently on py2 and py3, so I blindly assumed that the import statement imported the // operator from the future. I've drop this line now. |
That import is not needed unless there are other location where you intend / to return float. If this is the case, this is unrelated to the / → // change and should go in an independant changesets.