Mercurial > public > mercurial-scm > hg
comparison mercurial/scmutil.py @ 44884:d044b66d8429
scmutil: clarify getuipathfn comment
Differential Revision: https://phab.mercurial-scm.org/D8600
author | Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> |
---|---|
date | Tue, 26 May 2020 07:03:11 -0400 |
parents | 5d8ae9248a70 |
children | a56ba57c837d |
comparison
equal
deleted
inserted
replaced
44883:94f227baa76f | 44884:d044b66d8429 |
---|---|
802 ) | 802 ) |
803 | 803 |
804 if relative: | 804 if relative: |
805 cwd = repo.getcwd() | 805 cwd = repo.getcwd() |
806 if cwd != b'': | 806 if cwd != b'': |
807 # this branch is correct when cwd == b'', ie cwd = repo root, | 807 # this branch would work even if cwd == b'' (ie cwd = repo |
808 # but it's slower | 808 # root), but its generality makes the returned function slower |
809 pathto = repo.pathto | 809 pathto = repo.pathto |
810 return lambda f: pathto(f, cwd) | 810 return lambda f: pathto(f, cwd) |
811 if repo.ui.configbool(b'ui', b'slash'): | 811 if repo.ui.configbool(b'ui', b'slash'): |
812 return lambda f: f | 812 return lambda f: f |
813 else: | 813 else: |