This is an archive of the discontinued Mercurial Phabricator instance.

copies: extract function for deciding whether to use changeset-centric algos
ClosedPublic

Authored by martinvonz on Mar 20 2019, 3:03 PM.

Details

Summary

We'll eventually have a "experimental.copies.read-from=changeset-only"
option too and I don't want to spread the logic for determining if we
should use changeset-centric of filelog-centric algorithms.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

martinvonz created this revision.Mar 20 2019, 3:03 PM
pulkit added a subscriber: pulkit.Mar 20 2019, 3:11 PM
pulkit added inline comments.
mercurial/copies.py
163

maybe we need to have D2010, but we can drop algo (and maybe use also) from the name I guess.

martinvonz added inline comments.Mar 20 2019, 3:17 PM
mercurial/copies.py
163

I initially didn't have use and found it less clear. I also think "use changeset-centric" sounds weird. Maybe just changesetcentric as you said then, but that also seems unclear. It feels like we're working around D2010. I can accept that we don't want to queue that, but I don't really like any of the shorter names either. Maybe the current name is fine given the docstring?

martinvonz added inline comments.Apr 2 2019, 12:49 PM
mercurial/copies.py
163

Or maybe there's another name that would work? Maybe usecontextbasedalgo? Or shouldgetcopiesfromcontext? Other suggestions?

pulkit added inline comments.Apr 3 2019, 7:49 AM
mercurial/copies.py
163

I don't have any concerns on name in specific. I was trying to work around D2010 in the above suggestion.

martinvonz added inline comments.Apr 3 2019, 9:04 AM
mercurial/copies.py
163

Does that mean you're okay with the current form of this patch?

pulkit added inline comments.Apr 4 2019, 1:34 PM
mercurial/copies.py
163

Yes.

This revision was automatically updated to reflect the committed changes.