mercurial/templatekw.py
changeset 17357 bd605568c5a0
parent 17187 293dd81e4601
child 17358 2917f82f6040
equal deleted inserted replaced
17354:c87ba0a6fb79 17357:bd605568c5a0
   273     """:node: String. The changeset identification hash, as a 40 hexadecimal
   273     """:node: String. The changeset identification hash, as a 40 hexadecimal
   274     digit string.
   274     digit string.
   275     """
   275     """
   276     return ctx.hex()
   276     return ctx.hex()
   277 
   277 
       
   278 def showp1rev(repo, ctx, templ, **args):
       
   279     """:p1rev: Integer. The repository-local revision number of the changeset's
       
   280     first parent, or -1 if the changeset has no parents."""
       
   281     return ctx.p1().rev()
       
   282 
       
   283 def showp2rev(repo, ctx, templ, **args):
       
   284     """:p2rev: Integer. The repository-local revision number of the changeset's
       
   285     second parent, or -1 if the changeset has no second parent."""
       
   286     return ctx.p2().rev()
       
   287 
       
   288 def showp1node(repo, ctx, templ, **args):
       
   289     """:p1node: String. The identification hash of the changeset's first parent,
       
   290     as a 40 digit hexadecimal string. If the changeset has no parents, all
       
   291     digits are 0."""
       
   292     return ctx.p1().hex()
       
   293 
       
   294 def showp2node(repo, ctx, templ, **args):
       
   295     """:p2node: String. The identification hash of the changeset's second
       
   296     parent, as a 40 digit hexadecimal string. If the changeset has no second
       
   297     parent, all digits are 0."""
       
   298     return ctx.p2().hex()
       
   299 
   278 def showphase(repo, ctx, templ, **args):
   300 def showphase(repo, ctx, templ, **args):
   279     """:phase: String. The changeset phase name."""
   301     """:phase: String. The changeset phase name."""
   280     return ctx.phasestr()
   302     return ctx.phasestr()
   281 
   303 
   282 def showphaseidx(repo, ctx, templ, **args):
   304 def showphaseidx(repo, ctx, templ, **args):
   318     'files': showfiles,
   340     'files': showfiles,
   319     'latesttag': showlatesttag,
   341     'latesttag': showlatesttag,
   320     'latesttagdistance': showlatesttagdistance,
   342     'latesttagdistance': showlatesttagdistance,
   321     'manifest': showmanifest,
   343     'manifest': showmanifest,
   322     'node': shownode,
   344     'node': shownode,
       
   345     'p1rev': showp1rev,
       
   346     'p1node': showp1node,
       
   347     'p2rev': showp2rev,
       
   348     'p2node': showp2node,
   323     'phase': showphase,
   349     'phase': showphase,
   324     'phaseidx': showphaseidx,
   350     'phaseidx': showphaseidx,
   325     'rev': showrev,
   351     'rev': showrev,
   326     'tags': showtags,
   352     'tags': showtags,
   327 }
   353 }