# HG changeset patch # User Matt Mackall # Date 1340822464 18000 # Node ID 8b7cd9a998f0f4ec47cf75b59b3d2c08167c3cf7 # Parent 125ff5654b72009b251706d7ee93051853f066b6 copies: re-include root directory in directory rename detection (issue3511) diff -r 125ff5654b72 -r 8b7cd9a998f0 mercurial/context.py --- a/mercurial/context.py Mon Jun 25 15:14:05 2012 -0700 +++ b/mercurial/context.py Wed Jun 27 13:41:04 2012 -0500 @@ -1054,7 +1054,7 @@ 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 -r 125ff5654b72 -r 8b7cd9a998f0 mercurial/copies.py --- a/mercurial/copies.py Mon Jun 25 15:14:05 2012 -0700 +++ b/mercurial/copies.py Wed Jun 27 13:41:04 2012 -0500 @@ -321,7 +321,9 @@ # 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