hgext/phabricator.py
changeset 44128 ff396501e841
parent 44127 59b3fe1e2021
child 44169 5d85e9ddc7b9
equal deleted inserted replaced
44127:59b3fe1e2021 44128:ff396501e841
   176     except ValueError:
   176     except ValueError:
   177         ui.warn(_(b"invalid JSON in %s\n") % wdirvfs.join(b".arcconfig"))
   177         ui.warn(_(b"invalid JSON in %s\n") % wdirvfs.join(b".arcconfig"))
   178     except IOError:
   178     except IOError:
   179         pass
   179         pass
   180 
   180 
       
   181     cfg = util.sortdict()
       
   182 
   181     if b"repository.callsign" in arcconfig:
   183     if b"repository.callsign" in arcconfig:
   182         ui.applyconfig(
   184         cfg[(b"phabricator", b"callsign")] = arcconfig[b"repository.callsign"]
   183             {(b"phabricator", b"callsign"): arcconfig[b"repository.callsign"]},
   185 
   184             source=wdirvfs.join(b".arcconfig"),
   186     if b"phabricator.uri" in arcconfig:
   185         )
   187         cfg[(b"phabricator", b"url")] = arcconfig[b"phabricator.uri"]
       
   188 
       
   189     if cfg:
       
   190         ui.applyconfig(cfg, source=wdirvfs.join(b".arcconfig"))
   186 
   191 
   187     return orig(ui, wdirvfs, hgvfs, requirements) or result  # Load .hg/hgrc
   192     return orig(ui, wdirvfs, hgvfs, requirements) or result  # Load .hg/hgrc
   188 
   193 
   189 
   194 
   190 def vcrcommand(name, flags, spec, helpcategory=None, optionalrepo=False):
   195 def vcrcommand(name, flags, spec, helpcategory=None, optionalrepo=False):