You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by George Georgalis <ge...@galis.org> on 2006/04/12 01:06:53 UTC

expanding keywords

Hi,

I discovered that I can use

 svn propset svn:keywords 'Id URL' trunk/dirA/fileA

to allow for keyword expansion like this in that fileA

 $URL: file:///home/geo/svn-test/trunk/dirA/fileA $
 $Id: fileA 14 2006-04-12 00:42:14Z geo $

However, I'd like to see a keyword expand like this
 
 $ LocalName: trunk/dirA/fileA 14 2006-04-12 00:42:14Z geo $

which is the info most important to me... a system by which
files can change repositories and continue to reflect their
history. In cvs world, I added these lines to CVSROOT/config

LocalKeyword=GeorgalisG=CVSHeader
KeywordExpand=iGeorgalisG

so, whenever I put the string "$GeorgalisG$" in a repo file, it
gets expanded like

  $GeorgalisG: mkinst/qmail-inst.sh,v 1.26 2006/02/20 19:32:09 geo Exp $

If that file was ever brought into another repo, their config
could be adjusted to retain my keyword but expand their own, and
again for CompanyaB...

 $CompanyB: partner/CompanyA/extra/scripts/qmail-inst.sh,v 1.2 2006/03/30 00:00:07 Exp $
 $CompanyA: extra/scripts/qmail-inst.sh,v 1.0 2006/03/29 23:58:05 Exp $
 $GeorgalisG: mkinst/qmail-inst.sh,v 1.26 2006/02/20 19:32:09 geo Exp $

Will this be behavior be configurable in svn?

// George

-- 
George Georgalis, systems architect, administrator <IXOYE><
http://galis.org/ cell:646-331-2027 mailto:george@galis.org

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

Re: expanding keywords

Posted by George Georgalis <ge...@galis.org>.
On Wed, Apr 12, 2006 at 11:18:10AM -0500, brinkleybw@bigfoot.com wrote:
>Found: http://subversion.tigris.org/issues/show_bug.cgi?id=890

perfect. Thanks.

// George


-- 
George Georgalis, systems architect, administrator <IXOYE><
http://galis.org/ cell:646-331-2027 mailto:george@galis.org

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

Re: expanding keywords

Posted by "brinkleybw@bigfoot.com" <br...@gmail.com>.
Found: http://subversion.tigris.org/issues/show_bug.cgi?id=890
-B


On 4/12/06, George Georgalis <ge...@galis.org> wrote:
>
>
> Is there an official feature request path? I can't imagine it would
> be difficult to add config parsing for a custom $Id$.
>
>

Re: expanding keywords

Posted by George Georgalis <ge...@galis.org>.
On Wed, Apr 12, 2006 at 11:34:27AM +0200, Ryan Schmidt wrote:
>On Apr 12, 2006, at 03:06, George Georgalis wrote:
>>
>>Will this be behavior be configurable in svn?
>
>There is no such feature in Subversion right now, as far as I know.

Is there an official feature request path? I can't imagine it would
be difficult to add config parsing for a custom $Id$.

// George


-- 
George Georgalis, systems architect, administrator <IXOYE><
http://galis.org/ cell:646-331-2027 mailto:george@galis.org

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

Re: expanding keywords

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Apr 12, 2006, at 16:50, Andy Levy wrote:

> As I understand it, hook scripts should not modify files being
> committed.  If they do, then your working copy will not match the
> repository after a commit, unless you update immediately afterward.


If the hook script modifies the transaction in progress, even  
updating the working copy afterwards will not help, because the  
working copy will think it is already up to date at revision N, and  
the repository has a different idea of what revision N is.

If the hook script lets the transaction go through, and then  
immediately commits a second transaction with the desired change,  
then what you said is true: the working copy will be out of date, and  
the user will need to update his working copy to get the change.



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

Re: expanding keywords

Posted by "brinkleybw@bigfoot.com" <br...@gmail.com>.
Very good point, I hadn't considered that.

Also, why m4 when a simple sed would work?

-B


On 4/12/06, Andy Levy <an...@gmail.com> wrote:
>
> As I understand it, hook scripts should not modify files being
> committed.  If they do, then your working copy will not match the
> repository after a commit, unless you update immediately afterward.
>

Re: expanding keywords

Posted by Andy Levy <an...@gmail.com>.
As I understand it, hook scripts should not modify files being
committed.  If they do, then your working copy will not match the
repository after a commit, unless you update immediately afterward.

On 4/12/06, brinkleybw@bigfoot.com <br...@gmail.com> wrote:
>
> Can you trigger an m4 script on the server-side to do this custom expansion
> within the file?  Just a thought.
> -Brandon
>
>
>
> On 4/12/06, Ryan Schmidt <su...@ryandesign.com>
> wrote:
> >
> On Apr 12, 2006, at 03:06, George Georgalis wrote:
>
> > I added these lines to CVSROOT/config
> >
> > LocalKeyword=GeorgalisG=CVSHeader
> > KeywordExpand=iGeorgalisG
> >
> > so, whenever I put the string "$GeorgalisG$" in a repo file, it
> > gets expanded like
> >
> >   $GeorgalisG: mkinst/qmail- inst.sh,v 1.26 2006/02/20 19:32:09 geo
> > Exp $
> >
> > If that file was ever brought into another repo, their config
> > could be adjusted to retain my keyword but expand their own, and
> > again for CompanyaB...
> >
> >  $CompanyB:
> partner/CompanyA/extra/scripts/qmail-inst.sh,v 1.2
> > 2006/03/30 00:00:07 Exp $
> >  $CompanyA: extra/scripts/qmail-inst.sh,v 1.0 2006/03/29 23:58:05
> > Exp $
> >  $GeorgalisG: mkinst/qmail- inst.sh,v 1.26 2006/02/20 19:32:09 geo
> > Exp $
>

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


Re: expanding keywords

Posted by "brinkleybw@bigfoot.com" <br...@gmail.com>.
Can you trigger an m4 script on the server-side to do this custom expansion
within the file?  Just a thought.
-Brandon



On 4/12/06, Ryan Schmidt <su...@ryandesign.com> wrote:
>
> On Apr 12, 2006, at 03:06, George Georgalis wrote:
>
> > I added these lines to CVSROOT/config
> >
> > LocalKeyword=GeorgalisG=CVSHeader
> > KeywordExpand=iGeorgalisG
> >
> > so, whenever I put the string "$GeorgalisG$" in a repo file, it
> > gets expanded like
> >
> >   $GeorgalisG: mkinst/qmail-inst.sh,v 1.26 2006/02/20 19:32:09 geo
> > Exp $
> >
> > If that file was ever brought into another repo, their config
> > could be adjusted to retain my keyword but expand their own, and
> > again for CompanyaB...
> >
> >  $CompanyB: partner/CompanyA/extra/scripts/qmail-inst.sh,v 1.2
> > 2006/03/30 00:00:07 Exp $
> >  $CompanyA: extra/scripts/qmail-inst.sh,v 1.0 2006/03/29 23:58:05
> > Exp $
> >  $GeorgalisG: mkinst/qmail-inst.sh,v 1.26 2006/02/20 19:32:09 geo
> > Exp $
>

Re: expanding keywords

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Apr 12, 2006, at 03:06, George Georgalis wrote:

> However, I'd like to see a keyword expand like this
>
>  $ LocalName: trunk/dirA/fileA 14 2006-04-12 00:42:14Z geo $
>
> which is the info most important to me... a system by which
> files can change repositories and continue to reflect their
> history. In cvs world, I added these lines to CVSROOT/config
>
> LocalKeyword=GeorgalisG=CVSHeader
> KeywordExpand=iGeorgalisG
>
> so, whenever I put the string "$GeorgalisG$" in a repo file, it
> gets expanded like
>
>   $GeorgalisG: mkinst/qmail-inst.sh,v 1.26 2006/02/20 19:32:09 geo  
> Exp $
>
> If that file was ever brought into another repo, their config
> could be adjusted to retain my keyword but expand their own, and
> again for CompanyaB...
>
>  $CompanyB: partner/CompanyA/extra/scripts/qmail-inst.sh,v 1.2  
> 2006/03/30 00:00:07 Exp $
>  $CompanyA: extra/scripts/qmail-inst.sh,v 1.0 2006/03/29 23:58:05  
> Exp $
>  $GeorgalisG: mkinst/qmail-inst.sh,v 1.26 2006/02/20 19:32:09 geo  
> Exp $
>
> Will this be behavior be configurable in svn?

There is no such feature in Subversion right now, as far as I know.



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