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

Re: Subversion, binary files, hex editors and file modification time

From: Ph. Marek <philipp.marek_at_bmlv.gv.at>
Date: 2007-06-12 07:52:53 CEST

On Montag, 11. Juni 2007, Hyrum K. Wright wrote:
> In short, your tool does not changed the modified time, even though it
> modifies the file. Some would call such a tool broken.
Well, it depends on the usage.
There are some programs that use the mtime to detect which version of a file
should be taken (ie. which is "newer"), and if you only want to patch a few
bytes inside, a hex editor might be the easiest way.

But you're right, for version control it's a problem. (Not just subversion.)

> As part of the solution to issue 2746, Erik added the ability to use
> file size as an additional indicator of modification. So, if you change
> the size of the file, but not the modified time, Subversion will be
> smart enough to know that the file was modified. IIRC, this has not
> been backported to the 1.4.x line, and will appear in Subversion 1.5.
This most probably won't help. If you're editing binaries, you change values
*inside* the file, and (normally) don't truncate or extend them.

Maybe the easiest way is to rename the hex editor and replace it with a shell
script that invokes the editor and changes the timestamp in the .svn/entries
file if the MD5 differs. (Yes, I know, but somebody who knows how to edit
binary files can probably change a text file).

Regards,

Phil

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jun 12 08:37:13 2007

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.