mirror of
https://github.com/facebook/sapling.git
synced 2025-01-04 03:06:30 +03:00
test-pathconflicts-basic: use treestate
Summary: For treestate+fsmonitor case, `dirstate._map.get(path)[0]` could be `?`. It's a new condition that the pathconflict code path didn't expect. So let's update pathconflict checker to work with treestate+fsmonitor. Reviewed By: DurhamG Differential Revision: D8842393 fbshipit-source-id: 4679e23f37310bea18c34676231baa4854de1611
This commit is contained in:
parent
98b6e46422
commit
fd3fafca41
@ -464,7 +464,7 @@ class dirstate(object):
|
||||
if self._map.hastrackeddir(d):
|
||||
break
|
||||
entry = self._map.get(d)
|
||||
if entry is not None and entry[0] != "r":
|
||||
if entry is not None and entry[0] not in "r?":
|
||||
raise error.Abort(_("file %r in dirstate clashes with %r") % (d, f))
|
||||
self._dirty = True
|
||||
self._updatedfiles.add(f)
|
||||
|
@ -1,3 +1,7 @@
|
||||
Turn on treestate
|
||||
|
||||
$ setconfig format.dirstate=2
|
||||
|
||||
Path conflict checking is currently disabled by default because of issue5716.
|
||||
Turn it on for this test.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user