Mercurial > hg
comparison tests/test-rebase-dest.t @ 36272:164ed6d54fdf
tests: add b prefixes to test-rebase-dest.t
# skip-blame just b prefixes
Differential Revision: https://phab.mercurial-scm.org/D2302
author | Augie Fackler <augie@google.com> |
---|---|
date | Sat, 17 Feb 2018 21:47:49 -0500 |
parents | 1a09dad8b85a |
children | 5abc47d4ca6b |
comparison
equal
deleted
inserted
replaced
36271:53be14874ee8 | 36272:164ed6d54fdf |
---|---|
83 $ cat >> $TESTTMP/maprevset.py <<EOF | 83 $ cat >> $TESTTMP/maprevset.py <<EOF |
84 > from __future__ import absolute_import | 84 > from __future__ import absolute_import |
85 > from mercurial import registrar, revset, revsetlang, smartset | 85 > from mercurial import registrar, revset, revsetlang, smartset |
86 > revsetpredicate = registrar.revsetpredicate() | 86 > revsetpredicate = registrar.revsetpredicate() |
87 > cache = {} | 87 > cache = {} |
88 > @revsetpredicate('map') | 88 > @revsetpredicate(b'map') |
89 > def map(repo, subset, x): | 89 > def map(repo, subset, x): |
90 > """(set, mapping)""" | 90 > """(set, mapping)""" |
91 > setarg, maparg = revsetlang.getargs(x, 2, 2, '') | 91 > setarg, maparg = revsetlang.getargs(x, 2, 2, b'') |
92 > rset = revset.getset(repo, smartset.fullreposet(repo), setarg) | 92 > rset = revset.getset(repo, smartset.fullreposet(repo), setarg) |
93 > mapstr = revsetlang.getstring(maparg, '') | 93 > mapstr = revsetlang.getstring(maparg, b'') |
94 > map = dict(a.split(':') for a in mapstr.split(',')) | 94 > map = dict(a.split(b':') for a in mapstr.split(b',')) |
95 > rev = rset.first() | 95 > rev = rset.first() |
96 > desc = repo[rev].description() | 96 > desc = repo[rev].description() |
97 > newdesc = map.get(desc) | 97 > newdesc = map.get(desc) |
98 > if newdesc == 'null': | 98 > if newdesc == b'null': |
99 > revs = [-1] | 99 > revs = [-1] |
100 > else: | 100 > else: |
101 > query = revsetlang.formatspec('desc(%s)', newdesc) | 101 > query = revsetlang.formatspec(b'desc(%s)', newdesc) |
102 > revs = repo.revs(query) | 102 > revs = repo.revs(query) |
103 > return smartset.baseset(revs) | 103 > return smartset.baseset(revs) |
104 > EOF | 104 > EOF |
105 | 105 |
106 $ cat >> $HGRCPATH <<EOF | 106 $ cat >> $HGRCPATH <<EOF |