Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dirstate.py @ 25658:e93036747902
global: mass rewrite to use modern octal syntax
Python 2.6 introduced a new octal syntax: "0oXXX", replacing "0XXX". The
old syntax is not recognized in Python 3 and will result in a parse
error.
Mass rewrite all instances of the old octal syntax to the new syntax.
This patch was generated by `2to3 -f numliterals -w -n .` and the diff
was selectively recorded to exclude changes to "<N>l" syntax conversion,
which will be handled separately.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 23 Jun 2015 22:30:33 -0700 |
parents | 868b7ee8b570 |
children | 328739ea70c3 |
line wrap: on
line diff
--- a/mercurial/dirstate.py Tue Jun 23 14:28:15 2015 -0700 +++ b/mercurial/dirstate.py Tue Jun 23 22:30:33 2015 -0700 @@ -594,9 +594,9 @@ self._map[f] = oldmap[f] else: if 'x' in allfiles.flags(f): - self._map[f] = dirstatetuple('n', 0777, -1, 0) + self._map[f] = dirstatetuple('n', 0o777, -1, 0) else: - self._map[f] = dirstatetuple('n', 0666, -1, 0) + self._map[f] = dirstatetuple('n', 0o666, -1, 0) self._pl = (parent, nullid) self._dirty = True @@ -963,7 +963,7 @@ mtime = int(st.st_mtime) if (size >= 0 and ((size != st.st_size and size != st.st_size & _rangemask) - or ((mode ^ st.st_mode) & 0100 and checkexec)) + or ((mode ^ st.st_mode) & 0o100 and checkexec)) or size == -2 # other parent or fn in copymap): madd(fn)