diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -1054,7 +1054,7 @@ class workingctx(changectx): wlock.release() def dirs(self): - return self._repo.dirstate.dirs() + return set(self._repo.dirstate.dirs()) class workingfilectx(filectx): """A workingfilectx object makes access to data related to a particular diff --git a/mercurial/copies.py b/mercurial/copies.py --- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -321,7 +321,9 @@ def mergecopies(repo, c1, c2, ca): # generate a directory move map d1, d2 = c1.dirs(), c2.dirs() - invalid = set([""]) + d1.add('') + d2.add('') + invalid = set() dirmove = {} # examine each file copy for a potential directory move, which is