RFR: cli: add trees command

Erik Helin erik.helin at oracle.com
Fri Apr 24 12:55:56 UTC 2020


On 4/24/20 2:41 PM, Magnus Ihse Bursie wrote:
> Interesting idea. I think you missed a proper implementation of tconfig, 
> though, if you want backwards compatibility:
>
> Your code seems to do automatic configuration, which is probably an 
> improvment :-) (but not backwards compatibility).

Yes, I should have mentioned this in the RFR email. To me there are two 
problems with original trees.py "tconfig" command:

1. It removes the ability to run the Mercurial command "config" for a
    set of trees, since the name "tconfig" is already taken by trees.py
    own "tconfig" command.
2. I don't see any reason why trees.py forces the user to run tconfig
    prior to running any other trees command (such as "tstatus"). If a
    user runs "tstatus" then it is obvious that they want to run the
    command "status" for all trees, so we might as well find all the
    trees by then if we haven't done it before.

> It's also unclear what the "tconfig = tree config" alias means.

It means that `tconfig` is an alias that runs the command `trees config` 
:) "config" is a command in Git, just as it is in Mercurial, so 
"tconfig" here simply means "run the command 'config' in all trees".

> It's not at all clear that we want or need backwards compatibility here. 
> But if not, then the tconfig command should probably be removed.

For the reasons listed above I think we should break backwards 
compatibility here, particularly since the workaround is very easy: you 
no longer have to run tconfig --set --walk :)

Or did I miss something?

Thanks,
Erik

> /Magnus
> 
> On 2020-04-24 11:27, Erik Helin wrote:
>> Hi all,
>>
>> please review this patch that adds
>> [trees](https://hg.openjdk.java.net/code-tools/trees) functionality to 
>> Skara.
>> This is mainly for those who want to use Skara for working with 
>> Mercurial today
>> and are missing the trees functionality, but I also added a couple of 
>> trees
>> "commands" like `tstatus`. `tpull` etc. to `skara.gitconfig`.
>>
>> Testing:
>> - Manual testing of both Mercurial and Git trees commands
>>
>> Thanks,
>> Erik
>>
>> -------------
>>
>> Commit messages:
>>   - cli: add trees command
>>
>> Changes: https://git.openjdk.java.net/skara/pull/599/files
>>   Webrev: https://webrevs.openjdk.java.net/skara/599/webrev.00
>>    Stats: 222 lines in 5 files changed: 210 ins; 0 del; 12 mod
>>    Patch: https://git.openjdk.java.net/skara/pull/599.diff
>>    Fetch: git fetch https://git.openjdk.java.net/skara 
>> pull/599/head:pull/599
>>
>> PR: https://git.openjdk.java.net/skara/pull/599
> 



More information about the skara-dev mailing list