D4125: narrow: add '--extend' flag to tracked command
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Thu Aug 23 17:03:39 EDT 2018
pulkit planned changes to this revision.
pulkit added inline comments.
INLINE COMMENTS
> martinvonz wrote in narrowcommands.py:303
> nit: `--extend` may be too generic. How about `--addfromfile`? Can be done in a follow-up if you agree.
I thought about `--addfromfile` and dropped it because you can both add and remove includes and excludes using this option. Add in other flags means adding either include or exclude specs.
I am fine if that looks good to you. I don't feel strongly.
> martinvonz wrote in narrowcommands.py:352
> Why is it required to be in the working directory? Why not accept any kind of path? I don't know if it's intentional or not, but I think this also means that `cd dir; hg tracked --extend foo` will attempt to read `foo` from the repo root and not from the current directory, which may be confusing to users.
That's a nice idea. I just copied sparse behavior here. I will update with suggested idea.
> martinvonz wrote in narrowcommands.py:360
> could you send a patch to fix the typoed "supported" on narrowspec.py too?
Sure!
> martinvonz wrote in narrowcommands.py:361-362
> nit: is the `list` conversion necessary?
not sure, I will check and remove if not required.
> martinvonz wrote in test-narrow-trackedcmd.t:3-6
> are treemanifests relevant to this test?
Nope, I will use testcase here and add test for both cases.
> martinvonz wrote in test-narrow-trackedcmd.t:52-86
> any reason not to add these from the beginning (i.e. before creating the clone)?
I just copied these from one of the other existing test files.
> martinvonz wrote in test-narrow-trackedcmd.t:91
> This is part of why I don't like `--extend`: it sounds like it can be given without a parameter
hm, do you have a functionality in mind for `hg tracked --extend` without a parameter?
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D4125
To: pulkit, durin42, #hg-reviewers
Cc: martinvonz, mercurial-devel
More information about the Mercurial-devel
mailing list