Mercurial > hgrepos > DevTools > mercurial-extensions
changeset 387:299fec856e23
Rename parameter "tsconfig" to "tsconfigname" in _gen_matcher_from_tsconfig
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Wed, 17 Jul 2019 22:47:57 +0200 |
| parents | 1c1a360edc86 |
| children | 423ec8fad8d7 |
| files | extensions/timestamps.py |
| diffstat | 1 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/extensions/timestamps.py Wed Jul 17 09:01:49 2019 +0200 +++ b/extensions/timestamps.py Wed Jul 17 22:47:57 2019 +0200 @@ -476,7 +476,7 @@ repo = ctx.repo() if not repo.local(): raise error.Abort(_(b"repository is not local")) - tsconfmatch = _gen_matcher_from_tsconfig(ctx, tsconfig=tsconfig, ui=ui) + tsconfmatch = _gen_matcher_from_tsconfig(ctx, tsconfigname=tsconfig, ui=ui) if tsconfmatch is None: raise error.Abort(_(b"timestamps are not activated/configured")) if amend: @@ -500,7 +500,7 @@ repo = ctx.repo() if not repo.local(): raise error.Abort(_(b"repository is not local")) - tsconfmatch = _gen_matcher_from_tsconfig(ctx, tsconfig=tsconfig, ui=ui) + tsconfmatch = _gen_matcher_from_tsconfig(ctx, tsconfigname=tsconfig, ui=ui) if tsconfmatch is None: raise error.Abort(_(b"timestamps are not activated/configured")) if destdir is None: @@ -524,7 +524,7 @@ # # NOTE: no need for a local repo here # - tsconfmatch = _gen_matcher_from_tsconfig(ctx, tsconfig=tsconfig, ui=ui) \ + tsconfmatch = _gen_matcher_from_tsconfig(ctx, tsconfigname=tsconfig, ui=ui) \ or _matchmod_never(ctx.repo().root, b"") ts = _Timestamps.from_ctx(ctx, ui, name=TIMESTAMPS_DATABASE) if ts is None: @@ -574,7 +574,7 @@ repo = ctx.repo() if not repo.local(): raise error.Abort(_(b"repository is not local")) - tsconfmatch = _gen_matcher_from_tsconfig(ctx, tsconfig=tsconfig, ui=ui) + tsconfmatch = _gen_matcher_from_tsconfig(ctx, tsconfigname=tsconfig, ui=ui) if tsconfmatch is None: raise error.Abort(_(b"timestamps are not activated/configured")) if amend: @@ -600,7 +600,7 @@ ts.write(fp) -def _gen_matcher_from_tsconfig(ctx, tsconfig=None, ui=None): +def _gen_matcher_from_tsconfig(ctx, tsconfigname=None, ui=None): """Read the configuration file and return a Mercurial matcher which is configured. @@ -611,14 +611,14 @@ repo = ctx.repo() ui = ui or repo.ui configdata = configname = None - if tsconfig: + if tsconfigname: try: - with io.open(tsconfig, "rb") as fp: + with io.open(tsconfigname, "rb") as fp: configdata = fp.read() except IOError: pass else: - configname = tsconfig + configname = tsconfigname else: try: configdata = ctx[TIMESTAMPS_CONFIGFILE].data()
