[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] File diff command-line UI thoughts
From: |
graydon hoare |
Subject: |
Re: [Monotone-devel] File diff command-line UI thoughts |
Date: |
13 Nov 2003 15:23:59 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Kevin Smith <address@hidden> writes:
> Other monotone commands require you to specify the type of the id,
> such as "manifest" or "file". Which, by the way, I find slightly
> irritating. Why can't it just figure out whether I have given it a
> file's id or a manifest's id, and do the right thing?
because if I only write "a3f" there's actually a reasonable chance of
it completing differently as a file or a manifest. remember we accept
unambiguous SHA1 prefixes :(
I'd accept patches which change: "monotone cmd file <id>" to "monotone
fcmd <id>", or providing the latter as a synonym. or if you can figure
something else which feels better, by all means try it.
> Anyway, without changing the existing ui, the best I can think of is
> to add a 'filediff' or 'fdiff' command. But I still have ambiguity
> between the second and third command formats shown above. Any
> thoughts on how the file diff command should really be added?
iirc njs and tromey suggested "sub-command arguments" for this
problem, i.e. "monotone diff -r <id> -f <filename>", or such.
I suppose I'd be OK with that, or with trying on a heuristic. say
check to see if the argument is the name of a file in the manifest,
and if not (and if it's pure hex digits) try expanding it. it might be
nice to have a way of marking an argument as an explicit path or id,
though, for machine-operation (vc-monotone.el, say)
generally I'm pretty flexible on the UI. it's a matter of what feels
best for the most users. that's empirical; we have to try stuff and
take feedback. I don't mind changing it around to suit preferences.
-graydon