You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Michael L Brown <mi...@philips.com> on 2005/04/15 16:14:56 UTC
Auto-prop not working?
The /etc/subversion/config file contains the following:
[miscellany]
enable-auto-props = yes
[auto-props]
* = svn:keywords=Id
* = svn:keywords=LastChangedDate
* = svn:keywords=Date
* = svn:keywords=LastChangedRevision
* = svn:keywords=Rev
* = svn:keywords=LastChangedBy
* = svn:keywords=Author
* = svn:keywords=HeadURL
* = svn:keywords=URL
We are using subversion for the first time, so there is a learning curve
to overcome. I'm getting there, but hit a snag this morning.
I did a "svn import" to take a whole source tree and get it into svn. We
are converting from CVS. So, tons of files contains lines that look like:
static const char acRCSID[] = "$Id: TreeListWindow.cc,v 21.0 2005/02/02
19:37:58 current Exp $";
The unfortunate thing... after the import and a "svn checkout" of the
trunk, the line still looks like the above. The values were not updated
with the svn info.
What gives?
MB
--
Mike Brown (Michael.L.Brown@Philips.com)
Lotus Bloats: Michael L Brown/MSN/MS/PHILIPS
Philips/ADAC, Madison, WI
Desk: 608-288-6969 Fax: 608-298-2101
PMS direct: 164-6969
You design it, I'll build it!
Re: Auto-prop not working?
Posted by Scott Palmer <sc...@2connected.org>.
On Apr 22, 2005, at 8:36 AM, Ben Collins-Sussman wrote:
>
> On Apr 21, 2005, at 3:10 PM, tekHedd wrote:
>
>> Michael W Thelen wrote:
>>> * = svn:keywords=Id LastChangedDate Date LastChangedRevision
>>
>> I have a stupid question that doesn't seem to be answered in the
>> "Book".
>> Won't this set keyword expansion on newly added binary files, too?
>>
>
> Yes. It's a bit reckless, and might lead to binary file corruption.
> It's equivalent to forgetting to set '-kb' on binary files in CVS.
I wish there was a way to filter files that are recognized by
subversions 'is this file binary' heuristic in the config file. It
would be great to set the svn:needs-lock property in 1.2 based on
subversion's ability to merge, which I believe is based on if the file
is considered binary or not.
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Auto-prop not working?
Posted by Ben Collins-Sussman <su...@collab.net>.
On Apr 22, 2005, at 9:55 AM, Michael L Brown wrote:
>
> OK, what is one supposed to do? We can't trust the users to remember
> to set properties on new files they commit, hence the reason for the
> auto-prop setting. I assumed incorrectly that Subversion would not
> apply keywords to files it considers to be binary.
>
Be more specific in your patterns, like *.java, *.c, *.txt, etc.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Auto-prop not working?
Posted by Michael L Brown <mi...@philips.com>.
OK, what is one supposed to do? We can't trust the users to remember to
set properties on new files they commit, hence the reason for the
auto-prop setting. I assumed incorrectly that Subversion would not apply
keywords to files it considers to be binary.
MB
--
Mike Brown (Michael.L.Brown@Philips.com)
Lotus Bloats: Michael L Brown/MSN/MS/PHILIPS
Philips/ADAC, Madison, WI
Desk: 608-288-6969 Fax: 608-298-2101
PMS direct: 164-6969
You design it, I'll build it!
Ben Collins-Sussman
04/22/2005 07:36 AM
To
tekHedd <te...@byteheaven.net>
cc
Subversion mailing list <us...@subversion.tigris.org>
Subject
Re: Auto-prop not working?
Classification
On Apr 21, 2005, at 3:10 PM, tekHedd wrote:
> Michael W Thelen wrote:
>> * = svn:keywords=Id LastChangedDate Date LastChangedRevision
>
> I have a stupid question that doesn't seem to be answered in the
> "Book".
> Won't this set keyword expansion on newly added binary files, too?
>
Yes. It's a bit reckless, and might lead to binary file corruption.
It's equivalent to forgetting to set '-kb' on binary files in CVS.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Auto-prop not working?
Posted by Ben Collins-Sussman <su...@collab.net>.
On Apr 21, 2005, at 3:10 PM, tekHedd wrote:
> Michael W Thelen wrote:
>> * = svn:keywords=Id LastChangedDate Date LastChangedRevision
>
> I have a stupid question that doesn't seem to be answered in the
> "Book".
> Won't this set keyword expansion on newly added binary files, too?
>
Yes. It's a bit reckless, and might lead to binary file corruption.
It's equivalent to forgetting to set '-kb' on binary files in CVS.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Auto-prop not working?
Posted by tekHedd <te...@byteheaven.net>.
Michael W Thelen wrote:
> * = svn:keywords=Id LastChangedDate Date LastChangedRevision
I have a stupid question that doesn't seem to be answered in the "Book".
Won't this set keyword expansion on newly added binary files, too?
tom
--
Tom Surace ) ,~~v~~,
tekhedd@byteheaven.net ) ,`. .`,
http://www.byteheaven.com ) ------------- === + === ---
Hamster was here
Re: Auto-prop not working?
Posted by Michael L Brown <mi...@philips.com>.
Found the example in the book. It was easy to overlook. Yep, quotes for
command version definately necessary :-)
New import done and checkout being done now. Will see shortly if it
worked.
MB
--
Mike Brown (Michael.L.Brown@Philips.com)
Lotus Bloats: Michael L Brown/MSN/MS/PHILIPS
Philips/ADAC, Madison, WI
Desk: 608-288-6969 Fax: 608-298-2101
PMS direct: 164-6969
You design it, I'll build it!
Michael W Thelen <mi...@pietdepsi.com>
04/15/2005 11:36 AM
To: users@subversion.tigris.org
cc: (bcc: Michael L Brown/MSN/MS/PHILIPS)
Subject: Re: Auto-prop not working?
Classification:
Michael L Brown wrote:
> The /etc/subversion/config file contains the following:
>
> [miscellany]
> enable-auto-props = yes
>
> [auto-props]
> * = svn:keywords=Id
> * = svn:keywords=LastChangedDate
> * = svn:keywords=Date
> * = svn:keywords=LastChangedRevision
> * = svn:keywords=Rev
> * = svn:keywords=LastChangedBy
> * = svn:keywords=Author
> * = svn:keywords=HeadURL
> * = svn:keywords=URL
If you run "svn proplist -v" on any file you've imported, you'll find
that the svn:keywords property contains only "URL". Each of the lines
above is taken separately, and the last one overrides the others. To
get what you want, do something like this instead:
* = svn:keywords=Id LastChangedDate Date LastChangedRevision
... etc, with everything on a single line separated by spaces. No
quotes are necessary.
Of course, now that everything is already imported into the repository,
those properties will have to be set manually... auto-props only applies
to files as they are newly added. If you're on Linux, I have written a
Perl script that should be able to do that (I just haven't tested in on
Windows). Hope this helps.
http://svn.pietdepsi.com/repos/projects/svn-tools/set-props.pl
--
Michael W Thelen
It is a mistake to think you can solve any major problems just with
potatoes. -- Douglas Adams
Re: Auto-prop not working?
Posted by Mark Phippard <Ma...@softlanding.com>.
Michael L Brown <mi...@philips.com> wrote on 04/15/2005 12:45:48
PM:
>
> I'm reimporting the files, since there was a different major mistake the
the
> files being imported that I had to correct.
>
> Another posting said to separate the keywords with comma-space. Does
either
> work? I've looked in the book and didn't see anything that shows
multiple
> entries per line.
I think it is space separated. I had looked in the book before my post
and thought it was commas. The "comma" was an "apostrophe" on the next
line and I did not look carefully.
To answer your other question, I "think" you just need to specify the long
value in the properties, and then can use either that, or the shorter
alias in the source.
Mark
_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Auto-prop not working?
Posted by Michael L Brown <mi...@philips.com>.
I'm reimporting the files, since there was a different major mistake the
the files being imported that I had to correct.
Another posting said to separate the keywords with comma-space. Does
either work? I've looked in the book and didn't see anything that shows
multiple entries per line.
There is a lot to learn about Subversion.
BTW, we are on Solaris 8, so I'll grab your script for future reference.
Thanks.
MB
--
Mike Brown (Michael.L.Brown@Philips.com)
Lotus Bloats: Michael L Brown/MSN/MS/PHILIPS
Philips/ADAC, Madison, WI
Desk: 608-288-6969 Fax: 608-298-2101
PMS direct: 164-6969
You design it, I'll build it!
Michael W Thelen <mi...@pietdepsi.com>
04/15/2005 11:36 AM
To: users@subversion.tigris.org
cc: (bcc: Michael L Brown/MSN/MS/PHILIPS)
Subject: Re: Auto-prop not working?
Classification:
Michael L Brown wrote:
> The /etc/subversion/config file contains the following:
>
> [miscellany]
> enable-auto-props = yes
>
> [auto-props]
> * = svn:keywords=Id
> * = svn:keywords=LastChangedDate
> * = svn:keywords=Date
> * = svn:keywords=LastChangedRevision
> * = svn:keywords=Rev
> * = svn:keywords=LastChangedBy
> * = svn:keywords=Author
> * = svn:keywords=HeadURL
> * = svn:keywords=URL
If you run "svn proplist -v" on any file you've imported, you'll find
that the svn:keywords property contains only "URL". Each of the lines
above is taken separately, and the last one overrides the others. To
get what you want, do something like this instead:
* = svn:keywords=Id LastChangedDate Date LastChangedRevision
... etc, with everything on a single line separated by spaces. No
quotes are necessary.
Of course, now that everything is already imported into the repository,
those properties will have to be set manually... auto-props only applies
to files as they are newly added. If you're on Linux, I have written a
Perl script that should be able to do that (I just haven't tested in on
Windows). Hope this helps.
http://svn.pietdepsi.com/repos/projects/svn-tools/set-props.pl
--
Michael W Thelen
It is a mistake to think you can solve any major problems just with
potatoes. -- Douglas Adams
Re: Auto-prop not working?
Posted by Michael W Thelen <mi...@pietdepsi.com>.
Michael L Brown wrote:
> The /etc/subversion/config file contains the following:
>
> [miscellany]
> enable-auto-props = yes
>
> [auto-props]
> * = svn:keywords=Id
> * = svn:keywords=LastChangedDate
> * = svn:keywords=Date
> * = svn:keywords=LastChangedRevision
> * = svn:keywords=Rev
> * = svn:keywords=LastChangedBy
> * = svn:keywords=Author
> * = svn:keywords=HeadURL
> * = svn:keywords=URL
If you run "svn proplist -v" on any file you've imported, you'll find
that the svn:keywords property contains only "URL". Each of the lines
above is taken separately, and the last one overrides the others. To
get what you want, do something like this instead:
* = svn:keywords=Id LastChangedDate Date LastChangedRevision
... etc, with everything on a single line separated by spaces. No
quotes are necessary.
Of course, now that everything is already imported into the repository,
those properties will have to be set manually... auto-props only applies
to files as they are newly added. If you're on Linux, I have written a
Perl script that should be able to do that (I just haven't tested in on
Windows). Hope this helps.
http://svn.pietdepsi.com/repos/projects/svn-tools/set-props.pl
--
Michael W Thelen
It is a mistake to think you can solve any major problems just with
potatoes. -- Douglas Adams
Re: Auto-prop not working?
Posted by Michael L Brown <mi...@philips.com>.
Thanks, change done.
BTW, since "Date" = "LastChangeDate", do both names need to be in the
list, or can one be enough and svn will use both keywords?
Thanks for the quick response, it is greatly appreciated.
MB
--
Mike Brown (Michael.L.Brown@Philips.com)
Lotus Bloats: Michael L Brown/MSN/MS/PHILIPS
Philips/ADAC, Madison, WI
Desk: 608-288-6969 Fax: 608-298-2101
PMS direct: 164-6969
You design it, I'll build it!
Mark Phippard <Ma...@softlanding.com>
04/15/2005 11:25 AM
To: Michael L Brown/MSN/MS/PHILIPS@PHILIPS
cc: users@subversion.tigris.org
Subject: Re: Auto-prop not working?
Classification:
Michael L Brown <mi...@philips.com> wrote on 04/15/2005 12:14:56
PM:
>
> The /etc/subversion/config file contains the following:
>
> [miscellany]
> enable-auto-props = yes
>
> [auto-props]
> * = svn:keywords=Id
> * = svn:keywords=LastChangedDate
> * = svn:keywords=Date
> * = svn:keywords=LastChangedRevision
> * = svn:keywords=Rev
> * = svn:keywords=LastChangedBy
> * = svn:keywords=Author
> * = svn:keywords=HeadURL
> * = svn:keywords=URL
You probably want something like this:
[auto-props]
* = svn:keywords=Id, LastChangedDate, Date, LastChangedRevision etc...
You can set multiple properties with auto-props, but for any given
property you need to define it the way you would have to do it using svn
propset.
Mark
_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. by IBM Email Security Management
Services powered by MessageLabs.
_____________________________________________________________________________
Re: Auto-prop not working?
Posted by Mark Phippard <Ma...@softlanding.com>.
Michael L Brown <mi...@philips.com> wrote on 04/15/2005 12:14:56
PM:
>
> The /etc/subversion/config file contains the following:
>
> [miscellany]
> enable-auto-props = yes
>
> [auto-props]
> * = svn:keywords=Id
> * = svn:keywords=LastChangedDate
> * = svn:keywords=Date
> * = svn:keywords=LastChangedRevision
> * = svn:keywords=Rev
> * = svn:keywords=LastChangedBy
> * = svn:keywords=Author
> * = svn:keywords=HeadURL
> * = svn:keywords=URL
You probably want something like this:
[auto-props]
* = svn:keywords=Id, LastChangedDate, Date, LastChangedRevision etc...
You can set multiple properties with auto-props, but for any given
property you need to define it the way you would have to do it using svn
propset.
Mark
_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org