Mercurial > evolve
changeset 2273:228111491788 stable
legacy: fix debugrecordpruneparents to call obsstore.create() with keywords
It appears the API was changed twice in Mercurial at
- 570f87422f54 "obsstore: add an explicit `date` argument to obsstore.create"
- adb3798dce49 "obsstore: add a `parents` argument to obsstore.create"
and metadata would be changed to a list of (key, value) pairs. Convert it back
to a dict as expected by create().
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Thu, 20 Apr 2017 00:21:13 +0900 |
parents | eb47d436cdc3 |
children | 72ba9d4418e0 |
files | README hgext3rd/evolve/legacy.py |
diffstat | 2 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/README Wed Apr 19 21:17:43 2017 +0900 +++ b/README Thu Apr 20 00:21:13 2017 +0900 @@ -117,6 +117,7 @@ ------------------- - template: adapt to change in 4.2 + - fix 'debugrecordpruneparents' (outdated API usage) 6.0.0 -- 2017-02-31 -------------------
--- a/hgext3rd/evolve/legacy.py Wed Apr 19 21:17:43 2017 +0900 +++ b/hgext3rd/evolve/legacy.py Thu Apr 20 00:21:13 2017 +0900 @@ -192,8 +192,8 @@ ctx = unfi[rev] parents = tuple(p.node() for p in ctx.parents()) before = len(store._all) - store.create(tr, mark[0], mark[1], mark[2], mark[3], - parents=parents) + store.create(tr, prec=mark[0], succs=mark[1], flag=mark[2], + metadata=dict(mark[3]), parents=parents) if len(store._all) - before: ui.write(_('created new markers for %i\n') % rev) ui.progress(pgop, idx, total=pgtotal)