Mercurial > public > mercurial-scm > hg
comparison mercurial/dispatch.py @ 46957:e7d082e4ace6
dispatch: use the new API to resolve --repository
An even weirder feature of Mercurial is the ability to use `[paths]` alias as
value of `--repository`. The weird feature now use the new APIs.
Differential Revision: https://phab.mercurial-scm.org/D10424
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 14 Apr 2021 20:57:34 +0200 |
parents | d4ba4d51f85f |
children | a2bf93ab3014 |
comparison
equal
deleted
inserted
replaced
46956:c5c2936f6fb2 | 46957:e7d082e4ace6 |
---|---|
48 ) | 48 ) |
49 | 49 |
50 from .utils import ( | 50 from .utils import ( |
51 procutil, | 51 procutil, |
52 stringutil, | 52 stringutil, |
53 urlutil, | |
53 ) | 54 ) |
54 | 55 |
55 | 56 |
56 class request(object): | 57 class request(object): |
57 def __init__( | 58 def __init__( |
988 _readsharedsourceconfig(lui, path) | 989 _readsharedsourceconfig(lui, path) |
989 lui.readconfig(os.path.join(path, b".hg", b"hgrc"), path) | 990 lui.readconfig(os.path.join(path, b".hg", b"hgrc"), path) |
990 lui.readconfig(os.path.join(path, b".hg", b"hgrc-not-shared"), path) | 991 lui.readconfig(os.path.join(path, b".hg", b"hgrc-not-shared"), path) |
991 | 992 |
992 if rpath: | 993 if rpath: |
993 path = lui.expandpath(rpath) | 994 path = urlutil.get_clone_path(lui, rpath)[0] |
994 lui = ui.copy() | 995 lui = ui.copy() |
995 if rcutil.use_repo_hgrc(): | 996 if rcutil.use_repo_hgrc(): |
996 _readsharedsourceconfig(lui, path) | 997 _readsharedsourceconfig(lui, path) |
997 lui.readconfig(os.path.join(path, b".hg", b"hgrc"), path) | 998 lui.readconfig(os.path.join(path, b".hg", b"hgrc"), path) |
998 lui.readconfig(os.path.join(path, b".hg", b"hgrc-not-shared"), path) | 999 lui.readconfig(os.path.join(path, b".hg", b"hgrc-not-shared"), path) |