tags:

views:

256

answers:

2

Hey,

I know there is a way to get mercurial to ignore specific files using hgignore.

Is there a way to get it to ignore all files above a certain size?

Thanks

+3  A: 

Unfortunately matching in .hgignore is done just by filenaming. However, nothing prevents you from writing a pre-commit hook that autocreates (appends) .hgignore files based on their size.

Kornel Kisielewicz
+5  A: 

Clever notion. There's no built-in functionality for that, but you could rig up something like:

find -type f -size +10M > .hgignore

You could run that in a precommit hook, but you'll want to delete the lines from the previous entry.

Ry4an