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

Re: Overwriting WC files with 'update'

From: Ben Collins-Sussman <sussman_at_red-bean.com>
Date: 2005-11-21 02:44:14 CET

On 11/20/05, Jim Blandy <jimb@red-bean.com> wrote:

> But this is a different case. No information would be lost. Or, more
> accurately, the information that the file used to be an unknown ('?')
> file in the WC would be lost, but I don't think anyone really cares
> about that.
>
> What do folks think?

+1

I believe this has been on the libsvn_wc TO-DO list since way before
1.0. There may even already be an open issue on it... probably as old
as the hills.

At the moment, I think the update-editor notices an existing filename
which conflicts, and bails out early before receiving the svndiff data
from the server. We'd need to change that behavior, and allow the
editor to construct the repository file within .svn/tmp/, as it
usually does. Then, before moving '.svn/tmp/foo' to 'foo', it would
need to see if the two files have identical content or not.

That's tricky: what's the most efficient way to do that? Begin by
comparing file sizes, then resort to brute-force byte-by-byte
comparison? (We have functions that already do that for detecting
local mods in a working copy). Or maybe we should do checksum
comparisons instead?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Nov 21 02:44:58 2005

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