changeset 351:971e7deca495

got --print working, maybe
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 27 Jun 2013 02:01:32 -0700
parents 52e718567731
children eeff298cc922
files python/hgrc.py
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/python/hgrc.py	Thu Jun 27 00:04:12 2013 -0700
+++ b/python/hgrc.py	Thu Jun 27 02:01:32 2013 -0700
@@ -6,12 +6,11 @@
 Actions:
 (TBD)
 """
-
+# imports
 import optparse
 import os
 import sys
-
-here = os.path.dirname(os.path.realpath(__file__))
+from ConfigParser import RawCOnfigParser as ConfigParser
 
 def main(args=sys.argv[1:]):
 
@@ -56,7 +55,12 @@
                 continue
         else:
             assert os.path.isfile(path), "%s is not a file, exiting" % path
+        hgrc.append(path)
 
+    if options.print:
+        # print the chosen hgrc paths and you're done
+        print '\n'.join(hgrc)
+        parser.exit()
 
 if __name__ == '__main__':
     main()