Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/ui.py @ 1921:acce3f7e1779
Don't expand empty [paths] so later interpolation can do the right thing.
Example:
[paths]
default =
default-push = %(default)s
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Sun, 12 Mar 2006 20:34:09 +0100 |
parents | 6569651a4f1e |
children | 36c6e4c3ff43 |
comparison
equal
deleted
inserted
replaced
1894:4c53aaf2d153 | 1921:acce3f7e1779 |
---|---|
58 raise util.Abort(_("Failed to parse %s\n%s") % (f, inst)) | 58 raise util.Abort(_("Failed to parse %s\n%s") % (f, inst)) |
59 # translate paths relative to root (or home) into absolute paths | 59 # translate paths relative to root (or home) into absolute paths |
60 if root is None: | 60 if root is None: |
61 root = os.path.expanduser('~') | 61 root = os.path.expanduser('~') |
62 for name, path in self.configitems("paths"): | 62 for name, path in self.configitems("paths"): |
63 if path.find("://") == -1 and not os.path.isabs(path): | 63 if path and path.find("://") == -1 and not os.path.isabs(path): |
64 self.cdata.set("paths", name, os.path.join(root, path)) | 64 self.cdata.set("paths", name, os.path.join(root, path)) |
65 | 65 |
66 def setconfig(self, section, name, val): | 66 def setconfig(self, section, name, val): |
67 self.overlay[(section, name)] = val | 67 self.overlay[(section, name)] = val |
68 | 68 |