[Commented On] D8948: rewriteutil: extract evolve code used to replace obsolete hashes in commits
mharbison72 (Matt Harbison)
phabricator at mercurial-scm.org
Thu Aug 27 12:24:20 UTC 2020
mharbison72 added a comment.
In D8948#134127 <https://phab.mercurial-scm.org/D8948#134127>, @marmoute wrote:
> In D8948#134126 <https://phab.mercurial-scm.org/D8948#134126>, @mharbison72 wrote:
>
>> In D8948#134093 <https://phab.mercurial-scm.org/D8948#134093>, @marmoute wrote:
>>
>>> There are already a `mercurial/rewriteutils.py` files I think it should go there
>>
>> So that causes a cycle:
>>
>> --- c:/Users/Matt/hg/tests/test-check-module-imports.t
>> +++ c:/Users/Matt/hg/tests/test-check-module-imports.t.err
>> @@ -38,3 +38,5 @@
>> > -X tests/test-imports-checker.t \
>> > -X tests/test-verify-repo-operations.py \
>> > | sed 's-\\-/-g' | "$PYTHON" "$import_checker" -
>> + Import cycle: mercurial.cmdutil -> mercurial.rewriteutil -> mercurial.localrepo -> mercurial.extensions -> mercurial.cmdutil\r (esc)
>> + [1]
>>
>> That is really only used for type checking, so is that safe to move under `if pycompat.TYPE_CHECKING:` with the typing related imports, or is there another way to do this? Or should I just drop the type checking?
>
> I am a bit confused about your question. What is "That" ?
The `mercurial.localrepo` import in a subsequent patch. That import is only used for the `# type: ...` comment on the function.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8948/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8948
To: mharbison72, #hg-reviewers, marmoute
Cc: marmoute, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200827/b9983894/attachment-0002.html>
More information about the Mercurial-patches
mailing list