Show More
@@ -7,8 +7,6 b'' | |||||
7 |
|
7 | |||
8 | from __future__ import absolute_import |
|
8 | from __future__ import absolute_import | |
9 |
|
9 | |||
10 | import errno |
|
|||
11 |
|
||||
12 | from .i18n import _ |
|
10 | from .i18n import _ | |
13 | from . import ( |
|
11 | from . import ( | |
14 | error, |
|
12 | error, | |
@@ -145,15 +143,9 b' def parseconfig(ui, spec):' | |||||
145 | return includepats, excludepats |
|
143 | return includepats, excludepats | |
146 |
|
144 | |||
147 | def load(repo): |
|
145 | def load(repo): | |
148 | try: |
|
146 | # Treat "narrowspec does not exist" the same as "narrowspec file exists | |
149 | spec = repo.svfs.read(FILENAME) |
|
147 | # and is empty". | |
150 | except IOError as e: |
|
148 | spec = repo.svfs.tryread(FILENAME) | |
151 | # Treat "narrowspec does not exist" the same as "narrowspec file exists |
|
|||
152 | # and is empty". |
|
|||
153 | if e.errno == errno.ENOENT: |
|
|||
154 | return set(), set() |
|
|||
155 | raise |
|
|||
156 |
|
||||
157 | return parseconfig(repo.ui, spec) |
|
149 | return parseconfig(repo.ui, spec) | |
158 |
|
150 | |||
159 | def save(repo, includepats, excludepats): |
|
151 | def save(repo, includepats, excludepats): |
General Comments 0
You need to be logged in to leave comments.
Login now