You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2009/04/09 18:48:24 UTC

DO NOT REPLY [Bug 47010] New: Sync task cannot compare file contents

https://issues.apache.org/bugzilla/show_bug.cgi?id=47010

           Summary: Sync task cannot compare file contents
           Product: Ant
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Other
        AssignedTo: notifications@ant.apache.org
        ReportedBy: peger@automotive.com


Recently was working with some build scripts and found a deficiency in the
“Sync” task, namely that it cannot actually compare file content and instead
works strictly off file date. This was not usable for us and so I implemented
the attached task, that will sync two directory trees based on file contents (a
poor man's rsync to be sure). I am submitting for inclusion in core or contrib,
or if you’d like to refactor and integrate into the existing Sync task
(foolishly, i did not look at the code for Sync at all).

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 47010] Sync task cannot compare file contents

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47010

Parag Doke <pa...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |parag.doke+techie@gmail.com

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 47010] Sync task cannot compare file contents

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47010





--- Comment #1 from peger <pe...@automotive.com>  2009-04-09 09:49:25 PST ---
Created an attachment (id=23475)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23475)
The code

Bugzilla acting funky, rejected initial upload

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 47010] Sync task cannot compare file contents

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47010

--- Comment #3 from Parag Doke <pa...@gmail.com> 2011-06-16 08:18:12 UTC ---
I think the copy task won't delete extra content from the destination, whereas
the sync task does this. I agree with peger's request. There needs to be some
mechanism to compare files apart from the timestamp.

In my case, the sync task just dumps everything from the source (a ClearCase
dynamic drive folder) to the target, even if a lot of files haven't changed.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 47010] Sync task cannot compare file contents

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47010


J.M. (Martijn) Kruithof <jk...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




--- Comment #2 from J.M. (Martijn) Kruithof <jk...@apache.org>  2009-04-25 03:28:06 PST ---
In case you also want to compare the complete file contents, wouldn't it be
more efficient / logical to just use copy?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 47010] Sync task cannot compare file contents

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47010

--- Comment #4 from Dominique Devienne <dd...@gmail.com> 2011-06-16 14:27:11 UTC ---
When I prototyped <sync> I tried comparing files, but it was actually slower
than just copying the source files directly on top of existing files. IMHO
there's no point of fully reading the source and destination file just to
figure out the copy is not necessary. Well at least in my case the source was
almost always way slower to read from than to write to the local destination
folder.

I guess it's possible comparing the files might be faster in some cases than to
just use the overwrite attribute, but I'd like to see actual numbers :)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 47010] Sync task cannot compare file contents

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47010


Stefan Bodewig <bo...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable




-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.