<<< Date Index >>>     <<< Thread Index >>>

access time changes when saving mbox with deleted messages



Hi,

I tried to put my mailboxes yesterday under version control with
subversion (svn) and had to find out that mutt and svn don't play nicely
together.  Whenever I open a mbox file and delete a bunch of mails
(without adding mails) `svn diff` won't notice the changes, although
plain diff against the local repository copy in .svn/text-base/ shows
that changes are in fact made.

Turns out that mutt doesn't change modification times on the mbox
file.  The offending code is in the function mbox_sync_mailbox() in
mbox.c.  There the following code restores the modification time:

  /* Restore the previous access/modification times */
  utimebuf.actime = statbuf.st_atime;
  utimebuf.modtime = statbuf.st_mtime;
  utime (ctx->path, &utimebuf);

I commentented out the above lines, and sure enough, svn diff works now
as expected.

So the question here is: Why does mutt restore the modification times?
What's the rationale behind that?

Thanks,
Viktor

PS: Anybody from mutt-dev reading this?  I'm not subscribed, so I can't
post to mutt-dev.
-- 
!!! Listen live to reboot.fm !!!
 
Tune in to 104.10 MHz if you're in Berlin, Germany or listen to the internet
stream at http://www.reboot.fm/stream/ .

Attachment: signature.asc
Description: Digital signature