Mercurial > hg-stable
changeset 22336:60786c8a2f70
bundle2: add an obsmarkers part handler
This part contains a binary stream of obsolescence markers. Received markers are
added to the repository.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Mon, 25 Aug 2014 18:08:22 +0200 |
parents | 7c4c19dfd484 |
children | c380fe290290 |
files | mercurial/bundle2.py |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/bundle2.py Mon Aug 25 16:24:40 2014 +0200 +++ b/mercurial/bundle2.py Mon Aug 25 18:08:22 2014 +0200 @@ -899,3 +899,9 @@ ret = int(inpart.params['return']) partid = int(inpart.params['in-reply-to']) op.records.add('pushkey', {'return': ret}, partid) + +@parthandler('b2x:obsmarkers') +def handleobsmarker(op, inpart): + """add a stream of obsmarkers to the repo""" + tr = op.gettransaction() + op.repo.obsstore.mergemarkers(tr, inpart.read())