kfogel@collab.net wrote:
> Julian Foad <julianfoad@btopenworld.com> writes:
>
>>For a locally-modified file with keyword translation enabled, I
>>noticed that "svn status" processes the locally-modified file every
>>time I run "svn status".
>>
>>Shouldn't it notice that the file size and date are not as expected
>>and return a "modified" status immediately?
>
> Do we record the unmodified working file size for translated files in
> .svn/entries? If so, then we could detect modified-ness this way.
We don't currently store any size information there. However, I'm now thinking
it's not so easy. (It would have been done if it were.) Even if you modify
the file by changing some keyword value or EOL style, as long as it translates
back to the same pristine text we must report it as unchanged. Therefore the
size doesn't tell us anything.
It's the time stamp that's useful. I think perhaps this is just a special case
of the general problem that we always re-read files that have been touched
because we don't update the stored time stamp during read-only operations.
That's issue #791, "text_modified_p should reset entry timestamps". It was
partly addressed by r7565 which (I feel, though it's not stated) made several
commands repair time stamps, and r12012 which added "cleanup" to the set of
commands that repair time stamps. No re-only operation (such as "status") has
been made to do so, and Erik closed the issue on the basis that we can't do any
better, but I think we can if we want to. (In the issue, Philip's list of
reasons why we might not be able to do so in some cases is perfectly
reasonable, and doesn't exclude most common cases.)
>> If we were to store the untranslated size, we could perhaps avoid this.
>
> Do you mean "store the translated size"? Or are you using
> "translated" to mean "translated back from working file to text base"?
> (I think of "translated" as being the base->working direction.)
I use "translated" to mean "converted from one form to another", just like wot
my dictionary says, of course :-)
I'll try to remember to use "pristine" (or "base") and "working" to refer to
the two particular forms, since translation happens in both directions and is
thus the term is frequently ambiguous.
> The timings you show seem pretty significant. I think it's worth
> doing something about, yes.
Maybe I should re-open issue #791. Maybe I should just learn that I can use
"svn cleanup" to restore fast operation. I'll think about it and maybe
experiment a bit more before doing anything.
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Feb 17 02:18:49 2006