localrepo: forbid nullid copyrev
authorPatrick Mezard <pmezard@gmail.com>
Mon, 14 Apr 2008 22:31:33 +0200
changeset 6535 93e140dbcd44
parent 6534 9b35a9f34675
child 6536 dfdef3d560a8
localrepo: forbid nullid copyrev
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Mon Apr 14 22:31:33 2008 +0200
+++ b/mercurial/localrepo.py	Mon Apr 14 22:31:33 2008 +0200
@@ -709,17 +709,17 @@
             #
             meta["copy"] = cp
             if not manifest2: # not a branch merge
-                meta["copyrev"] = hex(manifest1.get(cp, nullid))
+                meta["copyrev"] = hex(manifest1[cp])
                 fp2 = nullid
             elif fp2 != nullid: # copied on remote side
-                meta["copyrev"] = hex(manifest1.get(cp, nullid))
+                meta["copyrev"] = hex(manifest1[cp])
             elif fp1 != nullid: # copied on local side, reversed
-                meta["copyrev"] = hex(manifest2.get(cp))
+                meta["copyrev"] = hex(manifest2[cp])
                 fp2 = fp1
             elif cp in manifest2: # directory rename on local side
                 meta["copyrev"] = hex(manifest2[cp])
             else: # directory rename on remote side
-                meta["copyrev"] = hex(manifest1.get(cp, nullid))
+                meta["copyrev"] = hex(manifest1[cp])
             self.ui.debug(_(" %s: copy %s:%s\n") %
                           (fn, cp, meta["copyrev"]))
             fp1 = nullid