简体   繁体   中英

Mercurial, ignore only object files for which the source is there

I have quite a few objects (.o) files in my (future) Mercurial repository. I have the source for most of them, but some were downloaded / provided by collaborators and I don't have the sources. Of course, versioning binary files is bad, but I'd like to do that for the few files for which I don't have the sources (given that they will rarely, if ever, be modified, and that on the other hand I cannot regenerate them myself).

Assuming that I have a simple way of determining where .c corresponding to a .o is if it exists (eg always in the same folder), is there an easy way to achieve this?

Thanks.

You can safely add *.o files to your .hgignore , and then manually hg add specific *.o files to the repository for tracking. Any automatic adding (such as hg addremove , or hg add without an argument) will still ignore *.o files, but you can manually add anything ignored and it will be tracked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM