Show More
@@ -94,15 +94,16 b' from __future__ import absolute_import' | |||
|
94 | 94 | import hashlib |
|
95 | 95 | import os |
|
96 | 96 | import stat |
|
97 | import sys | |
|
98 | 97 | |
|
99 | 98 | from mercurial.i18n import _ |
|
100 | 99 | from mercurial import ( |
|
101 | 100 | context, |
|
101 | encoding, | |
|
102 | 102 | extensions, |
|
103 | 103 | localrepo, |
|
104 | 104 | merge, |
|
105 | 105 | pathutil, |
|
106 | pycompat, | |
|
106 | 107 | scmutil, |
|
107 | 108 | util, |
|
108 | 109 | ) |
@@ -292,7 +293,7 b' def overridewalk(orig, self, match, subr' | |||
|
292 | 293 | if normalize: |
|
293 | 294 | foldmap = dict((normcase(k), k) for k in results) |
|
294 | 295 | |
|
295 |
switch_slashes = |
|
|
296 | switch_slashes = pycompat.ossep == '\\' | |
|
296 | 297 | # The order of the results is, strictly speaking, undefined. |
|
297 | 298 | # For case changes on a case insensitive filesystem we may receive |
|
298 | 299 | # two entries, one with exists=True and another with exists=False. |
@@ -392,8 +393,8 b' def overridestatus(' | |||
|
392 | 393 | |
|
393 | 394 | def _cmpsets(l1, l2): |
|
394 | 395 | try: |
|
395 |
if 'FSMONITOR_LOG_FILE' in |
|
|
396 |
fn = |
|
|
396 | if 'FSMONITOR_LOG_FILE' in encoding.environ: | |
|
397 | fn = encoding.environ['FSMONITOR_LOG_FILE'] | |
|
397 | 398 | f = open(fn, 'wb') |
|
398 | 399 | else: |
|
399 | 400 | fn = 'fsmonitorfail.log' |
@@ -434,7 +435,7 b' def overridestatus(' | |||
|
434 | 435 | updatestate = (parentworking and match.always() and |
|
435 | 436 | not isinstance(ctx2, (context.workingcommitctx, |
|
436 | 437 | context.memctx)) and |
|
437 |
'HG_PENDING' not in |
|
|
438 | 'HG_PENDING' not in encoding.environ) | |
|
438 | 439 | |
|
439 | 440 | try: |
|
440 | 441 | if self._fsmonitorstate.walk_on_invalidate: |
@@ -545,7 +546,7 b' def wrapdirstate(orig, self):' | |||
|
545 | 546 | |
|
546 | 547 | def extsetup(ui): |
|
547 | 548 | wrapfilecache(localrepo.localrepository, 'dirstate', wrapdirstate) |
|
548 |
if |
|
|
549 | if pycompat.sysplatform == 'darwin': | |
|
549 | 550 | # An assist for avoiding the dangling-symlink fsevents bug |
|
550 | 551 | extensions.wrapfunction(os, 'symlink', wrapsymlink) |
|
551 | 552 |
@@ -9,21 +9,6 b' New errors are not allowed. Warnings are' | |||
|
9 | 9 | |
|
10 | 10 | $ hg locate -X contrib/python-zstandard -X hgext/fsmonitor/pywatchman | |
|
11 | 11 | > sed 's-\\-/-g' | xargs "$check_code" --warnings --per-file=0 || false |
|
12 | hgext/fsmonitor/__init__.py:295: | |
|
13 | > switch_slashes = os.sep == '\\' | |
|
14 | use pycompat.ossep instead (py3) | |
|
15 | hgext/fsmonitor/__init__.py:395: | |
|
16 | > if 'FSMONITOR_LOG_FILE' in os.environ: | |
|
17 | use encoding.environ instead (py3) | |
|
18 | hgext/fsmonitor/__init__.py:396: | |
|
19 | > fn = os.environ['FSMONITOR_LOG_FILE'] | |
|
20 | use encoding.environ instead (py3) | |
|
21 | hgext/fsmonitor/__init__.py:437: | |
|
22 | > 'HG_PENDING' not in os.environ) | |
|
23 | use encoding.environ instead (py3) | |
|
24 | hgext/fsmonitor/__init__.py:548: | |
|
25 | > if sys.platform == 'darwin': | |
|
26 | use pycompat.sysplatform instead (py3) | |
|
27 | 12 | Skipping i18n/polib.py it has no-che?k-code (glob) |
|
28 | 13 | mercurial/demandimport.py:309: |
|
29 | 14 | > if os.environ.get('HGDEMANDIMPORT') != 'disable': |
General Comments 0
You need to be logged in to leave comments.
Login now