Not being sure I understood your approach completely, and without knowing 
fossil’s internals, but knowing that it uses SQL for a lot of its work, I think 
that mostly the related SQL would have to change.

I believe a simple loop approach would just print FINFO for each file 
separately before processing the next one, right?  But that would be out of 
historic order.
The idea is to get the history of all matched files in the correct order, so if 
files A and B change, you want a display like this:

A
B
A
A
B

not this:

A
A
A
B
B

From: Stephan Beal 
Sent: Friday, October 17, 2014 10:59 AM
To: Fossil SCM user's discussion 
Subject: Re: [fossil-users] FINFO suggestion

On Fri, Oct 17, 2014 at 8:34 AM, Tony Papadimitriou <to...@acm.org> wrote:

  Would that be too much programming effort to add?  I.e., check if ‘filename’ 
is a directory and in that case return FINFO for all associated files.

If it weren't for the -status and -print options, it would require only another 
loop around the bottom part of the finfo code, but as it is i think it requires 
moving all of finfo into another routine, then calling that from a loop in 
finfo. Somewhere we've got SQL code for the filename vs dir part.

It looks like the next step would then be to allow multiple files (because at 
some point you'll just want to see the .c files, not the .h ones, and you'll 
want to pass src/*.c). That would change the semantics of current behaviour, 
though:


a) currently it is fatal to pass a non-tracked file to finfo.

b) when passing wildcards like dirname/*, it's going to happen fairly often 
that untracked files will be picked up, and it would arguably be silly to error 
out there. Remember that the wildcards get expanded before finfo gets them, so 
it cannot distinguish between wildcard expansions and other user input.

Suggestions?

i've got to log in to work in a few minutes, but will take a look at the first 
step (passing only one arg, but either a file or dir) after work.

-- 

----- stephan beal
http://wanderinghorse.net/home/stephan/ 
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those 
who insist on a perfect world, freedom will have to do." -- Bigby Wolf


--------------------------------------------------------------------------------
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
_______________________________________________
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