- skip-blame just b prefixes
Details
Details
- Reviewers
pulkit - Group Reviewers
hg-reviewers - Commits
- rHG164ed6d54fdf: tests: add b prefixes to test-rebase-dest.t
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 | tests/test-rebase-dest.t (12 lines) |
$ cd $TESTTMP | $ cd $TESTTMP | ||||
$ cat >> $TESTTMP/maprevset.py <<EOF | $ cat >> $TESTTMP/maprevset.py <<EOF | ||||
> from __future__ import absolute_import | > from __future__ import absolute_import | ||||
> from mercurial import registrar, revset, revsetlang, smartset | > from mercurial import registrar, revset, revsetlang, smartset | ||||
> revsetpredicate = registrar.revsetpredicate() | > revsetpredicate = registrar.revsetpredicate() | ||||
> cache = {} | > cache = {} | ||||
> @revsetpredicate('map') | > @revsetpredicate(b'map') | ||||
> def map(repo, subset, x): | > def map(repo, subset, x): | ||||
> """(set, mapping)""" | > """(set, mapping)""" | ||||
> setarg, maparg = revsetlang.getargs(x, 2, 2, '') | > setarg, maparg = revsetlang.getargs(x, 2, 2, b'') | ||||
> rset = revset.getset(repo, smartset.fullreposet(repo), setarg) | > rset = revset.getset(repo, smartset.fullreposet(repo), setarg) | ||||
> mapstr = revsetlang.getstring(maparg, '') | > mapstr = revsetlang.getstring(maparg, b'') | ||||
> map = dict(a.split(':') for a in mapstr.split(',')) | > map = dict(a.split(b':') for a in mapstr.split(b',')) | ||||
> rev = rset.first() | > rev = rset.first() | ||||
> desc = repo[rev].description() | > desc = repo[rev].description() | ||||
> newdesc = map.get(desc) | > newdesc = map.get(desc) | ||||
> if newdesc == 'null': | > if newdesc == b'null': | ||||
> revs = [-1] | > revs = [-1] | ||||
> else: | > else: | ||||
> query = revsetlang.formatspec('desc(%s)', newdesc) | > query = revsetlang.formatspec(b'desc(%s)', newdesc) | ||||
> revs = repo.revs(query) | > revs = repo.revs(query) | ||||
> return smartset.baseset(revs) | > return smartset.baseset(revs) | ||||
> EOF | > EOF | ||||
$ cat >> $HGRCPATH <<EOF | $ cat >> $HGRCPATH <<EOF | ||||
> [ui] | > [ui] | ||||
> allowemptycommit=1 | > allowemptycommit=1 | ||||
> [extensions] | > [extensions] |