mercurial/scmutil.py
changeset 13985 26335a817dd0
parent 13984 af60153b5e3b
child 13986 9c374cf76b7d
equal deleted inserted replaced
13984:af60153b5e3b 13985:26335a817dd0
   294                             yield hgname
   294                             yield hgname
   295                     else:
   295                     else:
   296                         newdirs.append(d)
   296                         newdirs.append(d)
   297             dirs[:] = newdirs
   297             dirs[:] = newdirs
   298 
   298 
       
   299 def os_rcpath():
       
   300     '''return default os-specific hgrc search path'''
       
   301     path = util.system_rcpath()
       
   302     path.extend(util.user_rcpath())
       
   303     path = [os.path.normpath(f) for f in path]
       
   304     return path
       
   305 
   299 _rcpath = None
   306 _rcpath = None
   300 
   307 
   301 def rcpath():
   308 def rcpath():
   302     '''return hgrc search path. if env var HGRCPATH is set, use it.
   309     '''return hgrc search path. if env var HGRCPATH is set, use it.
   303     for each item in path, if directory, use files ending in .rc,
   310     for each item in path, if directory, use files ending in .rc,
   317                         if f.endswith('.rc'):
   324                         if f.endswith('.rc'):
   318                             _rcpath.append(os.path.join(p, f))
   325                             _rcpath.append(os.path.join(p, f))
   319                 else:
   326                 else:
   320                     _rcpath.append(p)
   327                     _rcpath.append(p)
   321         else:
   328         else:
   322             _rcpath = util.os_rcpath()
   329             _rcpath = os_rcpath()
   323     return _rcpath
   330     return _rcpath