comparison hgext/narrow/__init__.py @ 43077:687b865b95ad

formatting: byteify all mercurial/ and hgext/ string literals Done with python3.7 contrib/byteify-strings.py -i $(hg files 'set:mercurial/**.py - mercurial/thirdparty/** + hgext/**.py - hgext/fsmonitor/pywatchman/** - mercurial/__init__.py') black -l 80 -t py33 -S $(hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**" - hgext/fsmonitor/pywatchman/**') # skip-blame mass-reformatting only Differential Revision: https://phab.mercurial-scm.org/D6972
author Augie Fackler <augie@google.com>
date Sun, 06 Oct 2019 09:48:39 -0400
parents 2372284d9457
children f91834ecfdfd
comparison
equal deleted inserted replaced
43076:2372284d9457 43077:687b865b95ad
10 10
11 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for 11 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
12 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should 12 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
13 # be specifying the version(s) of Mercurial they are tested with, or 13 # be specifying the version(s) of Mercurial they are tested with, or
14 # leave the attribute unspecified. 14 # leave the attribute unspecified.
15 testedwith = 'ships-with-hg-core' 15 testedwith = b'ships-with-hg-core'
16 16
17 from mercurial import ( 17 from mercurial import (
18 localrepo, 18 localrepo,
19 registrar, 19 registrar,
20 ) 20 )
39 # repositories with merges, it's unlikely this work will get done. As 39 # repositories with merges, it's unlikely this work will get done. As
40 # of this writining in late 2017, all repositories large enough for 40 # of this writining in late 2017, all repositories large enough for
41 # ellipsis nodes to be a hard requirement also enforce strictly linear 41 # ellipsis nodes to be a hard requirement also enforce strictly linear
42 # history for other scaling reasons. 42 # history for other scaling reasons.
43 configitem( 43 configitem(
44 'experimental', 44 b'experimental',
45 'narrowservebrokenellipses', 45 b'narrowservebrokenellipses',
46 default=False, 46 default=False,
47 alias=[('narrow', 'serveellipses')], 47 alias=[(b'narrow', b'serveellipses')],
48 ) 48 )
49 49
50 # Export the commands table for Mercurial to see. 50 # Export the commands table for Mercurial to see.
51 cmdtable = narrowcommands.table 51 cmdtable = narrowcommands.table
52 52
66 def reposetup(ui, repo): 66 def reposetup(ui, repo):
67 """Wraps local repositories with narrow repo support.""" 67 """Wraps local repositories with narrow repo support."""
68 if not repo.local(): 68 if not repo.local():
69 return 69 return
70 70
71 repo.ui.setconfig('experimental', 'narrow', True, 'narrow-ext') 71 repo.ui.setconfig(b'experimental', b'narrow', True, b'narrow-ext')
72 if repository.NARROW_REQUIREMENT in repo.requirements: 72 if repository.NARROW_REQUIREMENT in repo.requirements:
73 narrowrepo.wraprepo(repo) 73 narrowrepo.wraprepo(repo)
74 narrowwirepeer.reposetup(repo) 74 narrowwirepeer.reposetup(repo)
75 75
76 76