mercurial/localrepo.py
changeset 15890 e234eda20984
parent 15889 816209eaf963
child 15891 249d3420ec9c
--- a/mercurial/localrepo.py	Thu Jan 12 01:25:57 2012 +0100
+++ b/mercurial/localrepo.py	Fri Jan 13 01:29:03 2012 +0100
@@ -2015,8 +2015,8 @@
             source.callback = pr
 
             source.changelogheader()
-            if (cl.addgroup(source, csmap, trp) is None
-                and not emptyok):
+            srccontent = cl.addgroup(source, csmap, trp)
+            if not (srccontent or emptyok):
                 raise util.Abort(_("received changelog group is empty"))
             clend = len(cl)
             changesets = clend - clstart
@@ -2064,7 +2064,7 @@
                 pr()
                 fl = self.file(f)
                 o = len(fl)
-                if fl.addgroup(source, revmap, trp) is None:
+                if not fl.addgroup(source, revmap, trp):
                     raise util.Abort(_("received file revlog group is empty"))
                 revisions += len(fl) - o
                 files += 1