This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Unison 2.10.2 fast update check broken?


Hi Marcus.  Thanks for the report.

> Seems that Cygwin port of the unison file synchronizer does not do the
> -fastcheck very well. Transcript follows:
> 
> # Start of transcript
> 
> # creates archives for first time
> $ cd /tmp ; touch a b ; /bin/unison-2.10.2 ./a ./b
> ...
> 
> $ touch a
> 
> $ /bin/unison-2.10.2 -fastcheck true -times -debug verbose ./a ./b
> ...
> 
> # now output shows that file contents is checked, ie. the "Double-check
> # possibly updated file" line, which is correct, since we did a touch
> 
> $ /bin/unison-2.10.2 -fastcheck true -times -debug verbose ./a ./b
> ...
> 
> # BUG: outputs again the "Double-check possibly updated file" line for file
> # 'b', ie. file content is checked even if no mods.
> 
> # End of transcript

I think this is the expected behavior, since a and b have the same 
contents.  When Unison observes the different timestamps, it flags the 
files as possibly different and prints the "Double-check" message.  Then 
it looks more carefully, and determines that their contents are in fact 
the same, so no update is propagated.  That includes the timestamps, 
even though you specified -times.  So then when you run the operation 
again, the same thing happens because nothing was changed on the 
previous run.

The effect of -times is to make Unison synchronize the timestamps when 
an update is needed because the file contents are different.  It doesn't 
make the timestamps sufficient to determine that files are different.  
At least, that's my reading of the manual.

> The above transcript functions as
> expected using linux or native Win32 unison builds.

Hm, are you sure?  If so, then that blows away my carefully constructed 
explanation above.

I've looked at the set of patches that I applied to get Unison 2.10.2 
running in Cygwin, and I don't see anything there that would obviously 
affect the -fastcheck option.  But it's possible, and if you show me the 
evidence I'll look into it.

HTH,
Andrew.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]