comparison mercurial/templater.py @ 28403:d2e154dddb6e

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."
author timeless <timeless@mozdev.org>
date Wed, 02 Mar 2016 05:27:07 +0000
parents 3356bf61fa25
children dbba18ba26d4
comparison
equal deleted inserted replaced
28402:7f77e71e5d7e 28403:d2e154dddb6e
889 return _('no templates found, try `hg debuginstall` for more info') 889 return _('no templates found, try `hg debuginstall` for more info')
890 dirlist = os.listdir(paths[0]) 890 dirlist = os.listdir(paths[0])
891 stylelist = [] 891 stylelist = []
892 for file in dirlist: 892 for file in dirlist:
893 split = file.split(".") 893 split = file.split(".")
894 if split[-1] in ('orig', 'rej'):
895 continue
894 if split[0] == "map-cmdline": 896 if split[0] == "map-cmdline":
895 stylelist.append(split[1]) 897 stylelist.append(split[1])
896 return ", ".join(sorted(stylelist)) 898 return ", ".join(sorted(stylelist))
897 899
898 class TemplateNotFound(error.Abort): 900 class TemplateNotFound(error.Abort):