You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Frans Knibbe <fr...@geodan.nl> on 2007/03/01 14:18:45 UTC

Re: Is there really no way to keep the file modification time intact?


Ryan Schmidt wrote:
>
> On Feb 27, 2007, at 08:37, Frans Knibbe wrote:
>
>>> Only if you put the file time in a custom property which you restore
>>> after checking out.
>>
>> Yes, I thought about that too. That way, the file modification time 
>> would not be really lost but just stored in a different way. And if 
>> something like a post-checkout hook existed I could even reset the 
>> file time of the working copy. But such a hook does not exist....
>
> Not only is there no post-checkout hook [1] but hooks run on the 
> server, and it sounds like you are asking for hook that runs on the 
> client. No Subversion hooks currently run on the client, so this would 
> be much work to implement. And I believe that because of potential 
> platform differences and differences in installed scripting languages 
> on clients, client-side hooks are a very prickly proposition.
>
> Sounds like you should just be writing a wrapper script to go around 
> "svn checkout", which itself calls svn checkout, then mucks with the 
> modification dates of the checked-out files in whatever way you like.
>
>
> [1] I did write a script to implement a post-checkout hook, but it is 
> a server-side script, of course; it does not do anything on the client:
> http://www.ryandesign.com/svnhookdispatcher
Thank you for your suggestions. I have done some testing and I think I 
will choose the option to set the system time to the file modification 
time before each commit. It is a simple solution and I think it is 
sufficient for our purposes. All migrated files will have recorded 
commit times equalling file modification times. All future changes will 
just have a commit time, but this time will not differ much from the 
file modification time if users don't wait too long before comitting.

Cheers,

Frans


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Is there really no way to keep the file modification time intact?

Posted by Frans Knibbe <fr...@geodan.nl>.

Les Mikesell wrote:
> Frans Knibbe wrote:
>>
>>> Sounds like you should just be writing a wrapper script to go around 
>>> "svn checkout", which itself calls svn checkout, then mucks with the 
>>> modification dates of the checked-out files in whatever way you like.
>>>
>>>
>>> [1] I did write a script to implement a post-checkout hook, but it 
>>> is a server-side script, of course; it does not do anything on the 
>>> client:
>>> http://www.ryandesign.com/svnhookdispatcher
>
>> Thank you for your suggestions. I have done some testing and I think 
>> I will choose the option to set the system time to the file 
>> modification time before each commit. It is a simple solution and I 
>> think it is sufficient for our purposes. All migrated files will have 
>> recorded commit times equalling file modification times. All future 
>> changes will just have a commit time, but this time will not differ 
>> much from the file modification time if users don't wait too long 
>> before comitting.
>
> That sounds absolutely horrible in any scenario that could possibly 
> have multiple users or concurrent commits happening at once.
Yes, it sounded horrible to me too at first. But I am running the 
migration to local Subversion repositories, one file revision at a time. 
After the migration is finished, other users will be given access to the 
repository. I have tested the concept manually and there were no 
problems. I fear that if a try another solution I will get myself in 
worse problems, especially because I am new to Subversion. The nice 
thing is that this way, the dates as returned by the svn log command are 
meaningful, i.e. reflecting true commit dates.


-- 
-------------------------------------
Frans Knibbe
Geodan S&R
President Kennedylaan 1
1079 MB Amsterdam (NL)
-------------------------------------
Tel: +31 (0)20 - 5711 347
Fax: +31 (0)20 - 5711 333
-------------------------------------
E-mail: frans.knibbe@geodan.nl
Website: www.geodan.nl
KvK-nummer: 33 247475
Disclaimer: www.geodan.nl/disclaimer
-------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Is there really no way to keep the file modification time intact?

Posted by Les Mikesell <le...@gmail.com>.
Frans Knibbe wrote:
> 
>> Sounds like you should just be writing a wrapper script to go around 
>> "svn checkout", which itself calls svn checkout, then mucks with the 
>> modification dates of the checked-out files in whatever way you like.
>>
>>
>> [1] I did write a script to implement a post-checkout hook, but it is 
>> a server-side script, of course; it does not do anything on the client:
>> http://www.ryandesign.com/svnhookdispatcher

