hgext/fastannotate/commands.py
changeset 39818 24e493ec2229
parent 39666 b77f2ea51da5
child 40295 fa88170c10bb
equal deleted inserted replaced
39817:94c25f694ec3 39818:24e493ec2229
    10 import os
    10 import os
    11 
    11 
    12 from mercurial.i18n import _
    12 from mercurial.i18n import _
    13 from mercurial import (
    13 from mercurial import (
    14     commands,
    14     commands,
       
    15     encoding,
    15     error,
    16     error,
    16     extensions,
    17     extensions,
    17     patch,
    18     patch,
    18     pycompat,
    19     pycompat,
    19     registrar,
    20     registrar,
    39     # b) if we treat pats as plain file names, some of them do not have
    40     # b) if we treat pats as plain file names, some of them do not have
    40     #    corresponding linelog files
    41     #    corresponding linelog files
    41     if perfhack:
    42     if perfhack:
    42         # cwd related to reporoot
    43         # cwd related to reporoot
    43         reporoot = os.path.dirname(repo.path)
    44         reporoot = os.path.dirname(repo.path)
    44         reldir = os.path.relpath(pycompat.getcwd(), reporoot)
    45         reldir = os.path.relpath(encoding.getcwd(), reporoot)
    45         if reldir == '.':
    46         if reldir == '.':
    46             reldir = ''
    47             reldir = ''
    47         if any(opts.get(o[1]) for o in commands.walkopts): # a)
    48         if any(opts.get(o[1]) for o in commands.walkopts): # a)
    48             perfhack = False
    49             perfhack = False
    49         else: # b)
    50         else: # b)