manifest: process deletes before adds in workingctx.buildmanifest

Summary:
The Rust manifest does not allow for directories to be added if files with
the same name exist.

Reviewed By: quark-zju

Differential Revision: D17143550

fbshipit-source-id: fe2533b6f0c049d7b22f2fbb49f3e04959aea39c
This commit is contained in:
Stefan Filip 2019-09-03 15:06:43 -07:00 committed by Facebook Github Bot
parent edfeb9f529
commit 429292dfe3

View File

@ -1993,6 +1993,9 @@ class workingctx(committablectx):
man = parents[0].manifest().copy()
ff = self._flagfunc
for f in status.deleted + status.removed:
if f in man:
del man[f]
for i, l in ((addednodeid, status.added), (modifiednodeid, status.modified)):
for f in l:
man[f] = i
@ -2001,10 +2004,6 @@ class workingctx(committablectx):
except OSError:
pass
for f in status.deleted + status.removed:
if f in man:
del man[f]
return man
def _buildstatus(self, other, s, match, listignored, listclean, listunknown):