On Sun, 19 Oct, to...@acm.org wrote:

> 1. An SQL SELECT on the tag and keyword list decides whether to treat
> a word that has no slash as keyword/tag (exists), or filename (not
> exists).  If there is a slash it is always a filename.

One could check whether it exists in the file system and one could
check whether exists as tag/branch and decide to use the one that
exists. However, if "trunk" exists both, as branch and as
file/directory, then a priority decision has to be done anyway and this
seems strange as you cannot rely on the behaviour when writing generic
fossil interaction scripts.

> 2. A possibly faster executing way (without having to run SQL to
> check tags), but less user-friendly due to the required extra typing,
> is to consider a filename a word that has to either include a slash
> anywhere inside it, or be just the single/double dot special notation
> -- anything else it's considered a keyword/tag:

This is all fine for interactive command line usage if you realize as
human "oh wait, there may be an ambiguity, I'll handle it". But it does
not work well for writing scripts that work with fossil.

> 3. Use a special prefix (like @) to denote you need to refer to a
> filename (example: @filename) instead of keyword/tag.  This is
> possible the easiest to implement as it requires a simple check of
> the first character of a word.

I find the usage of @ awkward because it usually means "response file".

But why not just use some switch to indicate that the following
argument is a file/directory rather than a branch/tag/...?

  fossil timeline -f README.txt

This way the previous behaviour would be completely unaltered without
any compatibility issues, but the new way is possible as well by just
adding -f (or whatever) to the command. Alternatively one could
introduce a new command "ftimeline", but I think a switch would be
sufficient.

Greetings,
Stefan

-- 
Stefan Bellon
_______________________________________________
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