On Mon, Aug 27, 2012 at 6:07 PM, <v...@lavabit.com> wrote:

> I'd be very happy if I could just type:
>
> $ fossil co vim-7.3.154
>
> I'd be even happier if I could just type:
>
> $ fossil co 154
>

Not to sound too pessimistic, but...

How is fossil supposed to be able to know that 154 is supposed to mean
abcdef154xyz or xyz154abcdef, as opposed to just being a typing mistake?
This is one of those cases where the software trying to be too clever is
likely to shoot the user in the foot at least 1 time in 20 (which is too
often, IMO).

Is this just a missing feature or an intentional design choice?
>

fossil places few restrictions on tag names. How long you make them is up
to you, not to fossil. What you "would like to type" doesn't interest
fossil - it has to be able to unambiguously determine that xyz is a
"checkoutable" name, and doing that becomes very difficult (or
philosophically impossible) if it has to account for every possible
_partial_ match. It can do this for commands/subcommands because the set of
commands is finite and hard-coded into the app (and it only partially
matches at the start of a string). Branch names come from the user, and
fossil does not pretend to know what the user _intends_ (and software which
presumes to know what was intended often screws it up - google for
"auto-correction mistakes").

What if, using your example, i actually have branches named:

abc-def-ghi
abc-def
abc

Now abc is 3x ambiguous and abc-def is 2x ambiguous. That's MY fault, not
fossil's, and ignores partial matches at any position other than the start
of the name:

def-abc

now abc is 4x ambiguous and we have no heuristic for disambiguation other
than having the user tell fossil explicitly what is desired. If we added a
"fuzzy chcekout" feature it could actually break cases which currently work:

fossil co abc-def
fossil: abc-def is ambiguous: abc-def, abc-def-ghi

(doh!)

IMO the only thing fossil could reasonably be expected to do to help me
here is:

fossil branch ls

which it already does. Pair that with "grep" and a custom perl/awk/shell
script and it could provide such disambiguation, but i'm willing to bet
that any attempts to do so would disambiguate differently depending on the
developer's personal tastes and might even differ depending on
project-level conventions, e.g. using PLATFORM-VERSION, where "checkout
PLATFORM" would "prefer" the highest-numbered version for that platform
(which of course introduces the problem of sorting version numbers, which
is not always trivial in and of itself).

Just my 0.02 Euros.

PS: don't take my response too seriously: often i denounce proposals only
moments before someone else commits a patch for them ;).

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to