# HG changeset patch # User Yuya Nishihara # Date 1442747302 -32400 # Node ID 3d24f31c6b8f768107795edc6038b5717bde29ff # Parent 007ac1acfcacbb9ec4fff14924f6afd634c04785 dirstate: state that getcwd() shouldn't be used to get real file path hgweb will force it to be '' so that file patterns can be resolved relative to the repository root. I want to clarify that is correct. diff -r 007ac1acfcac -r 3d24f31c6b8f mercurial/dirstate.py --- a/mercurial/dirstate.py Wed Sep 16 12:36:21 2015 -0700 +++ b/mercurial/dirstate.py Sun Sep 20 20:08:22 2015 +0900 @@ -220,6 +220,12 @@ return os.getcwd() def getcwd(self): + '''Return the path from which a canonical path is calculated. + + This path should be used to resolve file patterns or to convert + canonical paths back to file paths for display. It shouldn't be + used to get real file paths. Use vfs functions instead. + ''' cwd = self._cwd if cwd == self._root: return ''