# HG changeset patch # User Matt Mackall # Date 2007-11-21 19:26:18 # Node ID a3df02cd4a35d483eb741d833bbdc918159fd885 # Parent 253736bb0dc9bd9e32ede47e9bc0ec233c4e519b push/pull: abort if we try to visit a missing or empty revlog diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -1710,6 +1710,8 @@ class localrepository(repo.repository): # Go through all our files in order sorted by name. for fname in changedfiles: filerevlog = self.file(fname) + if filerevlog.count() == 0: + raise util.abort(_("empty or missing revlog for %s") % fname) # Toss out the filenodes that the recipient isn't really # missing. if msng_filenode_set.has_key(fname): @@ -1794,6 +1796,8 @@ class localrepository(repo.repository): for fname in changedfiles: filerevlog = self.file(fname) + if filerevlog.count() == 0: + raise util.abort(_("empty or missing revlog for %s") % fname) nodeiter = gennodelst(filerevlog) nodeiter = list(nodeiter) if nodeiter: