mercurial/util.py
changeset 1635 ae61937c61c5
parent 1611 301d5cd4abc6
child 1810 7596611ab3d5
child 1829 b0f6af327fd4
child 1903 e4abeafd6eb1
equal deleted inserted replaced
1634:f49f602fae92 1635:ae61937c61c5
   542         try:
   542         try:
   543             rcs.extend([os.path.join(rcdir, f) for f in os.listdir(rcdir)
   543             rcs.extend([os.path.join(rcdir, f) for f in os.listdir(rcdir)
   544                         if f.endswith(".rc")])
   544                         if f.endswith(".rc")])
   545         except OSError, inst: pass
   545         except OSError, inst: pass
   546         return rcs
   546         return rcs
   547     rcpath = rcfiles(os.path.dirname(sys.argv[0]) + '/../etc/mercurial')
   547     rcpath = []
       
   548     if len(sys.argv) > 0:
       
   549         rcpath.extend(rcfiles(os.path.dirname(sys.argv[0]) + '/../etc/mercurial'))
   548     rcpath.extend(rcfiles('/etc/mercurial'))
   550     rcpath.extend(rcfiles('/etc/mercurial'))
   549     rcpath.append(os.path.expanduser('~/.hgrc'))
   551     rcpath.append(os.path.expanduser('~/.hgrc'))
   550     rcpath = [os.path.normpath(f) for f in rcpath]
   552     rcpath = [os.path.normpath(f) for f in rcpath]
   551 
   553 
   552     def parse_patch_output(output_line):
   554     def parse_patch_output(output_line):