Details
Details
- Reviewers
pulkit - Group Reviewers
hg-reviewers - Commits
- rHG1ec6fd26f841: bundle2: use pycompat.strkwargs as needed
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
| pulkit |
| hg-reviewers |
| Lint Skipped |
| Unit Tests Skipped |
| Path | Packages | |||
|---|---|---|---|---|
| M | mercurial/bundle2.py (5 lines) |
| hookargs['pushkeycompat'] = '1' | hookargs['pushkeycompat'] = '1' | ||||
| hookargs['namespace'] = 'bookmarks' | hookargs['namespace'] = 'bookmarks' | ||||
| hookargs['key'] = book | hookargs['key'] = book | ||||
| hookargs['old'] = nodemod.hex(bookstore.get(book, '')) | hookargs['old'] = nodemod.hex(bookstore.get(book, '')) | ||||
| hookargs['new'] = nodemod.hex(node if node is not None else '') | hookargs['new'] = nodemod.hex(node if node is not None else '') | ||||
| allhooks.append(hookargs) | allhooks.append(hookargs) | ||||
| for hookargs in allhooks: | for hookargs in allhooks: | ||||
| op.repo.hook('prepushkey', throw=True, **hookargs) | op.repo.hook('prepushkey', throw=True, | ||||
| **pycompat.strkwargs(hookargs)) | |||||
| bookstore.applychanges(op.repo, op.gettransaction(), changes) | bookstore.applychanges(op.repo, op.gettransaction(), changes) | ||||
| if pushkeycompat: | if pushkeycompat: | ||||
| def runhook(): | def runhook(): | ||||
| for hookargs in allhooks: | for hookargs in allhooks: | ||||
| op.repo.hook('pushkey', **hookargs) | op.repo.hook('pushkey', **pycompat.strkwargs(hookargs)) | ||||
| op.repo._afterlock(runhook) | op.repo._afterlock(runhook) | ||||
| elif bookmarksmode == 'records': | elif bookmarksmode == 'records': | ||||
| for book, node in changes: | for book, node in changes: | ||||
| record = {'bookmark': book, 'node': node} | record = {'bookmark': book, 'node': node} | ||||
| op.records.add('bookmarks', record) | op.records.add('bookmarks', record) | ||||
| else: | else: | ||||
| raise error.ProgrammingError('unkown bookmark mode: %s' % bookmarksmode) | raise error.ProgrammingError('unkown bookmark mode: %s' % bookmarksmode) | ||||