Show More
@@ -1839,17 +1839,17 b' Importing some extra header' | |||||
1839 | > import mercurial.cmdutil |
|
1839 | > import mercurial.cmdutil | |
1840 | > |
|
1840 | > | |
1841 | > def processfoo(repo, data, extra, opts): |
|
1841 | > def processfoo(repo, data, extra, opts): | |
1842 | > if 'foo' in data: |
|
1842 | > if b'foo' in data: | |
1843 | > extra['foo'] = data['foo'] |
|
1843 | > extra[b'foo'] = data[b'foo'] | |
1844 | > def postimport(ctx): |
|
1844 | > def postimport(ctx): | |
1845 | > if 'foo' in ctx.extra(): |
|
1845 | > if b'foo' in ctx.extra(): | |
1846 | > ctx.repo().ui.write('imported-foo: %s\n' % ctx.extra()['foo']) |
|
1846 | > ctx.repo().ui.write(b'imported-foo: %s\n' % ctx.extra()[b'foo']) | |
1847 | > |
|
1847 | > | |
1848 | > mercurial.patch.patchheadermap.append(('Foo', 'foo')) |
|
1848 | > mercurial.patch.patchheadermap.append((b'Foo', b'foo')) | |
1849 | > mercurial.cmdutil.extrapreimport.append('foo') |
|
1849 | > mercurial.cmdutil.extrapreimport.append(b'foo') | |
1850 | > mercurial.cmdutil.extrapreimportmap['foo'] = processfoo |
|
1850 | > mercurial.cmdutil.extrapreimportmap[b'foo'] = processfoo | |
1851 | > mercurial.cmdutil.extrapostimport.append('foo') |
|
1851 | > mercurial.cmdutil.extrapostimport.append(b'foo') | |
1852 | > mercurial.cmdutil.extrapostimportmap['foo'] = postimport |
|
1852 | > mercurial.cmdutil.extrapostimportmap[b'foo'] = postimport | |
1853 | > EOF |
|
1853 | > EOF | |
1854 | $ cat >> $HGRCPATH <<EOF |
|
1854 | $ cat >> $HGRCPATH <<EOF | |
1855 | > [extensions] |
|
1855 | > [extensions] |
General Comments 0
You need to be logged in to leave comments.
Login now