You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by David Budworth <db...@eloan.com> on 2004/03/17 04:47:49 UTC

Problems when using both auto-props and use-commit-times

sysinfo: subversion 1.0.1,    client rh9, server mdk10

I'm stumped, I seem to be getting diffs on the $Id:$ tag for any file I 
add when use-commit-times and auto-props svn:keywords=Id is set in 
/etc/subversion/config

to test, i created a new repo "test2"

I did (note: repo host is called svn):

(first: get repo rev 0 and add a file)
svn co http://svn/test2
cd test2
echo 'a test file with $Id:$' > test.txt
svn commit

(second: delete repo and check out again)
cd ..
rm -r test2
svn co http://svn/test2
cd test2
svn status

At this point, status comes back showing 'test.txt' is M(odified)
Then doing 'svn diff test.txt' actually shows a 1 line change (as 
follows)

-a test file with $Id:$
+a test file with $Id$


Note, the 'changed line' is the same, except the : (colon) is missing 
from the Id tag.

oddly enough, if I simply disable "use-commit-times" from my global 
config, then repeat the second part, no diff occurs.

I can only assume that it has something to do with the timestamp of the 
file not actually matching the timestamp of the last update, making svn 
believe there is some kind of change, and then performing a diff but 
improperly trimming the keyword on the client end prior to diff.

... 10 minutes later (I did some more testing) ...
Turns out, blow away system config completely (so as not to have any 
config issues), and just check out 'test2' again, touch a file with a 
keyword in it, then do a diff.  The keyword mangling on the WC happens 
again.

so, i guess it's a bug in the diff mechanism.

As for the use-commit-times flag, I would say it's also a bug that 
subversion doesn't realize the the file hasn't changed.   I take it 
there's no subversion equivalent to the CVS/Entries file which has the 
timestamp for whatever rev of file is in your WC?

Should I be filing a bug (or two)?


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

Re: Problems when using both auto-props and use-commit-times

Posted by David Budworth <db...@eloan.com>.
Sorry to respond to my own message, had to clear my first issue up

The entire tree does NOT indeed show as modified, but subversion seems 
to attempt to diff every file in the tree to tell if it's just a 
timestamp change, or the file is actually modified.

It was only apparent to me when my other issue with the $Id:$ diffing 
cropped up.

I'd check out a tree using 'use-commit-times' and the files which 
contained '$Id:$' in them showed up as modified even though I didn't 
actually change it.  So it was apparent that subversion noticed the 
time stamp difference between last update and actual file time stamp.

In a regular tree (converted from cvs), this issue doesn't appear, even 
if I 'touch' a file then do status again.  I assume though that svn is 
performing a text diff on the files with the suspect timestamp to see 
if I indeed changed them.

So, using 'use-commit-times' on a tree with say, 200 files, results in 
a 'svn status' command taking several seconds while it performs the 
diff.

I'm just suggesting that svn stores (somewhere in .svn I'd assume), the 
repo timestamp of each file so it doesn't spend it's time performing a 
diff of the entire tree.  (my main tree, which has not been converted 
yet due to cvs2svn errors, is 20k+ files, that would seriously hurt to 
diff)


On Mar 17, 2004, at 1:04 PM, David Budworth wrote:

> Sorry, didn't make the actual issue clear really
>
> There are two issues:
>
> 1) When using 'use-commit-times' in your global config, the files are 
> indeed stamped with the commit time, but 'svn'(client) seems to not 
> track what the original commit time of the WC files are.
> 	This results in all 'svn status' invocations to perform a diff 
> between the WC and the original version.   In effect, subversion 
> thinks I've done the equivilent of 'touch' on all my files, and shows 
> the entire tree as 'Modified' immediately after a check out.
>

--- snipped my own over-verbosity ---


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

Re: Problems when using both auto-props and use-commit-times

Posted by David Budworth <db...@eloan.com>.
Sorry, didn't make the actual issue clear really

There are two issues:

1) When using 'use-commit-times' in your global config, the files are 
indeed stamped with the commit time, but 'svn'(client) seems to not 
track what the original commit time of the WC files are.
	This results in all 'svn status' invocations to perform a diff between 
the WC and the original version.   In effect, subversion thinks I've 
done the equivilent of 'touch' on all my files, and shows the entire 
tree as 'Modified' immediately after a check out.

