开发者

How can I commit a set of files only once in Mercurial?

开发者 https://www.devze.com 2022-12-17 08:39 出处:网络
I have some files I\'d like to add to have them as a \"backup\". The thing is, I\'d like to commit them only one time,开发者_C百科 and then, I\'d like for Mercurial to don\'t track them anymore ( don\

I have some files I'd like to add to have them as a "backup". The thing is, I'd like to commit them only one time,开发者_C百科 and then, I'd like for Mercurial to don't track them anymore ( don't notify me if they're changed, and don't commit them on other commits ).

Basically, something like this:

hg add my_folder
hg commit -m "added first version of my_folder"

Then, after a while, the contents of that folder might change. And if I commit other files, the new version of that folder will get commited as well. This is something I'd like to avoid. Is it possible, without specifying directly which files I want to commit?


I've never seen any option in Mercurial that might allow that... but why not simply copy them elsewhere ?

I mean, what's the point of using a Version Tracking System if you don't need versioning on these items anyway ?

We ran into a similar case with binary documents ('.doc', images, etc...) and finally decided to commit them on a separate repository, dedicated to those.


I think the traditional way of doing this is to commit files named something like "file.ext.default", and just inform users that they should copy the defaults and modify the copies.


VCSs aren't backup sysytems. consider using a proper backup mechanism.

having said that you should be able to do this using hooks, there are many ways you could do this but ACLs would be an obvious one assuming a remote server

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号