monotone - Bugs: bug #11145, save and restore ctime and mtime
You are not allowed to post comments on this tracker with your current authentication level.
bug #11145: save and restore ctime and mtime
Submitter: | None | ||
Submitted: | Sat 27 Nov 2004 06:33:25 AM UTC | ||
Votes: | 70 | ||
Category: | None | Severity: | 1 - Wish |
Item Group: | feature request | Status: | None |
Privacy: | Public | Assigned to: | None |
Open/Closed: | Closed | ||
mtn version --full: |
|
Jump to the original submission
Wed 19 Jul 2006 05:35:53 PM UTC, comment #10: |
Erik MT <codehappy> |
Wed 19 Jul 2006 05:39:54 AM UTC, comment #9: Re: wikipedia: the table looks accurate to me. A common point of confusion about unix file times is whether "ctime" has anything to do with file creation; it does not. It tracks the last time the file's metadata was changed (e.g., changing its permissions or setting the mtime manually are two of the things that cause ctime to be updated). That might explain some of our confusion. (I hope win32 does not call file creation time "ctime", that would make things even more horribly confusing.)
|
Nathaniel Smith <njs> |
Tue 18 Jul 2006 10:24:14 AM UTC, comment #8: in response to Nathaniel:
|
Erik MT <codehappy> |
Tue 18 Jul 2006 09:38:14 AM UTC, comment #7: P.S. I looked at the wikipedia article.
|
Erik MT <codehappy> |
Tue 18 Jul 2006 06:58:23 AM UTC, comment #6: A few quick notes:
|
Nathaniel Smith <njs> |
Tue 18 Jul 2006 05:18:25 AM UTC, comment #5: Thank you for the explaination. Apologies if I came across sounding like a hot-head. am just pretty frustrated from having spent so much time and energy trying to come up with an scm soltuion that is going to work for me. All I want to do is get back to work writing code. But my project has gotten too big to manage without scm. and I am spending days and days, reading reviews and manuals on what should have been a trivial fundamental.
|
Erik MT <codehappy> |
Mon 17 Jul 2006 06:42:22 AM UTC, comment #4: Wow, I'm surprised about the vigorous opinions on the matter! I hope I can elaborate on the topic a bit without stepping on any toes; I stand by my initial statement that I'd at least be happy to integrate patches implementing this sort of functionality via attributes (including patches to extend how attributes work). I just want to explain why things are the way they are now.
|
graydon hoare <graydon> |
Mon 17 Jul 2006 03:30:54 AM UTC, comment #3: Also relevant: http://lists.gnu.org/archive/html/monotone-devel/2006-07/msg00207.html , and particularly Graydon's reply. |
Timothy Brownawell <tbrownaw> |
Mon 17 Jul 2006 02:56:04 AM UTC, comment #2: er uh, I'm confused by the LACK of this functionality. What is it that I am not understanding? I gave up on subversion because it lacked this - but especially because the subversion dev's had an attitude about even considering that this be added.
|
Erik MT <codehappy> |
Wed 26 Apr 2006 12:28:22 AM UTC, comment #1: This would probably use attributes now. Difficulties: mtime would have to be automatically updated (by a hook or something), while AIUI attrs can only be modified manually ATM. We'd need a special merger for these attrs, too. |
Timothy Brownawell <tbrownaw> |
Sat 27 Nov 2004 06:33:25 AM UTC, original submission:
when a revision is committed presently the ctime and mtime are not saved later when the revision is checked out these cannot be restored the files in that revision on disk appear as brand-new with a current date and not their appropriate dates which should be earlier than the time that revision was checked in
|
Anonymous |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 70 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 3 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2007-11-25 | tbrownaw | Open/Closed | Open | Closed | |
2006-07-17 | tbrownaw | Severity | 3 - Normal | 1 - Wish | |
2006-07-17 | codehappy | Carbon-Copy | - | Added codehappy |
Powered by Savane 3.13-4b48.
Corresponding source code
quote: Files that were modified by the update, keep their old mtime.
I assume you ment to say NOT modified ?
This behavior is different/better than subversion, which always modifies the mtime, as far as I can tell, from the testing that I did.
-------------
quote: (I hope win32 does not call file creation time "ctime", that would make things even more horribly confusing.)
Ah, no wonder I am so confused. In the windows api ctime does refer to "creation time". I did assume that in Linux, references to ctime meant CREATION time. Below are excerpts from the windows api manual.
Thank you for being so patient and explaining this to me, I appreciate it. I am ignorant not stupid, there is a difference.
I am puzzeled that Linux lacks this property/concept. I'm fairly new to *nix, and don't claim to be a file systems expert, but every other file system I've delt with from the Heath H8 on up, has had this concept. People like to know when something was created and windows goes to great lengths to preserve this value.
-------------------------
Excerpts from Windows api manual:
The _fstat function obtains information about the open file associated with handle and stores it in the structure pointed to by buffer. The _stat structure, defined in SYS\STAT.H, contains the following fields:
st_atime - Time of last file access.
st_ctime - Time of creation of file.
st_mtime - Time of last modification of file.
--------------------
The STATSTG structure contains statistical information about an open storage, stream, or byte array object. This structure is used in the IEnumSTATSTG, ILockBytes, IStorage, and IStream interfaces.
typedef struct tagSTATSTG
{
LPWSTR pwcsName;
DWORD type;
ULARGE_INTEGER cbSize;
FILETIME mtime;
FILETIME ctime;
FILETIME atime;
DWORD grfMode;
DWORD grfLocksSupported;
CLSID clsid;
DWORD grfStateBits;
DWORD reserved;
} STATSTG;
mtime - Indicates the last modification time for this storage, stream, or byte array.
ctime - Indicates the creation time for this storage, stream, or byte array.
atime - Indicates the last access time for this storage, stream or byte array.
--------------------
{In the windows api, all file time properties are settable; but only on files, not folders}
The SetFileTime function sets the date and time that a file was created, last accessed, or last modified.
BOOL SetFileTime(
HANDLE hFile, // handle to the file
CONST FILETIME *lpCreationTime, // time the file was created
CONST FILETIME *lpLastAccessTime, // time the file was last accessed
CONST FILETIME *lpLastWriteTime // time the file was last written
);
The FILETIME structure is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601.