[PATCH 19 of 21 RFC] store: all stores have "encode" attribute exposing path encoding function
michaeljedgar at gmail.com
michaeljedgar at gmail.com
Wed Sep 10 19:26:20 CDT 2014
# HG changeset patch
# User Mike Edgar <adgar at google.com>
# Date 1410322117 14400
# Wed Sep 10 00:08:37 2014 -0400
# Node ID 41b44791ab7feaeceaaf4b1031564526d497e945
# Parent bb822c8a38958cc78b039463efa59ac9b0556af3
store: all stores have "encode" attribute exposing path encoding function
The .hgcensored file will include paths to files relative to the repository
root, and those paths must be filesystem-independent. The fncache-based stores
already have their path encoding function stored in the "encode" field, so
this change extends this pattern to other store types.
diff -r bb822c8a3895 -r 41b44791ab7f mercurial/store.py
--- a/mercurial/store.py Wed Sep 03 22:24:02 2014 -0400
+++ b/mercurial/store.py Wed Sep 10 00:08:37 2014 -0400
@@ -286,6 +286,7 @@
class basicstore(object):
'''base class for local repository stores'''
def __init__(self, path, vfstype):
+ self.encode = encodedir
vfs = vfstype(path)
self.path = vfs.base
self.createmode = _calcmode(vfs)
@@ -359,6 +360,7 @@
class encodedstore(basicstore):
def __init__(self, path, vfstype):
+ self.encode = encodefilename
vfs = vfstype(path + '/store')
self.path = vfs.base
self.createmode = _calcmode(vfs)
More information about the Mercurial-devel
mailing list