Typesetting a LaTeX source generates a lot of helper files, like *.aux and *.log. A quick look through my directory of LaTeX files reveals the following kinds of files:
*.aux
*.log
*.out
*.pdfsync
*.bbl
*.blg
*.brf
*.svn
*.dvi
*.toc
*.bak
*.nav
*.snm
(Your helper files may differ depending on the programs you are running. Thus for example, *.bbl files are generated by BibTeX and *.nav files are generated by Beamer. If you are using neither program, they won’t show up on your system.) If you are keeping your LaTeX source in version control with subversion, you don’t want to commit these to your repository. But then, running svn status returns all these “?”s since subversion doesn’t know about these files. If there are a lot of them, this can make it hard to to spot the files that genuinely need to be added. Wouldn’t it be great if there were a way that subversion could just ignore these? Well, here are two.
Method One: Put the list of auxiliary files in a text file called temp. Then in the directory containing your LaTeX source run:
svn propset svn:ignore . -F temp
After this subversion will ignore these files in the directory and stop bugging you about files that you don’t care about. Pretty cool. But it works on a directory by directory basis. If you have a lot of directories of LaTeX files, then this can get tedious.
Method Two: The second method makes this change globally. Subversion comes with a config file. Two actually: /etc/subversion/config and ~/subversion/config. The former configures options for the use of subversion for all users, the latter configures options for the use of subversion on a user by user basis. Let’s modify ~/subversion/config. The config file is divided into sections. Be sure to read ~/subversion/README.txt for the syntax of the config file. In the section [miscellany] I have the following:
global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store *.aux *.log *.out *.pdfsync _rev.tex *.bbl *.blg *.brf *.svn *.dvi *.toc *.nav *.toc *.bak *.snm
These files will now be ignored in all of your working copies.
Post a Comment