##// END OF EJS Templates
revlog: subclass the new `repository.iverifyproblem` Protocol class...
revlog: subclass the new `repository.iverifyproblem` Protocol class This is the same transformation as 3a90a6fd710d did for dirstate, but the CamelCase naming was already cleaned up here. We shouldn't have to explicitly subclass, but I'm doing so to test the interplay of regular attributes and the `attrs` class. Also, PyCharm has a nifty feature that puts a jump point in the gutter to navigate back and forth between the base class and subclasses (and override functions and base class functions) when there's an explicit subclassing. Additionally, PyCharm will immediately flag signature mismatches without a 40m pytype run.

File last commit:

r48168:26127236 default
r53365:4ef6dbc2 default
Show More
test-convert-bzr-treeroot.t
37 lines | 829 B | text/troff | Tads3Lexer
/ tests / test-convert-bzr-treeroot.t
Gregory Szorc
tests: move '#require bzr' into .t files...
r26066 #require bzr
Matt Mackall
tests: unify test-convert-bzr-treeroot
r12517
$ . "$TESTDIR/bzr-definitions"
$ cat > treeset.py <<EOF
> import sys
Raphaël Gomès
convert-bazaar: use breezy package instead of old bzr one...
r48168 > from breezy import workingtree
> import breezy.bzr.bzrdir
Matt Mackall
tests: unify test-convert-bzr-treeroot
r12517 > wt = workingtree.WorkingTree.open('.')
>
> message, rootid = sys.argv[1:]
Raphaël Gomès
convert-bazaar: use breezy package instead of old bzr one...
r48168 > wt.set_root_id(b'tree_root-%s' % rootid.encode())
Matt Mackall
tests: unify test-convert-bzr-treeroot
r12517 > wt.commit(message)
> EOF
change the id of the tree root
$ mkdir test-change-treeroot-id
$ cd test-change-treeroot-id
Raphaël Gomès
convert-bazaar: use breezy package instead of old bzr one...
r48168 $ brz init -q source
Matt Mackall
tests: unify test-convert-bzr-treeroot
r12517 $ cd source
$ echo content > file
Raphaël Gomès
convert-bazaar: use breezy package instead of old bzr one...
r48168 $ brz add -q file
$ brz commit -q -m 'Initial add'
Matt Harbison
tests: quote PYTHON usage...
r39743 $ "$PYTHON" ../../treeset.py 'Changed root' new
Matt Mackall
tests: unify test-convert-bzr-treeroot
r12517 $ cd ..
$ hg convert source source-hg
initializing destination source-hg repository
scanning source...
sorting...
converting...
1 Initial add
0 Changed root
$ manifest source-hg tip
% manifest of tip
644 file
Mads Kiilerich
tests: add missing trailing 'cd ..'...
r16913
$ cd ..