[PATCH RFC] rename manifest command to files
Dan Villiom Podlaski Christiansen
danchr at gmail.com
Sat Apr 30 09:03:53 CDT 2011
On 30 Apr 2011, at 10:17, Adrian Buehlmann wrote:
> On 2011-04-30 09:58, Dan Villiom Podlaski Christiansen wrote:
>>
>> On 30 Apr 2011, at 09:04, Adrian Buehlmann wrote:
>>
>>> On 2011-04-30 08:42, Adrian Buehlmann wrote:
>>>> On 2011-04-29 22:42, Adrian Buehlmann wrote:
>>>>> # HG changeset patch
>>>>> # User Adrian Buehlmann <adrian at cadifra.com>
>>>>> # Date 1304106171 -7200
>>>>> # Node ID 2a66906672c124567829abdc67e4f81b8d635cef
>>>>> # Parent 98f79a5c308665e1ce1b020bb66ed37f47f102e6
>>>>> rename manifest command to files
>>>>
>>>> It might be worth noting that darcs has a 'darcs show files'
>>>> command
>>>> with (!) an alias 'darcs show manifest' (they call it an alias
>>>> themselves [1], even though it seems to have slight differences in
>>>> behavior compared to their 'show files').
>>>
>>> Heh. Even better :-). Their changelog [2] says for the darcs
>>> 2.0.0pre2
>>> release:
>>>
>>> <quote>
>>> The subcommand 'query manifest' is renamed to 'show files', ...
>>> </quote>
>>>
>>> [2] http://darcs.net/releases/branch-2.5/NEWS
>>
>> Rather than adding a new command, wouldn't it be worthwhile to
>> combine
>> locate and manifest into one command?
>
> I'd rather like to keep this discussion focused on what I proposed:
> renaming the *current* "manifest" command to "files", that is, having
> "files" in the list of commands that are shown on "hg help" instead of
> "manifest" and keeping the command name "manifest" as an alias and for
> backward compatibility.
>
> In this patch (and thread), I have *not* proposed to add a new
> command.
Well, we still have two commands, currently; locate & manifest. They
do *mostly* the same things. Namely:
$ hg manifest | tail -n1
tests/tinyproxy.py
$ hg manifest -v | tail -n1
755 * tests/tinyproxy.py
$ hg manifest --debug | tail -n1
301fa977ccd17f37133e47c1cecc4d1318ecc74a 755 * tests/tinyproxy.py
The only option 'hg manifest' takes is '-r'
The locate command works on the working copy by default:
$ hg locate | tail -n1
tests/tinyproxy.py
$ hg locate -v | tail -n1
tests/tinyproxy.py
$ hg locate --debug | tail -n1
tests/tinyproxy.py
$ hg locate --debug | tail -n1
tests/tinyproxy.py
$ hg loc -X '**.py' | tail -n1
tests/test-wireproto.t
$ hg loc -I '**.t' | tail -n1
tests/test-wireproto.t
But:
$ hg locate '**.py' | tail -n1
tinyproxy.py
$ hg loc '**.t' | tail -n1
test-wireproto.t
(That they don't all print out relative paths is probably a bug, but I
have no idea whether we can fix it under our backwards compatibility
guarantees.)
'locate' takes loads of options, including -r/--rev, -0/--print0, -f/--
fullpath, -I/--include and -X/--exclude.
So, which of these should be ‘files’? Which of them makes sense? One
possible option is to deprecate both manifest & locate, and replace
them with a ‘files’ command that includes the functionality of both.
(FWIW all of the commands were executed in ‘~/src/opensrc/vcs/
mercurial/tests’.)
--
Dan Villiom Podlaski Christiansen
danchr at gmail.com
More information about the Mercurial-devel
mailing list