equal
deleted
inserted
replaced
850 if os.path.isfile(abs): |
850 if os.path.isfile(abs): |
851 subresource = util.posixfile(abs, b'rb') |
851 subresource = util.posixfile(abs, b'rb') |
852 if not subresource: |
852 if not subresource: |
853 if pycompat.ossep not in rel: |
853 if pycompat.ossep not in rel: |
854 abs = rel |
854 abs = rel |
855 subresource = resourceutil.open_resource( |
855 try: |
856 b'mercurial.templates', rel |
856 subresource = resourceutil.open_resource( |
857 ) |
857 b'mercurial.templates', rel |
|
858 ) |
|
859 except resourceutil.FileNotFoundError: |
|
860 subresource = None |
858 else: |
861 else: |
859 dir = templatedir() |
862 dir = templatedir() |
860 if dir: |
863 if dir: |
861 abs = os.path.normpath(os.path.join(dir, rel)) |
864 abs = os.path.normpath(os.path.join(dir, rel)) |
862 if os.path.isfile(abs): |
865 if os.path.isfile(abs): |