[PATCH]: Transform rules prototype
From: Daniel Berlin <dberlin_at_dberlin.org>
Date: 2005-11-06 04:35:10 CET
This patch implements a prototype version of transform rules to save
After playing with this for a while, I really like it. However, i very
To use it, apply the patch, then follow directions in config file setup
Config file setup:
add a section to ~/.subversion/config named "[transform-rules]".
The syntax for each rule is "matchtext=replacement priority"
Replacement may contain $[1-9], which will be replaced with an argument,
Priority specifies the order of rule application.
Note:
The other option is to require a bs name on the lhs.
or move priority there, so it's
<priority>=<match text> <replacement>
If you put the same name on the lhs, svn_config_* just store the last
Command line syntax:
In order to make this easy to test, i've hooked it up to the url syntax.
Url's starting with "rule://" will be tranformed according to the rules.
To specify an argument to a rule, use # to separate arguments
Examples:
[transform-rules]
The command line:
will be turned into
svn ls svn://gcc.gnu.org/svn/gcc
The command line
will become:
(Note the recursive rule expansion, which happened in order of priority)
I am not formally proposing we use the rule:// syntax, it's just a way
(Though i'm not opposed to it if people like it :P).
Anyway, give this a try and tell me what you think.
I have no plans to implement Perl style matching and substitution, as
--Dan
---------------------------------------------------------------------
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.