I am new to mercurial, and for the most part do LaTeX reports and statistical calculations in R using .csv and/or .sqlite files. Re LaTeX, all I really care is the .tex file. Re R, I don't need version control on the .csv or .sqlite files because they are static.

When I do 'hg add' for a repo with a .csv and/or .sqlite file, I get a warning like:

rev2.sqlite: up to 3070 MB of RAM may be required to manage this file
(use 'hg revert rev2.sqlite' to cancel pending addition)

So I revert and subsequently use adds like hg add -X *.sqlite. I guess I really have two questions:

(1) Should I ignore these warnings? Because these large files are static, can I just add to the repo knowing that the diff files will always be empty and not worry about wasted resources?

(2) If I should keep excluding these files from the repo, is there away that I can fix this option? I.E., add to my .hgrc file something that always appends an option like -I *.tex -I *.R to my 'hg add' commands?

Thanks!

link|improve this question

feedback

2 Answers

up vote 3 down vote accepted

in ~/.hgrc:

[ui]
ignore = ~/.hgignore

in ~/.hgignore:

syntax: glob
*.tex
*.R

(You can also put a .hgignore file in each project; the above will do it globally. You can call the .hgignorefile referenced in .hgrc anything you want; within a project it should always be called .hgignore)

link|improve this answer
Thanks! This did the trick. Although I used *.csv *sqlite because I wanted to ignore those, not the tex and R files. – richardh Jan 10 '11 at 19:13
feedback

You can create an .hgignore file to always ignore some files, see this SO question. You can read the documentation on the Mercurial wiki page for .hgignore or the man page for more information.

You might want an .hgignore like this to ignore any .sqlite or .csv file:

\.sqlite$
\.csv
link|improve this answer
Thanks! I was looking for a global solution, but your answer gave me the big picture. I knew the answer was out there, I just didn't know the right search query. – richardh Jan 10 '11 at 19:14
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.