mercurial/scmutil.py
changeset 32658 55ff67ffcead
parent 32656 4bec8cce6a09
child 32659 7b17f9de6d3e
equal deleted inserted replaced
32657:9fbd8ad398aa 32658:55ff67ffcead
    13 import os
    13 import os
    14 import re
    14 import re
    15 import socket
    15 import socket
    16 
    16 
    17 from .i18n import _
    17 from .i18n import _
    18 from .node import wdirrev
    18 from .node import (
       
    19     wdirid,
       
    20     wdirrev,
       
    21 )
       
    22 
    19 from . import (
    23 from . import (
    20     encoding,
    24     encoding,
    21     error,
    25     error,
    22     match as matchmod,
    26     match as matchmod,
    23     pathutil,
    27     pathutil,
   374                             yield hgname
   378                             yield hgname
   375                     else:
   379                     else:
   376                         newdirs.append(d)
   380                         newdirs.append(d)
   377             dirs[:] = newdirs
   381             dirs[:] = newdirs
   378 
   382 
       
   383 def binnode(ctx):
       
   384     """Return binary node id for a given basectx"""
       
   385     node = ctx.node()
       
   386     if node is None:
       
   387         return wdirid
       
   388     return node
       
   389 
   379 def intrev(ctx):
   390 def intrev(ctx):
   380     """Return integer for a given basectx that can be used in comparison or
   391     """Return integer for a given basectx that can be used in comparison or
   381     arithmetic operation"""
   392     arithmetic operation"""
   382     rev = ctx.rev()
   393     rev = ctx.rev()
   383     if rev is None:
   394     if rev is None: