You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by John Belmonte <jo...@neggie.net> on 2004/12/25 00:37:50 UTC
suggestion for more custom keyword options (Issue 890)
As part of Issue 890 (custom keywords), I would like to see two more
options for the keyword values:
* repository-local path of file
* repository UUID
In my use case, the location of repositories is known from context (the
files are only used within a given organization). I don't want to use
URL's (i.e. $HeadURL) because they include the repository location and
access method, which are subject to change.
I'd appreciate if someone would add this suggestion to
<http://subversion.tigris.org/issues/show_bug.cgi?id=890>.
Thank you,
-John Belmonte
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: suggestion for more custom keyword options (Issue 890)
Posted by Max Bowsher <ma...@ukf.net>.
John Belmonte wrote:
> As part of Issue 890 (custom keywords), I would like to see two more
> options for the keyword values:
>
> * repository-local path of file
> * repository UUID
>
> In my use case, the location of repositories is known from context (the
> files are only used within a given organization). I don't want to use
> URL's (i.e. $HeadURL) because they include the repository location and
> access method, which are subject to change.
>
> I'd appreciate if someone would add this suggestion to
> <http://subversion.tigris.org/issues/show_bug.cgi?id=890>.
>
> Thank you,
> -John Belmonte
These both are sensible suggestions - feel free to add them to the issue
yourself!
(I assumed jbelmonte at tigris.org is you, and added the Observer role to
that user, so no need for you to do the "Request Role, wait for approval"
procedure.)
Max.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: suggestion for more custom keyword options (Issue 890)
Posted by John Peacock <jp...@rowman.com>.
John Belmonte wrote:
> I didn't think that the new format options necessarily warranted new
> builtin keywords-- having them available only to custom keywords would
> be enough for me. Your revised format characters look fine.
Except that I haven't worked on a way to expose custom keywords yet, so without
builtin keywords, you cannot use them. I'm of the opinion that if these
keywords are useful enough to add at all, they are useful enough to warrant new
builtin's for them. The custom keyword functionality has always been about
reusing the existing keywords in new and interesting ways.
If I get the proposed $Format$ keyword working, then this would be an ideal way
to expose the custom keyword functionality. I don't know how likely it is going
to be to do that; the issue is that I don't have the usual markers for expanded
vs unexpanded keyword to work with and I'll have to be very careful about how I
proceed. I may have to have $Format$ and $/Format$ markers...hmmm, that would
also work for those poor lost souls who want to have $Log$ working...
> From my limited understanding, the repository root is available from
> the RA interface (get_repos_root). By subtracting the root from the
> URL, you can get the repository-local path.
And therein lies the rub: I don't have access to the session_baton (required to
call get_repos_root) at that point in the code. The keyword processing is all
performed in the parts of the code dealing specifically with the working copy.
In fact, the keyword expansion itself happens _after_ the commit/update has
completed and hence the session_baton may not even be in scope at the time. It
may be that the svn_wc_entry_t would have to be extended to contain the
repos_root (and populated earlier in the process), so that I can retrieve it
later. :(
John
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: suggestion for more custom keyword options (Issue 890)
Posted by John Belmonte <jo...@neggie.net>.
John Peacock wrote:
> I've starting bringing my keywords as hash patch up to date (currently
> testing phase 1) and I wanted to implement these suggested additions at
> the same time. But I have questions:
>
> John Belmonte wrote:
>
>> As part of Issue 890 (custom keywords), I would like to see two more
>> options for the keyword values:
>>
>> * repository-local path of file
>
>
> This one is hard, since there appears to be no way to go from entry->url
> (what I've got to work with) to just the repository local portion. This
> appears to be something the client is not privy to. Am I missing
> something obvious in svn_path.h? If I can figure out how to do this, we
> need a good keyword for this concept:
>
> #define SVN_KEYWORD_LOCAL_LONG "RepositoryLocalPath"
> #define SVN_KEYWORD_LOCAL_MEDIUM "LocalPath"
> #define SVN_KEYWORD_LOCAL_SHORT "Local"
> #define SVN_KEYWORD_LOCAL_FORMAT "%L"
>
> I prefer not to use %l for the format letter, as that is easy to confuse
> with %i.
>
>> * repository UUID
>>
>
> This one is easy; I just add entry->uuid to the
> svn_subst_build_keywords2() calls and display it. I would suggest the
> following definitions, though:
>
> #define SVN_KEYWORD_UUID_LONG "RepositoryUUID"
> #define SVN_KEYWORD_UUID_SHORT "UUID"
> #define SVN_KEYWORD_UUID_FORMAT "%U"
>
> I prefer not to use %i because it is too easy to confuse with %l. I'd
> be just as happy to only have the SHORT form here, instead of both, but
> it doesn't matter much to me.
Thanks for considering my suggestions. I'm glad to hear you are working
on this again.
I didn't think that the new format options necessarily warranted new
builtin keywords-- having them available only to custom keywords would
be enough for me. Your revised format characters look fine.
From my limited understanding, the repository root is available from
the RA interface (get_repos_root). By subtracting the root from the
URL, you can get the repository-local path.
-John
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: suggestion for more custom keyword options (Issue 890)
Posted by John Peacock <jp...@rowman.com>.
I've starting bringing my keywords as hash patch up to date (currently testing
phase 1) and I wanted to implement these suggested additions at the same time.
But I have questions:
John Belmonte wrote:
> As part of Issue 890 (custom keywords), I would like to see two more
> options for the keyword values:
>
> * repository-local path of file
This one is hard, since there appears to be no way to go from entry->url (what
I've got to work with) to just the repository local portion. This appears to be
something the client is not privy to. Am I missing something obvious in
svn_path.h? If I can figure out how to do this, we need a good keyword for this
concept:
#define SVN_KEYWORD_LOCAL_LONG "RepositoryLocalPath"
#define SVN_KEYWORD_LOCAL_MEDIUM "LocalPath"
#define SVN_KEYWORD_LOCAL_SHORT "Local"
#define SVN_KEYWORD_LOCAL_FORMAT "%L"
I prefer not to use %l for the format letter, as that is easy to confuse with %i.
> * repository UUID
>
This one is easy; I just add entry->uuid to the svn_subst_build_keywords2()
calls and display it. I would suggest the following definitions, though:
#define SVN_KEYWORD_UUID_LONG "RepositoryUUID"
#define SVN_KEYWORD_UUID_SHORT "UUID"
#define SVN_KEYWORD_UUID_FORMAT "%U"
I prefer not to use %i because it is too easy to confuse with %l. I'd be just
as happy to only have the SHORT form here, instead of both, but it doesn't
matter much to me.
TIA
John
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org