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

netawater standin-000 at tianya.cn
Sun Mar 29 03:37:21 EDT 2009


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.



More information about the Unison-hackers mailing list