1

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

Opt
  • 4,774
  • 3
  • 28
  • 28

2 Answers2

9

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 Brase
  • 78,112
  • 7
  • 148
  • 169
4

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
  • 55,802
  • 15
  • 111
  • 149