templater: ignore orig/rej files
authortimeless <timeless@mozdev.org>
Wed, 02 Mar 2016 05:27:07 +0000
changeset 28403 d2e154dddb6e
parent 28402 7f77e71e5d7e
child 28404 06245740b408
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."
mercurial/templater.py
--- 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))