mirror of
https://github.com/facebook/sapling.git
synced 2024-12-29 08:02:24 +03:00
ab3a7cb21f
Summary: In preparation for merging fb-mercurial sources to the Eden repository, move everything from the top-level directory into an `eden/scm` subdirectory.
20 lines
351 B
Python
20 lines
351 B
Python
from __future__ import absolute_import
|
|
|
|
import os
|
|
import sys
|
|
|
|
|
|
if os.path.exists(".hg"):
|
|
hgrcpath = ".hg/hgrc"
|
|
else:
|
|
hgrcpath = os.getenv("HGRCPATH")
|
|
|
|
content = ""
|
|
|
|
for config in sys.argv[1:]:
|
|
section, namevalue = config.split(".", 1)
|
|
content += "[%s]\n%s\n" % (section, namevalue)
|
|
|
|
with open(hgrcpath, "a") as f:
|
|
f.write(content)
|