Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 29893:6f447b9ec263
util: rename checkcase() to fscasesensitive() (API)
I always read the name "checkcase(path)" as "do we need to check for
case folding at this path", but it's actually (I think) meant to be
read "check if the file system cares about case at this path". I'm
clearly not the only one confused by this as the dirstate has this
property:
def _checkcase(self):
return not util.checkcase(self._join('.hg'))
Maybe we should even inverse the function and call it fscasefolding()
since that's what all callers care about?
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 30 Aug 2016 09:22:53 -0700 |
parents | 42751543fa06 |
children | 31a6d5e14508 |
comparison
equal
deleted
inserted
replaced
29892:8a84347b9907 | 29893:6f447b9ec263 |
---|---|
2447 """show information detected about current filesystem""" | 2447 """show information detected about current filesystem""" |
2448 util.writefile('.debugfsinfo', '') | 2448 util.writefile('.debugfsinfo', '') |
2449 ui.write(('exec: %s\n') % (util.checkexec(path) and 'yes' or 'no')) | 2449 ui.write(('exec: %s\n') % (util.checkexec(path) and 'yes' or 'no')) |
2450 ui.write(('symlink: %s\n') % (util.checklink(path) and 'yes' or 'no')) | 2450 ui.write(('symlink: %s\n') % (util.checklink(path) and 'yes' or 'no')) |
2451 ui.write(('hardlink: %s\n') % (util.checknlink(path) and 'yes' or 'no')) | 2451 ui.write(('hardlink: %s\n') % (util.checknlink(path) and 'yes' or 'no')) |
2452 ui.write(('case-sensitive: %s\n') % (util.checkcase('.debugfsinfo') | 2452 ui.write(('case-sensitive: %s\n') % (util.fscasesensitive('.debugfsinfo') |
2453 and 'yes' or 'no')) | 2453 and 'yes' or 'no')) |
2454 os.unlink('.debugfsinfo') | 2454 os.unlink('.debugfsinfo') |
2455 | 2455 |
2456 @command('debuggetbundle', | 2456 @command('debuggetbundle', |
2457 [('H', 'head', [], _('id of head node'), _('ID')), | 2457 [('H', 'head', [], _('id of head node'), _('ID')), |