How would I create a template starter project for use in Mercurial?
I'm researching using Mercurial for our companies source control system. One immediate requirement that is the ability to have a template project that has a lot of code we reuse built into it and let other developers use that as a starting point for their projects.
For example, I do a lot of asp.net mvc 2 development in our company. I've created several html helpers, extension classes, pdf creation, and logging utilities. I hesitate to move these into their own project and reference that dll as each projects needs are so different. I would r开发者_StackOverflow中文版ather like to have a sort of basic template project with all of these things in them. When a co-worker goes to create a new project, I'd like them to be able to pull down this code, but I don't want them changing the template (though I would want to be able to make changes to the template...I just wouldn't want them doing it in this case).
How would I go about doing this?
I apologize if the question is jumbled. I'm new to mercurial. I've been through the http://tekpub.com/codeplex video and am about to look over Joel's http://hginit.com/index.html tutorial, but I wanted to put this use case out there to see how something like this might be accomplished.
One solution would be to have a public, read-only repository with your template code.
When developers start a new project, they simply clone the template repository and begin to work.
Since the template is read-only, they cannot push changes that would affect the template. Ideally, they should change the default pull URL in .hg/hgrc
to point to a new location specific to that project.
精彩评论