Hi Kevin, all
 
> Mon Jun 11 21:15:16 MST 2007  Kevin Quick <[EMAIL PROTECTED]>
>   * Provide [DarcsFlag] command-line options to copyLocal
> 
> Wed Jun 13 12:37:42 MST 2007  Kevin Quick <[EMAIL PROTECTED]>
>   * Added --nolinks option to request actual copies instead of hard-links for 
> files.

I was a :wq away from accepting this patch, when something occurred to
me.  The feature does seem useful, and I am just wondering if we could
implement it with a somewhat lighter touch.

If I'm reading the code right, the hard-link code is used for at least
two things:

 * fetchFile/gzFetchFile - links/copy/downloads a file into a temporary
     directory
     
 * copy_repo_patches - copying the patch files
 
Now, would you agree that only the latter is important?  (Anyway,
linking here seems unlikely for the former, as /tmp is usually on a
separate partition).  If that is the case, maybe we could get the same
benefits by having two versions of copyFileOrUrl, one of which supports
NoLinks.

The patch Kevin made is pretty straightforward stuff, just modify
copyLocal to track [DarcsFlag].  The only annoying thing is that as a
consequence, a lot of unrelated functions (see below) are getting
splattered with the extra argument by their association with copyLocal

Perhaps having *two* copyFileOrUrl functions would be a lesser evil than
splattering all those poor little functions (*) What do you (all) think?  

Also, having done some small tests and ls -i _darcs/patches, I get the
impression that this flag would only be relevant for darcs get.  Please
feel correct me on this!  I haven't stared hard enough at the code to
say so for sure.

(*) To be honest, my hesitation wrt splattering is basically visceral

Splattered functions
--------------------
If my grepping is right...

copyFileOrUrl
copyLocal
createPartialsPristineDirectoryTree
createPristineDirectoryTree
createPristineDirectoryTree
fetchFilePS
fetchFileUsingCache
get_checkpoint_sloppily
get_whole_repo_patches
gzFetchFilePS
identifyRepoFormat
lazily_read_repo
optimizeInventory
read_checkpoints
read_checkpoints
read_repo
read_repo_private
remove_from_checkpoint_inventory
tags_cmd
withRecorded
write_checkpoint
write_checkpoint_patch
write_either_inventory
write_inventory
write_recorded_checkpoint
write_tentative_inventory

-- 
Eric Kow                     http://www.loria.fr/~kow
PGP Key ID: 08AC04F9         Merci de corriger mon français.

Attachment: pgpeRjP5KnmOb.pgp
Description: PGP signature

_______________________________________________
darcs-devel mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-devel

Reply via email to