comparison mercurial/dirstate.py @ 26294:1ffc61c4e32e

hgweb: overwrite cwd to resolve file patterns relative to repo (issue4568) It's useless to handle file patterns as relative to the cwd of the server process. The only sensible way in hgweb is to resolve paths relative to the repository root. It seems dirstate.getcwd() isn't used to get a real file path, so this patch won't cause problem.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 20 Sep 2015 20:11:31 +0900
parents 3d24f31c6b8f
children 3a0bb61371c5
comparison
equal deleted inserted replaced
26293:3d24f31c6b8f 26294:1ffc61c4e32e
40 self._validate = validate 40 self._validate = validate
41 self._root = root 41 self._root = root
42 # ntpath.join(root, '') of Python 2.7.9 does not add sep if root is 42 # ntpath.join(root, '') of Python 2.7.9 does not add sep if root is
43 # UNC path pointing to root share (issue4557) 43 # UNC path pointing to root share (issue4557)
44 self._rootdir = pathutil.normasprefix(root) 44 self._rootdir = pathutil.normasprefix(root)
45 # internal config: ui.forcecwd
46 forcecwd = ui.config('ui', 'forcecwd')
47 if forcecwd:
48 self._cwd = forcecwd
45 self._dirty = False 49 self._dirty = False
46 self._dirtypl = False 50 self._dirtypl = False
47 self._lastnormaltime = 0 51 self._lastnormaltime = 0
48 self._ui = ui 52 self._ui = ui
49 self._filecache = {} 53 self._filecache = {}