# HG changeset patch # User Patrick Mezard # Date 1208205093 -7200 # Node ID 93e140dbcd448c3e4646c84931747fe05d41980e # Parent 9b35a9f34675969eb6f9b6fde8e23b7789e9b9e5 localrepo: forbid nullid copyrev diff -r 9b35a9f34675 -r 93e140dbcd44 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