2) $Id:$ tags are are not properly stripped down during the diff 
process.
If I originally put the tag in as "$Id:$" then add / commit my change.  
Any one who gets this file via a new checkout / update will always see 
the diff as described below.

After reading your response, I realized that you can set the tag as 
"$Id$" without the colon, but I would expect that the colon, if 
included, would not produce the diff.

below is the output showing the addition of 2 files, one with $Id:$ and 
the other with $Id$
(note: the manual, last I checked, doesn't explicitly say to not use 
the colon, and i believe CVS requires it's inclusion, so any file 
templates people may be using where the colon exists, become an issue 
during cvs->subversion migration)

*** BEGIN LOG (extra line added before each prompt for easier reading) 
***

[davidb@olcit sandbox]$ svn co http://svn/test2
Checked out revision 0.

[davidb@olcit sandbox]$ cd test2

[davidb@olcit test2]$ echo 'File with $Id:$ tag' > id_with_colon.txt

[davidb@olcit test2]$ echo 'File with $Id$ tag' > id_no_colon.txt

[davidb@olcit test2]$ ls
id_no_colon.txt  id_with_colon.txt

[davidb@olcit test2]$ svn add *txt
A         id_no_colon.txt
A         id_with_colon.txt

[davidb@olcit test2]$ svn pset svn:keywords Id *txt
property 'svn:keywords' set on 'id_no_colon.txt'
property 'svn:keywords' set on 'id_with_colon.txt'

[davidb@olcit test2]$ svn commit -m 'added files'
Adding         id_no_colon.txt
Adding         id_with_colon.txt
Transmitting file data ..
Committed revision 1.

[davidb@olcit test2]$ svn update
At revision 1.

[davidb@olcit test2]$ touch *txt

[davidb@olcit test2]$ svn status
M      id_with_colon.txt

[davidb@olcit test2]$ svn diff id_with_colon.txt
Index: id_with_colon.txt
===================================================================
--- id_with_colon.txt   (revision 1)
+++ id_with_colon.txt   (working copy)
@@ -1 +1 @@
-File with $Id:$ tag
+File with $Id$ tag

[davidb@olcit test2]$ cat id_with_colon.txt
File with $Id: id_with_colon.txt 1 2004-03-17 20:32:47Z davidb $ tag

[davidb@olcit test2]$ cat id_no_colon.txt
File with $Id: id_no_colon.txt 1 2004-03-17 20:32:47Z davidb $ tag

[davidb@olcit test2]$

*** END LOG ***


On Mar 17, 2004, at 8:20 AM, Ben Collins-Sussman wrote:

> On Tue, 2004-03-16 at 22:47, David Budworth wrote:
>> sysinfo: subversion 1.0.1,    client rh9, server mdk10
>>
>> I'm stumped, I seem to be getting diffs on the $Id:$ tag for any file 
>> I
>> add when use-commit-times and auto-props svn:keywords=Id is set in
>> /etc/subversion/config
>>
>> to test, i created a new repo "test2"
>>
>> I did (note: repo host is called svn):
>>
>> (first: get repo rev 0 and add a file)
>> svn co http://svn/test2
>> cd test2
>> echo 'a test file with $Id:$' > test.txt
>
> I'm confused:  shouldn't that be just $Id$ for a new file?  The colon 
> is
> the 'expanded' form, i.e. "$Id: blah blah blah$".  Might that be 
> causing
> the spurious diff?
>


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

Re: Problems when using both auto-props and use-commit-times

Posted by Ben Collins-Sussman <su...@collab.net>.
On Tue, 2004-03-16 at 22:47, David Budworth wrote:
> sysinfo: subversion 1.0.1,    client rh9, server mdk10
> 
> I'm stumped, I seem to be getting diffs on the $Id:$ tag for any file I 
> add when use-commit-times and auto-props svn:keywords=Id is set in 
> /etc/subversion/config
> 
> to test, i created a new repo "test2"
> 
> I did (note: repo host is called svn):
> 
> (first: get repo rev 0 and add a file)
> svn co http://svn/test2
> cd test2
> echo 'a test file with $Id:$' > test.txt

I'm confused:  shouldn't that be just $Id$ for a new file?  The colon is
the 'expanded' form, i.e. "$Id: blah blah blah$".  Might that be causing
the spurious diff?



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