Better name for dpush wanted

Ian Clatworthy ian.clatworthy at internode.on.net
Wed Apr 29 08:24:26 BST 2009


Aaron Bentley wrote:
> Ian Clatworthy wrote:
>> Putting my "better UI" hat on, I'm thinking of writing a spec called
>> something like "one concept, one command". It would suggest things
>> like turning init-repo into init --repo.
> 
> I don't like this idea at all.  You wind up turning one command into
> several commands with no clear usage statement, because it varies
> according to what "actual" command you're doing.  You get boatloads of
> options that can only be used when particular other "options" (that are
> really subcommands) are used.

That's possible but not necessarily true. The flip-side to having
multiple commands is that you can end up struggling to find the command
you want and, in some cases, a large number of options get repeated
across commands. Or they ought do. Take log and missing for example: now
that log is much more powerful, users want most of those new options
available on missing. (I'm not trying to claim that log and missing
should be the one command, but I am saying that it's a balancing act and
multiple commands isn't always the better choice.)

> We have this already with shelve --list, and I hate, hate, hate it.
> What does "shelve --list --destroy" mean?

Not much. But neither does "upgrade --1.6 --1.9". Sounds to me like
--list and --destroy are values of a registry option called something
like 'action'.

To me, "one concept, one command" implies something like:

* shelve = put things on a shelf
* unshelve = take things off a shelf
* ??? = view/manage things on the shelves

I don't think ??? ought to be called 'ls-shelf' either because then
adding management features to that command would feel wrong.

Compare:

* tag = create/update a tag
* tags = list/manage the/a set of tags

(Right now, tags only lists the tags but I'm planning to add a --clean
option to clean out crap tags. It could also take a list of tag names to
only list/clean those tags.)

> I also don't see how "one concept, one command" applies to turning
> init-repo into init --repo.  To me, they're not the same concept at all.

Initialisation is one concept - it ought to be one command. Compare
info, upgrade & reconfigure. This will become more important when what
we want to initialise is not just a branch nor a repo, but a combination
of the two (e.g. colocated branches).

Ian C.



More information about the bazaar mailing list