.hgignore GUI to insert regexp/glob at right place
Created originally on Bitbucket by anthibug
Hello,
The TortoiseHG windows GUI adds new items to ignore right before syntax: regexp
.
Its ok: file is ignored and we're using the simple blob syntax.
However this automatic mecanism messed up the layout of our .hgignore which has a dedicated comment before the syntax: regexp
line.
We have a lot of dev. on a big repository and often they just click "Add" in the GUI and commit without even looking...
Let me show you what our .hgignore looks like (simplified):
# Use glob syntax
syntax: glob
*.exe
*.bak
*.min.js
# many more rules
# --------------------------------------------------
# Switch to regexp syntax
syntax: regexp
^.build/
UpgradeLog[0-9]*\.(XML|htm)$
# a few more regexp rules
# end of file
Thus when using the GUI, any added item ends up between # Switch to regexp syntax
and syntax: regexp
which is too bad :-/
Would it be possible to either:
- add the items before any commented line (right before the syntax change)
- add at the end
Thanks!