views:

36

answers:

3

Say I'm cloning a repository that I always clone to C:\working_copies\<customer-name>\<customer-project>\ and that the project has variables in it's build.properties that get filled in with <customer-name> <customer-project> (by me) everytime I clone the repo.

Is there a way that I can fill in these values in the file automatically by placing some special value in the file (in ant it's something like ${base-dir} or something like that) that would fill in these build.property values for me?

+1  A: 

No, Mercurial is completely unaware of what is outside of it's repository folder.

gizmo
+1  A: 

option 1: make sure build process only relies on relative paths, and dont change name/project variable

option2: write a hook, specifically a post-clone hook, try the book for a hook tutorial

jk
+1  A: 

You should be able to rig this up using the Keyword Extension. Just set up a HGRC that populates the working directory with the values you want upon update.

Ry4an
Is there any way to place a regular expression selection taken from the path of the directory?
leeand00
You could do so when building the .hgrc file that will include details ont he substitution to make, but you can't have regexp captures evaluated live during keyword replacement that I know of.
Ry4an