##// END OF EJS Templates
addchangegroup: add option to skip check for empty changelog group
Alexis S. L. Carvalho -
r5907:afb7bdf1 default
parent child Browse files
Show More
@@ -1852,7 +1852,7 b' class localrepository(repo.repository):'
1852
1852
1853 return util.chunkbuffer(gengroup())
1853 return util.chunkbuffer(gengroup())
1854
1854
1855 def addchangegroup(self, source, srctype, url):
1855 def addchangegroup(self, source, srctype, url, emptyok=False):
1856 """add changegroup to repo.
1856 """add changegroup to repo.
1857
1857
1858 return values:
1858 return values:
@@ -1888,7 +1888,7 b' class localrepository(repo.repository):'
1888 self.ui.status(_("adding changesets\n"))
1888 self.ui.status(_("adding changesets\n"))
1889 cor = cl.count() - 1
1889 cor = cl.count() - 1
1890 chunkiter = changegroup.chunkiter(source)
1890 chunkiter = changegroup.chunkiter(source)
1891 if cl.addgroup(chunkiter, csmap, trp, 1) is None:
1891 if cl.addgroup(chunkiter, csmap, trp, 1) is None and not emptyok:
1892 raise util.Abort(_("received changelog group is empty"))
1892 raise util.Abort(_("received changelog group is empty"))
1893 cnr = cl.count() - 1
1893 cnr = cl.count() - 1
1894 changesets = cnr - cor
1894 changesets = cnr - cor
General Comments 0
You need to be logged in to leave comments. Login now