[PATCH 06 of 10] store: eliminate unneded last assignment to n in _auxencode()
Adrian Buehlmann
adrian at cadifra.com
Sat Sep 15 16:01:47 CDT 2012
# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1347738178 -7200
# Node ID fb8658ad9e8df3613e1c96cdfc478de0c1c7d1d7
# Parent b644287e79a8ee47711b36dbd0d9a852d8e99269
store: eliminate unneded last assignment to n in _auxencode()
The check for period or space at the end of the string is the last one, the
local variable n is thus not used anymore.
diff --git a/mercurial/store.py b/mercurial/store.py
--- a/mercurial/store.py
+++ b/mercurial/store.py
@@ -161,8 +161,7 @@
res[i] = n
if n[-1] in '. ':
# encode last period or space ('foo...' -> 'foo..~2e')
- n = n[:-1] + "~%02x" % ord(n[-1])
- res[i] = n
+ res[i] = n[:-1] + "~%02x" % ord(n[-1])
return '/'.join(res)
_maxstorepathlen = 120
More information about the Mercurial-devel
mailing list