equal
deleted
inserted
replaced
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) |