# HG changeset patch # User Jeff Hammel # Date 1372293555 25200 # Node ID 6004e00b602db3b177037d4f04a19da80ff1887e # Parent c0f0f82f68ea4c727e5cec623295be521fdb9dd1 new hg file; TODO: incorporate! diff -r c0f0f82f68ea -r 6004e00b602d .emacs --- a/.emacs Wed Jun 26 09:22:30 2013 -0700 +++ b/.emacs Wed Jun 26 17:39:15 2013 -0700 @@ -162,6 +162,7 @@ if __name__ == '__main__': main()") +;; TODO: take directly from MakeItSo ;;; TODO ; - needless to say, zeitgeist integration diff -r c0f0f82f68ea -r 6004e00b602d python/hgrc.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/python/hgrc.py Wed Jun 26 17:39:15 2013 -0700 @@ -0,0 +1,53 @@ +#!/usr/bin/env python + +''' + +''' + +import optparse +import os +import sys + +here = os.path.dirname(os.path.realpath(__file__)) + +def main(args=sys.argv[1:]): + + usage = '%prog [options] repository <...>' + parser = optparse.OptionParser(usage=usage, description=__doc__) + parser.add_option('--ssh', dest='default_push_ssh', + action='store_true', default=False, + help="") + options, args = options.parse_args(args) + if not args: + parser.print_usage() + parser.exit() + + # find all .hgrc files + hgrc = [] + + # all the error types + missing = [] + not_hg = [] + not_a_directory = [] + + for path in args: + if not os.path.exists(path): + missing.append(path) + path = os.path.abspath(os.path.normpath(path)) + if os.path.isdir(path): + basename = os.path.basename(path) + subhgdir = os.path.join(path, '.hg') # hypothetical .hg subdirectory + if basename == '.hg': + hgrcpath = os.path.join(path, 'hgrc') + elif os.path.exists(subhgdir): + if not os.path.isdir(subhgdir): + not_a_directory.append(subhgdir) + continue + else: + not_hg.append(path) + continue + + + +if __name__ == '__main__': + main()