mercurial/templatekw.py
changeset 25736 8854ca3fa675
parent 25727 b8245386ab40
child 25740 47469fa8fb01
equal deleted inserted replaced
25735:3948cb4d0ae7 25736:8854ca3fa675
   353     return len(repo.revs('only(%ld, %s)', revs, latesttag)) + offset
   353     return len(repo.revs('only(%ld, %s)', revs, latesttag)) + offset
   354 
   354 
   355 def showmanifest(**args):
   355 def showmanifest(**args):
   356     repo, ctx, templ = args['repo'], args['ctx'], args['templ']
   356     repo, ctx, templ = args['repo'], args['ctx'], args['templ']
   357     mnode = ctx.manifestnode()
   357     mnode = ctx.manifestnode()
       
   358     if mnode is None:
       
   359         # just avoid crash, we might want to use the 'ff...' hash in future
       
   360         return
   358     args = args.copy()
   361     args = args.copy()
   359     args.update({'rev': repo.manifest.rev(mnode), 'node': hex(mnode)})
   362     args.update({'rev': repo.manifest.rev(mnode), 'node': hex(mnode)})
   360     return templ('manifest', **args)
   363     return templ('manifest', **args)
   361 
   364 
   362 def shownode(repo, ctx, templ, **args):
   365 def shownode(repo, ctx, templ, **args):