Mercurial > hg-stable
diff mercurial/merge.py @ 4115:c95060a5391a
merge: fix renaming of subdirectories under renamed directories
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 27 Feb 2007 16:20:06 -0600 |
parents | c0a12e6441a5 |
children | bb70d5fa02ae 7e1c8a565a4f |
line wrap: on
line diff
--- a/mercurial/merge.py Sat Feb 17 09:54:44 2007 +0100 +++ b/mercurial/merge.py Tue Feb 27 16:20:06 2007 -0600 @@ -184,7 +184,7 @@ invalid[dsrc] = True del dirmove[dsrc] else: - dirmove[dsrc] = ddst + dirmove[dsrc + "/"] = ddst + "/" del d1, d2, invalid @@ -194,9 +194,10 @@ # check unaccounted nonoverlapping files for f in u1 + u2: if f not in fullcopy: - d = os.path.dirname(f) - if d in dirmove: - copy[f] = dirmove[d] + "/" + os.path.basename(f) + for d in dirmove: + if f.startswith(d): + copy[f] = dirmove[d] + f[len(d):] + break return copy