> Thank you for your suggestions. I have done some testing and I think I 
> will choose the option to set the system time to the file modification 
> time before each commit. It is a simple solution and I think it is 
> sufficient for our purposes. All migrated files will have recorded 
> commit times equalling file modification times. All future changes will 
> just have a commit time, but this time will not differ much from the 
> file modification time if users don't wait too long before comitting.

That sounds absolutely horrible in any scenario that could possibly have 
multiple users or concurrent commits happening at once.

-- 
   Les Mikesell
    lesmikesell@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Is there really no way to keep the file modification time intact?

Posted by Oliver Betz <li...@gmx.net>.
Frans Knibbe wrote:

[...]

> If I read your script correctly, you commit a file and then you use svn 
> propset to alter the svn:date property. Well, that is a nicer way of 
> doing it, indeed. I did not realize this was possible. But now I have 
> also read the warning in the SVN book:
> 
> "Since the timestamp of a revision is stored as an unversioned, 
> modifiable property of the revision (see the section called 
> "Properties", revision timestamps can be changed to represent complete 
> falsifications of true chronology, or even removed altogether. This will 
> wreak havoc on the internal date-to-revision conversion that Subversion 
> performs."

I don't know about "internal date-to-revision conversion that 
Subversion performs".

Since my script sorts the files before committing, I don't think that 
there can be any problem.

> Have you ever noticed any havoc resulting from you migration? If I 

No. But I used it only for initial import of a small number of soucre 
file trees.

> understand correctly, the effect to avoid is the -r{DATE}switch 
> returning a wrong revision number. So if I first sort all the objects I 
> want to commit by date, there won't be a problem. I hope...

That's what my script does and why I wrote it.

Oliver
-- 
Oliver Betz, Muenchen

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Is there really no way to keep the file modification time intact?

Posted by Frans Knibbe <fr...@geodan.nl>.

Oliver Betz wrote:
> Frans Knibbe wrote:
>
> [...]
>
>   
>> Thank you for your suggestions. I have done some testing and I think I 
>> will choose the option to set the system time to the file modification 
>> time before each commit.
>>     
>
> why don't you want to use "svn propset" as I suggested?
>   
That's strange. I did not receive earlier messages from you in this 
thread. But then I went to look in the mailing list archive at 
http://subversion.tigris.org and there I saw your other message. Maybe 
it was delayed or somehow did not get through out spam filter? I will 
ask my system administrator.

So, thanks for the link! It seems you were faced with with the same 
problem I have now.

If I read your script correctly, you commit a file and then you use svn 
propset to alter the svn:date property. Well, that is a nicer way of 
doing it, indeed. I did not realize this was possible. But now I have 
also read the warning in the SVN book:

"Since the timestamp of a revision is stored as an unversioned, 
modifiable property of the revision (see the section called 
“Properties”, revision timestamps can be changed to represent complete 
falsifications of true chronology, or even removed altogether. This will 
wreak havoc on the internal date-to-revision conversion that Subversion 
performs."

Have you ever noticed any havoc resulting from you migration? If I 
understand correctly, the effect to avoid is the -r{DATE}switch 
returning a wrong revision number. So if I first sort all the objects I 
want to commit by date, there won't be a problem. I hope...

>   
>> It is a simple solution and I think it is 
>>     
>
> IMNSHO it's a horrible way to do it.
>
> Oliver
>   

-- 
-------------------------------------
Frans Knibbe
Geodan S&R
President Kennedylaan 1
1079 MB Amsterdam (NL)
-------------------------------------
Tel: +31 (0)20 - 5711 347
Fax: +31 (0)20 - 5711 333
-------------------------------------
E-mail: frans.knibbe@geodan.nl
Website: www.geodan.nl
KvK-nummer: 33 247475
Disclaimer: www.geodan.nl/disclaimer
-------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Is there really no way to keep the file modification time intact?

Posted by Oliver Betz <li...@gmx.net>.
Frans Knibbe wrote:

[...]

> Thank you for your suggestions. I have done some testing and I think I 
> will choose the option to set the system time to the file modification 
> time before each commit.

why don't you want to use "svn propset" as I suggested?

> It is a simple solution and I think it is 

IMNSHO it's a horrible way to do it.

Oliver
-- 
Oliver Betz, Muenchen

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org