D358: copytrace: move fb extension to core under flag experimental.fastcopytrace

quark (Jun Wu) phabricator at mercurial-scm.org
Sun Aug 20 16:50:03 EDT 2017


quark added subscribers: stash, quark.
quark added a comment.


  For config options, I think it's cleaner if we can unify them:
  
    experimental.copytrace = disable | default | fast
  
  - `disable`: no copy tracing
  - `default`: old copy tracing algorithm
  - `fast`: this algorithm
  
  I'm fine with leaving `fastcopytrace.sourcecommitlimit` config options. But if we do want to not introduce them, they could be also folded into `experimental.copytrace` option, like `fast:sourcecommitlimit=100,maxmovescandidatestocheck=200`.

INLINE COMMENTS

> copies.py:711-716
> +def _getreponame(repo, ui):
> +    reporoot = repo.origroot if util.safehasattr(repo, 'origroot') else ''
> +    reponame = ui.config('paths', 'default') or reporoot
> +    if reponame:
> +        reponame = os.path.basename(reponame)
> +    return reponame

This is also used elsewhere. I think it's worthwhile to be defined in `localrepository` class.

cc @stash Maybe it's more accurate to check `paths.default` first and fallback to `origroot`. If a user clones `ssh://x/repo-x` to `repo-x-2`, we probably want `repo-x` as the repo name. What do you think?

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D358

To: pulkit, #hg-reviewers
Cc: quark, stash, mercurial-devel


More information about the Mercurial-devel mailing list