Mercurial replacing values in a file that been cloned?
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 fi开发者_开发问答lled 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?
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
No, Mercurial is completely unaware of what is outside of it's repository folder.
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.
精彩评论