Comments
Patch
new file mode 100644
@@ -0,0 +1,8 @@
+-- going to create a repo with dollar sign which even
+works even when there exists an environment variable
+
+ $ mkdir '$foo'
+ $ cd '$foo'
+ $ hg init
+ $ foo=bar hg root
+ $TESTTMP/$foo
@@ -311,6 +311,10 @@
'''
def __init__(self, base, audit=True, cacheaudited=False, expandpath=False,
realpath=False):
+ if '$' in base and os.path.isdir(base):
+ # when there exists a repo '$foo' and an env var foo=bar, stop
+ # expanding path. refer issue5739.
+ expandpath = False
if expandpath:
base = util.expandpath(base)
if realpath: