You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Alexis Huxley <ah...@gmx.net> on 2002/07/31 20:19:32 UTC

svn:keywords substitutions failing until pdel + re-ps

Hi, I'm using a build about 10 days old, I'll get a chance to build
the latest this weekend. So feel free to ignore this :-)

Deleting a svn:keywords property and then reapplying it with the
identical command - with commits before, in the middle, and after -
is leaving the file with the '$whatevers$' in it in a different state
to before the delete-reapply. 

Surely this can't be right?

Here's the recipe:

	#
	#  Create repos and put file with keywords in,
	#  activate keywords and commit.
	#
	dione$ svnadmin create `pwd`/repos
	dione$ svn co file://`pwd`/repos -d wc
	Checked out revision 0.
	dione$ echo '$HeadURL$ $LastChangedRevision$' > wc/file
	dione$ svn add wc/file 
	A         wc/file
	dione$ svn ps svn:keywords 'HeadURL
	> LastChangedRevision' wc/file 
	property `svn:keywords' set on 'wc/file'
	dione$ svn pg svn:keywords wc/file
	HeadURL
	LastChangedRevision
	dione$ svn commit -m "" wc 
	Adding         wc/file
	Transmitting file data .
	Committed revision 1.
	
	#
	#  Examine the file: 1 keyword changed, 1 not!
	#
	dione$ cat wc/file 
	$HeadURL: $ $LastChangedRevision: 1 $       <------------------
	
	#
	#  Delete keywords, commit, re-add keywords
	#  and commit.
	#
	dione$ svn pdel svn:keywords wc/file
	property `svn:keywords' deleted  from 'wc/file'.
	dione$  svn commit -m "" wc
	Sending        wc/file
	Transmitting file data .
	Committed revision 2.
	dione$ echo '$HeadURL$ $LastChangedRevision$' > wc/file
	dione$ svn ps svn:keywords 'HeadURL
	> LastChangedRevision' wc/file
	property `svn:keywords' set on 'wc/file'
	dione$ svn commit -m "" wc
	Sending        wc/file
	Transmitting file data .
	Committed revision 3.
	
	#
	#  Examine the file: 2 keyword changed
	#
	dione$ cat wc/file 
	$HeadURL: file:///diskb/home/alexis/repos/file $ $LastChangedRevision: 3 $  <----------

Alexis

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

Re: svn:keywords substitutions failing until pdel + re-ps

Posted by Eric Gillespie <ep...@progeny.com>.
Alexis Huxley <ah...@gmx.net> writes:

> Deleting a svn:keywords property and then reapplying it with the
> identical command - with commits before, in the middle, and after -
> is leaving the file with the '$whatevers$' in it in a different state
> to before the delete-reapply. 

Actually, i've seen this bug.  It seems only to apply to the URL keyword.
You don't actually need to pdel.  After adding (and committing) the
svn:keywords, property remove (with rm, not svn rm) the file and then
svn up (which restores it from the text base in the .svn dir).  That will
give you your file with the URL keyword expanded.

-- 
Eric Gillespie <*> epg@progeny.com
Software Developer
Progeny Linux Systems - http://progeny.com/
"When everyone has to reinvent the wheel, many people invent
 square wheels."

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

Re: svn:keywords substitutions failing until pdel + re-ps

Posted by Eric Gillespie <ep...@progeny.com>.
Ben Collins-Sussman <su...@collab.net> writes:

> Thanks!  This is plain and clear... can you file this bug for us?

Filed as 843.

> I mean, the bug here is that $URL$ isn't being expanded in your
> working file right after the commit.  It seems absolutely bizarre that
> this is *only* happening with the URL keyword!

Truly bizarre, yes.

-- 
Eric Gillespie <*> epg@progeny.com
Software Developer
Progeny Linux Systems - http://progeny.com/
"When everyone has to reinvent the wheel, many people invent
 square wheels."

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

Re: svn:keywords substitutions failing until pdel + re-ps

Posted by Ben Collins-Sussman <su...@collab.net>.
Thanks!  This is plain and clear... can you file this bug for us?

I mean, the bug here is that $URL$ isn't being expanded in your
working file right after the commit.  It seems absolutely bizarre that
this is *only* happening with the URL keyword!


Eric Gillespie <ep...@progeny.com> writes:

> Karl Fogel <kf...@newton.ch.collab.net> writes:
> 
> > Can you try boiling down the reproduction recipe and see if you can
> > get a "minimal" case, that reproduces with head of trunk?  Repost
> 
> svnadmin create repo
> svn co file:///`pwd`/repo wc
> cd wc
> echo '$URL$' > file
> svn add file
> svn pset svn:keywords URL file
> svn ci -m ''
> cat file
> rm file
> svn up
> cat file
> 
> 0 foo% svnadmin create repo
> 0 foo% svn co file:///`pwd`/repo wc
> Checked out revision 0.
> 0 foo% cd wc
> 0 wc% echo '$URL$' > file
> 0 wc% svn add file
> A         file
> 0 wc% svn pset svn:keywords URL file
> property `svn:keywords' set on 'file'
> 0 wc% svn ci -m ''
> Adding         file
> Transmitting file data .
> Committed revision 1.
> 0 wc% cat file
> $URL: $
> 0 wc% rm file
> 0 wc% svn up
> Restored ./file
> At revision 1.
> 0 wc% cat file
> $URL: file:////tmp/foo/repo/file $
> 
> 
> -- 
> Eric Gillespie <*> epg@progeny.com
> Software Developer
> Progeny Linux Systems - http://progeny.com/
> "When everyone has to reinvent the wheel, many people invent
>  square wheels."
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org

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

Re: svn:keywords substitutions failing until pdel + re-ps

Posted by Eric Gillespie <ep...@progeny.com>.
Karl Fogel <kf...@newton.ch.collab.net> writes:

> Can you try boiling down the reproduction recipe and see if you can
> get a "minimal" case, that reproduces with head of trunk?  Repost

svnadmin create repo
svn co file:///`pwd`/repo wc
cd wc
echo '$URL$' > file
svn add file
svn pset svn:keywords URL file
svn ci -m ''
cat file
rm file
svn up
cat file

0 foo% svnadmin create repo
0 foo% svn co file:///`pwd`/repo wc
Checked out revision 0.
0 foo% cd wc
0 wc% echo '$URL$' > file
0 wc% svn add file
A         file
0 wc% svn pset svn:keywords URL file
property `svn:keywords' set on 'file'
0 wc% svn ci -m ''
Adding         file
Transmitting file data .
Committed revision 1.
0 wc% cat file
$URL: $
0 wc% rm file
0 wc% svn up
Restored ./file
At revision 1.
0 wc% cat file
$URL: file:////tmp/foo/repo/file $


-- 
Eric Gillespie <*> epg@progeny.com
Software Developer
Progeny Linux Systems - http://progeny.com/
"When everyone has to reinvent the wheel, many people invent
 square wheels."

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

Re: svn:keywords substitutions failing until pdel + re-ps

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Alexis Huxley <ah...@gmx.net> writes:
> Deleting a svn:keywords property and then reapplying it with the
> identical command - with commits before, in the middle, and after -
> is leaving the file with the '$whatevers$' in it in a different state
> to before the delete-reapply. 
>
> Surely this can't be right?

The above prose description of the bug doesn't seem to match the
reproduction recipe below... (?)

It seems, as Eric Gillespie noted, that the real bug may be with the
initial setting of the $HeadURL$ keyword (you may not even need the
$LastChangedRev$ to reproduce).  That is, the HeadURL keyword is not
expanded when you first set its property and commit.  But it does (?)
get expanded after later changes to the file.  Or something like that.

Can you try boiling down the reproduction recipe and see if you can
get a "minimal" case, that reproduces with head of trunk?  Repost
that, and I suspect we'll then be filing an issue, as there is
obviously a real bug here.

Thanks for the report!

-Karl


> Here's the recipe:
> 
> 	#
> 	#  Create repos and put file with keywords in,
> 	#  activate keywords and commit.
> 	#
> 	dione$ svnadmin create `pwd`/repos
> 	dione$ svn co file://`pwd`/repos -d wc
> 	Checked out revision 0.
> 	dione$ echo '$HeadURL$ $LastChangedRevision$' > wc/file
> 	dione$ svn add wc/file 
> 	A         wc/file
> 	dione$ svn ps svn:keywords 'HeadURL
> 	> LastChangedRevision' wc/file 
> 	property `svn:keywords' set on 'wc/file'
> 	dione$ svn pg svn:keywords wc/file
> 	HeadURL
> 	LastChangedRevision
> 	dione$ svn commit -m "" wc 
> 	Adding         wc/file
> 	Transmitting file data .
> 	Committed revision 1.
> 	
> 	#
> 	#  Examine the file: 1 keyword changed, 1 not!
> 	#
> 	dione$ cat wc/file 
> 	$HeadURL: $ $LastChangedRevision: 1 $       <------------------
> 	
> 	#
> 	#  Delete keywords, commit, re-add keywords
> 	#  and commit.
> 	#
> 	dione$ svn pdel svn:keywords wc/file
> 	property `svn:keywords' deleted  from 'wc/file'.
> 	dione$  svn commit -m "" wc
> 	Sending        wc/file
> 	Transmitting file data .
> 	Committed revision 2.
> 	dione$ echo '$HeadURL$ $LastChangedRevision$' > wc/file
> 	dione$ svn ps svn:keywords 'HeadURL
> 	> LastChangedRevision' wc/file
> 	property `svn:keywords' set on 'wc/file'
> 	dione$ svn commit -m "" wc
> 	Sending        wc/file
> 	Transmitting file data .
> 	Committed revision 3.
> 	
> 	#
> 	#  Examine the file: 2 keyword changed
> 	#
> 	dione$ cat wc/file 
> 	$HeadURL: file:///diskb/home/alexis/repos/file $ $LastChangedRevision: 3 $  <----------
> 
> Alexis
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org

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