Mercurial > public > mercurial-scm > hg-stable
diff 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 |
line wrap: on
line diff
--- a/mercurial/dirstate.py Sun Sep 20 20:08:22 2015 +0900 +++ b/mercurial/dirstate.py Sun Sep 20 20:11:31 2015 +0900 @@ -42,6 +42,10 @@ # ntpath.join(root, '') of Python 2.7.9 does not add sep if root is # UNC path pointing to root share (issue4557) self._rootdir = pathutil.normasprefix(root) + # internal config: ui.forcecwd + forcecwd = ui.config('ui', 'forcecwd') + if forcecwd: + self._cwd = forcecwd self._dirty = False self._dirtypl = False self._lastnormaltime = 0