[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [Issue 1256] Ability to preserve last modification time (mtime) of files under version control

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Wed, 11 Nov 2009 10:45:53 +0000

Edmund Wong wrote:
> Edmund Wong wrote:
> > http://subversion.tigris.org/issues/show_bug.cgi?id=1256
> >
> I was looking at this issue and thought I'd give it a
> try; but, then I noticed Kristofer Henriksson had already
> attached a patch to the issue. Is this patch supposed
> to fix the issue?

This issue first needs a functional spec, giving the information you
would expect to find about it in a good Subversion reference manual. It
could be based on the following outline:

[[[

OUTLINE OF A

FUNCTIONAL (BEHAVIOURAL) SPECIFICATION FOR

MTIME PRESERVATION (ISSUE #1256)

  * High-level semantics we are trying to achieve:

    - Whenever Subversion puts or modifies a file (or directory?) in the
WC, it shall set the node's mtime in the WC to the mtime recorded for
that node. (?)

    - Whenever Subversion modifies a file (or directory?) in the WC, and
there are local changes to that node, such as when updating a file that
the user has been editing, it shall ... (?)

    - What level of control over the behaviour should the users have?
Per client? Per node? Per action (export vs. checkout vs. update, etc.)?

    - Backward compatibility issues: ...

  * Specification of the behaviour in all the cases:

    Data Storage:

    Mtime shall be stored in a versioned property named 'svn:mtime' (?).
Any file or directory (?) may have this property. The format of the
property value is (?) and is the time in UTC (?)

    Behaviour of Each Action:

    The behaviour of each svn action that may affect a node in the WC
is, for a file 'foo' with mtime 'M(foo)' and recorded 'svn:mtime'
property value 'R(foo)', and a directory 'dir' with 'M(dir)' and
'R(dir)' respectively:

    - add
      ...

    - import
      ...

    - commit
      ...

    - export
      ...

    - checkout
      ...

    - update/switch that brings in a change
      ...

    - update/switch that brings in NO change
      ...

    - ...

    When is the mtime read or written in each case? What if the user
changes the 'svn:mtime' property manually: will Subversion use the mtime
off disk or the value the user set?

    What happens in each case if we request the mtime be set, but no
'svn:mtime' property exists on the node?

  * Controlling the behaviour:

    - An option in the client config file? Does it control whether the
mtime is read, or whether the mtime is written, or both?

    - How does it interact with the "use-commit-times" option?

]]]

If you are interested in designing this feature, please go for it! Lots
of people want it.

(The patch you saw in the issue doesn't appear to have a spec or any
documentation or even a log message. I'm sure it does some key parts of
what will be needed, but that's not enough.)

- Julian

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2416479
Received on 2009-11-11 11:46:25 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.