[Unison-hackers] Does copyprog option do not work for local files?

Benjamin Pierce bcpierce at cis.upenn.edu
Sun Mar 29 09:32:19 EDT 2009


If you only care about the file contents (not permissions, etc.), you  
should be able to replace the body of Copy.localFile with an  
invocation of your external copy program by calling  
External.runExternalProgram.

However, depending on what you feel your time is worth, I wonder  
whether just replacing the network drive with one that works might not  
be a better solution...

Best,

    - Benjamin



On Mar 29, 2009, at 3:37 AM, netawater wrote:

> Alan Schmitt <alan.schmitt at polytechnique.org> writes:
>
>> On 28 mars 09, at 06:44, netawater wrote:
>>
>>> I try use unison to synchronize my files with copyprog option, I
>>> have set copythreshold = 0, but It seems unison does not call my
>>> copy program.
>>>
>>> I have studied the copy.ml, and found these expressions in file
>>> function
>>>
>>> match rootFrom, rootTo with
>>>   (Common.Local, fspathFrom), (Common.Local, realFspathTo) ->
>>>     localFile
>>>       fspathFrom pathFrom fspathTo pathTo realPathTo
>>>       update desc (Osx.ressLength ress) (Some id);
>>>     Lwt.return ()
>>>
>>> It means if it found there are local files, it will call localFile
>>> function
>>> so that copyprog is ignored.
>>
>> Yes, it is correct. To be precise, copyprog is called:
>> - when one file is remote
>> - when the remote file is missing (i.e. it's a file creation, not a
>> file modification)
>> - when the remote file is bigger than the threshold.
>>
>> Alan
>> _______________________________________________
>> Unison-hackers mailing list
>> Unison-hackers at lists.seas.upenn.edu
>> http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers
>
> Thanks for you reply.
>
> My situation is I want to synchronize my files from my local driver C:
> to a network driver \\Wua141699 in Windows. The network drive is not
> very stable and I need use my copy program to copy and verify files
> instead unison's native copy method.
>
> Can I make this happen? I have tried hard but I can not finish it.
>
> _______________________________________________
> Unison-hackers mailing list
> Unison-hackers at lists.seas.upenn.edu
> http://lists.seas.upenn.edu/mailman/listinfo/unison-hackers



More information about the Unison-hackers mailing list