HG environment variables take precedence over hgrc
manifest hash:
c128b53429f861c0b75c2a81c6ad4907e4779810
--- a/mercurial/hg.py Wed Jul 13 01:46:50 2005 -0800
+++ b/mercurial/hg.py Wed Jul 13 01:48:03 2005 -0800
@@ -1498,8 +1498,8 @@
self.ui.debug("file %s: other %s ancestor %s\n" %
(fn, short(other), short(base)))
- cmd = self.ui.config("ui", "merge") or \
- os.environ.get("HGMERGE", "hgmerge")
+ cmd = os.environ.get("HGMERGE", "hgmerge") or \
+ self.ui.config("ui", "merge")
r = os.system("%s %s %s %s" % (cmd, a, b, c))
if r:
self.ui.warn("merging %s failed!\n" % fn)
--- a/mercurial/ui.py Wed Jul 13 01:46:50 2005 -0800
+++ b/mercurial/ui.py Wed Jul 13 01:48:03 2005 -0800
@@ -44,8 +44,8 @@
return []
def username(self):
- return (self.config("ui", "username") or
- os.environ.get("HGUSER") or
+ return (os.environ.get("HGUSER") or
+ self.config("ui", "username") or
os.environ.get("EMAIL") or
(os.environ.get("LOGNAME",
os.environ.get("USERNAME", "unknown"))
@@ -93,8 +93,8 @@
f.write(text)
f.close()
- editor = (self.config("ui", "editor") or
- os.environ.get("HGEDITOR") or
+ editor = (os.environ.get("HGEDITOR") or
+ self.config("ui", "editor") or
os.environ.get("EDITOR", "vi"))
os.environ["HGUSER"] = self.username()