mercurial/localrepo.py
changeset 3733 9e67fecbfd16
parent 3721 98f2507c5551
child 3761 9433bdcaa9ae
--- a/mercurial/localrepo.py	Thu Nov 30 17:36:33 2006 -0600
+++ b/mercurial/localrepo.py	Thu Nov 30 17:36:33 2006 -0600
@@ -553,9 +553,11 @@
                 fp2 = nullid
             elif fp2 != nullid: # copied on remote side
                 meta["copyrev"] = hex(manifest1.get(cp, nullid))
-            else: # copied on local side, reversed
+            elif fp1 != nullid: # copied on local side, reversed
                 meta["copyrev"] = hex(manifest2.get(cp))
                 fp2 = nullid
+            else: # directory rename
+                meta["copyrev"] = hex(manifest1.get(cp, nullid))
             self.ui.debug(_(" %s: copy %s:%s\n") %
                           (fn, cp, meta["copyrev"]))
             fp1 = nullid