##// END OF EJS Templates
narrow: read pending file when applicable...
marmoute -
r51146:2fbc109f default
parent child Browse files
Show More
@@ -16,6 +16,7 b' from . import ('
16 mergestate as mergestatemod,
16 mergestate as mergestatemod,
17 scmutil,
17 scmutil,
18 sparse,
18 sparse,
19 txnutil,
19 util,
20 util,
20 )
21 )
21
22
@@ -169,7 +170,13 b' def parseconfig(ui, spec):'
169 def load(repo):
170 def load(repo):
170 # Treat "narrowspec does not exist" the same as "narrowspec file exists
171 # Treat "narrowspec does not exist" the same as "narrowspec file exists
171 # and is empty".
172 # and is empty".
172 spec = repo.svfs.tryread(FILENAME)
173 spec = None
174 if txnutil.mayhavepending(repo.root):
175 pending_path = b"%s.pending" % FILENAME
176 if repo.svfs.exists(pending_path):
177 spec = repo.svfs.tryread(FILENAME)
178 if spec is None:
179 spec = repo.svfs.tryread(FILENAME)
173 return parseconfig(repo.ui, spec)
180 return parseconfig(repo.ui, spec)
174
181
175
182
General Comments 0
You need to be logged in to leave comments. Login now