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:
Jun Wu 2018-07-17 10:44:53 -07:00 committed by Facebook Github Bot
parent 98b6e46422
commit fd3fafca41
2 changed files with 5 additions and 1 deletions

View File

@ -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)

View File

@ -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.