Configurable target directories

Toby Johnson toby at etjohnson.us
Fri Jan 26 18:01:13 CST 2007


Paul Kirchner wrote:
> Toby Johnson <toby <at> etjohnson.us> writes:
>
>   
>> For example we could accept a "directory map" input file such as:
>>
>> ${ROOT} = /trunk
>> ${LABELS} = /labels
>> ${ORPHANS} = /orphan
>> /projects/Website1 = /trunk/web/site1
>> /projects/Website2 = /trunk/web/site2
>>     
>
> I like this idea!
>
> Replacement using regular expressions or wildcards would be useful for dealing 
> with a lot of projects.  For example,
>
>   /projects/Website? = /trunk/web/site?
>   

It would need to be a strict string replace anchored to the beginning of 
the path string, otherwise it would be impossible to be sure that there 
are no overlapping targets. And we can't have overlapping or duplicate 
targets because it would completely throw off the internal state 
tracking and sanity checker for individual items.

Of course if it didn't require that the mappings must match path 
boundaries then your example would still work. In other words we're 
talking about a simple s/^$from/$to/ without needing to check whether 
the "from" grabbed an entire folder name or just part of one.



More information about the vss2svn-users mailing list