You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Bjørn T Johansen <bt...@havleik.no> on 2006/02/22 08:52:59 UTC

svn:keywords?

I would like to use svn:keywords but as far as I can tell, I have to run svn propset on every file I want to
use keywords... Is this correct?
Is there no other way? If I have 300 files, I need to run svn propset 300 times??


Regards,

BTJ

-- 
-----------------------------------------------------------------------------------------------
Bjørn T Johansen

btj@havleik.no
-----------------------------------------------------------------------------------------------
Someone wrote:
"I understand that if you play a Windows CD backwards you hear strange Satanic messages"
To which someone replied:
"It's even worse than that; play it forwards and it installs Windows"
-----------------------------------------------------------------------------------------------

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


Re: svn:keywords?

Posted by Bjørn T Johansen <bt...@havleik.no>.
On Wed, 22 Feb 2006 12:10:06 +0300
Damir Shayhutdinov <da...@tecon.ru> wrote:

> On Wed, Feb 22, 2006 at 09:52:59AM +0100, Bj?rn T Johansen wrote:
> > I would like to use svn:keywords but as far as I can tell, I have to run svn propset on every file I want
> > to use keywords... Is this correct?
> > Is there no other way? If I have 300 files, I need to run svn propset 300 times??
> You can use autoprops feature, or use special programs like find(1) to
> execute one command for many files.
> 
> find -type f -name '*.c' -exec svn propset svn:keywords Id {} \;
> 


That I can do, thx... :)

BTJ

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

Re: svn:keywords?

Posted by si <ss...@gmail.com>.
> > I would like to use svn:keywords but as far as I can tell, I have to run svn propset on every file I want to
> > use keywords... Is this correct?
> > Is there no other way? If I have 300 files, I need to run svn propset 300 times??
> You can use autoprops feature, or use special programs like find(1) to
> execute one command for many files.

Or the --recursive option might do the trick.

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


Re: svn:keywords?

Posted by Damir Shayhutdinov <da...@tecon.ru>.
On Wed, Feb 22, 2006 at 09:52:59AM +0100, Bj?rn T Johansen wrote:
> I would like to use svn:keywords but as far as I can tell, I have to run svn propset on every file I want to
> use keywords... Is this correct?
> Is there no other way? If I have 300 files, I need to run svn propset 300 times??
You can use autoprops feature, or use special programs like find(1) to
execute one command for many files.

find -type f -name '*.c' -exec svn propset svn:keywords Id {} \;

-- 
WBR,
Damir Shayhutdinov

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

Re: svn:keywords?

Posted by Gregory Margo <gm...@pacbell.net>.
On Wed, Feb 22, 2006 at 09:52:59AM +0100, Bj?rn T Johansen wrote:
> I would like to use svn:keywords but as far as I can tell, I have to run svn propset on every file I want to
> use keywords... Is this correct?
> Is there no other way? If I have 300 files, I need to run svn propset 300 times??


Since I kept having to re-figure the syntax for this every time I
add a file to my project, I wrote this simple shell script, which
I call "add_svn_props":


#!/bin/sh

# Add some properties to a Subversion object.
# G. Margo 2006-01-17

Usage () {
	echo "$0 [-x] filename(s)"
        echo "    -x: Add executable property."
	exit 1
}

opt_executable=0
while [ "x$1" != "x" ]; do
    case "$1" in
	-x)	opt_executable=1 ;;
	-*)	Usage	;;
	*)	break 2	;;
    esac
    shift
done

if [ $# -lt 1 ] ; then
    Usage
fi

#ECHO=echo
ECHO=

add_props () {
    $ECHO svn propset svn:keywords 'Author Date Id Revision' $*
    $ECHO svn propset svn:eol-style native $*
    if [ $opt_executable -eq 1 ] ; then
        $ECHO svn propset svn:executable '*' $*
    fi
}

add_props $*



-- 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Gregory H. Margo
gmargo at yahoo/com, gmail/com, pacbell/net; greg at margofamily/org

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