templater: ignore orig/rej files
If your mercurial/templates/ directory is dirty, then the template system would
otherwise import duplicate templates from the .orig files and potentially try to
parse .rej files.
Since editing/reverting these templates isn't an unexpected action, and since
they're in .hgignore, it's best that the template system know to skip them."
--- a/mercurial/templater.py Thu Dec 24 04:31:34 2015 +0000
+++ b/mercurial/templater.py Wed Mar 02 05:27:07 2016 +0000
@@ -891,6 +891,8 @@
stylelist = []
for file in dirlist:
split = file.split(".")
+ if split[-1] in ('orig', 'rej'):
+ continue
if split[0] == "map-cmdline":
stylelist.append(split[1])
return ", ".join(sorted(stylelist))