[PATCH 02 of 10] store: explain "aux.foo" versus "foo.aux" in doc of _auxencode()

Adrian Buehlmann adrian at cadifra.com
Sat Sep 15 16:01:43 CDT 2012


# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1347738113 -7200
# Node ID e9af2134825c468269ed5f22af001dd58ec1d6cd
# Parent  88244af1f66e7c41b3e4bc7cd97d3898fe594b85
store: explain "aux.foo" versus "foo.aux" in doc of _auxencode()

diff --git a/mercurial/store.py b/mercurial/store.py
--- a/mercurial/store.py
+++ b/mercurial/store.py
@@ -127,8 +127,10 @@
     period or space. Does not touch other single reserved characters c.
     Specifically, c in '\\:*?"<>|' or ord(c) <= 31 are *not* encoded here.
     Additionally encodes space or period at the beginning, if dotencode is
-    True.
-    path is assumed to be all lowercase.
+    True. Parameter path is assumed to be all lowercase.
+    A segment only needs encoding if a reserved name appears as a
+    basename (e.g. "aux", "aux.foo"). A directory or file named "foo.aux"
+    doesn't need encoding.
 
     >>> _auxencode('.foo/aux.txt/txt.aux/con/prn/nul/foo.', True)
     '~2efoo/au~78.txt/txt.aux/co~6e/pr~6e/nu~6c/foo~2e'


More information about the Mercurial-devel mailing list