equal
deleted
inserted
replaced
825 if not (pushop.outbookmarks and hasbookmarkcheck): |
825 if not (pushop.outbookmarks and hasbookmarkcheck): |
826 return |
826 return |
827 data = [] |
827 data = [] |
828 for book, old, new in pushop.outbookmarks: |
828 for book, old, new in pushop.outbookmarks: |
829 data.append((book, old)) |
829 data.append((book, old)) |
830 checkdata = bookmod.binaryencode(data) |
830 checkdata = bookmod.binaryencode(pushop.repo, data) |
831 bundler.newpart(b'check:bookmarks', data=checkdata) |
831 bundler.newpart(b'check:bookmarks', data=checkdata) |
832 |
832 |
833 |
833 |
834 @b2partsgenerator(b'check-phases') |
834 @b2partsgenerator(b'check-phases') |
835 def _pushb2checkphases(pushop, bundler): |
835 def _pushb2checkphases(pushop, bundler): |
1025 data = [] |
1025 data = [] |
1026 for book, old, new in pushop.outbookmarks: |
1026 for book, old, new in pushop.outbookmarks: |
1027 _abortonsecretctx(pushop, new, book) |
1027 _abortonsecretctx(pushop, new, book) |
1028 data.append((book, new)) |
1028 data.append((book, new)) |
1029 allactions.append((book, _bmaction(old, new))) |
1029 allactions.append((book, _bmaction(old, new))) |
1030 checkdata = bookmod.binaryencode(data) |
1030 checkdata = bookmod.binaryencode(pushop.repo, data) |
1031 bundler.newpart(b'bookmarks', data=checkdata) |
1031 bundler.newpart(b'bookmarks', data=checkdata) |
1032 |
1032 |
1033 def handlereply(op): |
1033 def handlereply(op): |
1034 ui = pushop.ui |
1034 ui = pushop.ui |
1035 # if success |
1035 # if success |
2453 if not kwargs.get('bookmarks', False): |
2453 if not kwargs.get('bookmarks', False): |
2454 return |
2454 return |
2455 if not b2caps or b'bookmarks' not in b2caps: |
2455 if not b2caps or b'bookmarks' not in b2caps: |
2456 raise error.Abort(_(b'no common bookmarks exchange method')) |
2456 raise error.Abort(_(b'no common bookmarks exchange method')) |
2457 books = bookmod.listbinbookmarks(repo) |
2457 books = bookmod.listbinbookmarks(repo) |
2458 data = bookmod.binaryencode(books) |
2458 data = bookmod.binaryencode(repo, books) |
2459 if data: |
2459 if data: |
2460 bundler.newpart(b'bookmarks', data=data) |
2460 bundler.newpart(b'bookmarks', data=data) |
2461 |
2461 |
2462 |
2462 |
2463 @getbundle2partsgenerator(b'listkeys') |
2463 @getbundle2partsgenerator(b'listkeys') |