darcs

Issue 1552 darcs diff: timestamps are wrong

Title darcs diff: timestamps are wrong
Priority bug Status given-up
Milestone Resolved in
Superseder Nosy List darcs-devel, dixiecko, dmitry.kurochkin, jaredj, kowey, thorkilnaur, twb
Assigned To
Topics

Created on 2009-08-23.06:55:22 by twb, last changed 2017-07-30.23:57:45 by gh.

Messages
msg8370 (view) Author: twb Date: 2009-08-23.06:55:20
darcs diff produces output like this:

--- old-Preferences/.bin/ru     2009-08-23 16:52:28.211286627 +1000
+++ new-Preferences/.bin/ru     2009-08-23 16:52:28.651287107 +1000

The timestamps SHOULD reflect the last modification without and with
(respectively) the target patch.  Using an external diff, this would
involve changing the mtime of the files that diff(1) will be called
on.  I imagine an internal diff implementation would have a much
easier time of it.
msg8378 (view) Author: kowey Date: 2009-08-23.09:54:44
This does not sound particularly difficult to fix
msg8394 (view) Author: twb Date: 2009-08-23.12:02:39
On Sun, Aug 23, 2009 at 09:54:48AM +0000, Eric Kow wrote:
> This does not sound particularly difficult to fix

Well, it might make an external diff MUCH slower, if Darcs has to
calculate the mtime of all files AND set the mtime on the files it
creates.

I had the impression that Petr's work might have an purely internal
diff as one side-effect; if so, this problem is reduced.
msg10724 (view) Author: dixiecko Date: 2010-04-13.22:20:43
I would like to look on this issue (first in listing of easytofix). It
takes some time like usually :)
msg10801 (view) Author: dixiecko Date: 2010-04-23.22:04:06
What is discovered yet, please corrent me If I'm driving into incorrect
direction:

There is not functionality within darcs for setting access/modify time
for the files. Unfortunatelly this kind functionality is missing also 
within the hashed-storage.

We need to introduce the mSetFileTime into WritableDirectory class.
It is necessary include implementations within instances.

We need introduce the setFileTimes in TreeMonand from the
hashed-storage. This will probably need understanding how hashed-storage
works. I'm not sure how to use function which is for IO monad in TreeMonad.

Which function use at low-level for setting timestamp ? There is 
System.Posix.Files.setFileTimes within unix package. Does the Windows
support such Posix calls ?

thanks,
rado
msg10839 (view) Author: kowey Date: 2010-04-26.20:07:21
Sounds like a discussion, and should go on darcs-users.

If it turns out that that this is not ProbablyEasy after all, you may
want to think about trying a different bug first... depending on how
much this particular one matters to you :-)
msg11097 (view) Author: dixiecko Date: 2010-05-22.13:54:06
I'm Sorry but I have give it up. This is not trivial issue for me and
with my resources available it is impossible to move forward.

For me it seems like following: 

1. The issue is not related to diff command itself but to way how
the repository files are constructed from the patches or pristine

2. It seems that pristine maintenance is involved / timestamps of
the files in pristine

3. There is need implement function which takes the set of the
patches from the which the file consists and find the most recent
patch within its metatada.

4. Darcs 2.0 repository operations lives within the HSM monad and
I can not find the way how to:
 a) update the hashed-storage interface for setTime operation on file
 b) escape the HSM or find the place where it is possible to set time
and not being in HSM

Maybe there is possibility to write some kind of the "post
operation" which will traverse repository and set the
timestamps. It would be alterantive solution insteaf of include
update of timestamps during regular darcs operations upon
repo/pristine. It can be also exposed on the command line
interfaces like "darcs set-time-on-files"...
msg11098 (view) Author: kowey Date: 2010-05-22.14:28:20
Thanks for the attempt!  Un-marking as ProbablyEasy
History
Date User Action Args
2009-08-23 06:55:22twbcreate
2009-08-23 09:54:48koweysetpriority: bug
status: unknown -> needs-implementation
topic: + ProbablyEasy
messages: + msg8378
nosy: + jaredj
2009-08-23 12:02:42twbsetnosy: kowey, simon, twb, thorkilnaur, jaredj, dmitry.kurochkin
messages: + msg8394
2009-08-25 18:16:00adminsetnosy: + darcs-devel, - simon
2009-08-27 14:30:32adminsetnosy: kowey, darcs-devel, twb, thorkilnaur, jaredj, dmitry.kurochkin
2010-04-13 22:20:44dixieckosetnosy: + dixiecko
messages: + msg10724
assignedto: dixiecko
2010-04-23 22:04:07dixieckosetmessages: + msg10801
2010-04-26 20:07:22koweysetmessages: + msg10839
2010-05-22 13:54:08dixieckosetassignedto: dixiecko ->
messages: + msg11097
2010-05-22 14:28:21koweysettopic: - ProbablyEasy
messages: + msg11098
2017-07-30 23:57:45ghsetstatus: needs-implementation -> given-up