mercurial/cmdutil.py
changeset 4619 7c8f8b736365
parent 4598 b25ee3f8f714
child 4620 5fd7cc897542
equal deleted inserted replaced
4618:669e76b7df24 4619:7c8f8b736365
   260     cwd = earlygetopt(['--cwd'], args)
   260     cwd = earlygetopt(['--cwd'], args)
   261     if cwd:
   261     if cwd:
   262         os.chdir(cwd)
   262         os.chdir(cwd)
   263 
   263 
   264     extensions.loadall(ui)
   264     extensions.loadall(ui)
   265     ui.addreadhook(extensions.loadall)
       
   266 
   265 
   267     # read the local repository .hgrc into a local ui object
   266     # read the local repository .hgrc into a local ui object
   268     # this will trigger its extensions to load
   267     # this will trigger its extensions to load
   269     path = earlygetopt(["-R", "--repository", "--repo"], args)
   268     path = earlygetopt(["-R", "--repository", "--repo"], args)
   270     if not path:
   269     if not path:
   271         path = findrepo() or ""
   270         path = findrepo() or ""
   272     if path:
   271     if path:
   273         try:
   272         try:
   274             lui = commands.ui.ui(parentui=ui)
   273             lui = commands.ui.ui(parentui=ui)
   275             lui.readconfig(os.path.join(path, ".hg", "hgrc"))
   274             lui.readconfig(os.path.join(path, ".hg", "hgrc"))
       
   275             extensions.loadall(lui)
   276         except IOError:
   276         except IOError:
   277             pass
   277             extensions.loadall(ui)
   278 
   278 
   279     cmd, func, args, options, cmdoptions = parse(ui, args)
   279     cmd, func, args, options, cmdoptions = parse(ui, args)
   280 
   280 
   281     if options["encoding"]:
   281     if options["encoding"]:
   282         util._encoding = options["encoding"]
   282         util._encoding = options["encoding"]