[PATCH v2] convert: bzr use absolute_import
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Fri Mar 11 07:13:44 EST 2016
On 03/11/2016 04:48 AM, timeless wrote:
> # HG changeset patch
> # User timeless <timeless at mozdev.org>
> # Date 1456936372 0
> # Wed Mar 02 16:32:52 2016 +0000
> # Node ID d120ac6af6634abe404e5562562d2cc8231bb821
> # Parent 1c658391b22fb4d98ccfb60c0e57315b55634117
> convert: bzr use absolute_import
This had trouble applying on the clowncopter, please consider building
your patch from there.
There multiple test-check and test-*bzr failure with this patch.
--- /home/marmoute/mercurial-testing/tests/test-check-pyflakes.t
+++ /home/marmoute/mercurial-testing/tests/test-check-pyflakes.t.err
@@ -7,6 +7,17 @@
$ hg locate 'set:**.py or grep("^!#.*python")' 2>/dev/null \
> | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
+ hgext/convert/bzr.py:32: 'bzrlib' imported but unused
+ hgext/convert/bzr.py:67: 'bzrlib' imported but unused
+ hgext/convert/bzr.py:57: undefined name 'bzrdir'
+ hgext/convert/bzr.py:58: undefined name 'errors'
+ hgext/convert/bzr.py:68: undefined name 'bzrdir'
+ hgext/convert/bzr.py:72: undefined name 'errors'
+ hgext/convert/bzr.py:72: undefined name 'errors'
+ hgext/convert/bzr.py:110: undefined name 'RevisionSpec'
+ hgext/convert/bzr.py:112: undefined name 'errors'
+ hgext/convert/bzr.py:160: undefined name 'revision'
+ hgext/convert/bzr.py:192: undefined name 'revision'
tests/filterpyflakes.py:61: undefined name 'undefinedname'
ERROR: test-check-pyflakes.t output changed
--- /home/marmoute/mercurial-testing/tests/test-convert-bzr.t
+++ /home/marmoute/mercurial-testing/tests/test-convert-bzr.t.err
@@ -12,9 +12,17 @@
$ hg convert source source-hg
initializing destination source-hg repository
- scanning source...
- sorting...
- converting...
+ source does not look like a CVS checkout
+ source does not look like a Git repository
+ source does not look like a Subversion repository
+ source is not a local Mercurial repository
+ source does not look like a darcs repository
+ source does not look like a monotone repository
+ source does not look like a GNU Arch repository
+ Bazaar modules could not be loaded
+ cannot find required "p4" tool
+ abort: source: missing or unsupported repository
+ [255]
back to the rename stuff
@@ -36,36 +44,46 @@
$ bzr commit -q -m 'rename a into b, create a, rename c into d'
$ cd ..
$ hg convert source source-hg
- scanning source...
- sorting...
- converting...
- 1 Initial add: a, c, e
- 0 rename a into b, create a, rename c into d
+ initializing destination source-hg repository
+ source does not look like a CVS checkout
+ source does not look like a Git repository
+ source does not look like a Subversion repository
+ source is not a local Mercurial repository
+ source does not look like a darcs repository
+ source does not look like a monotone repository
+ source does not look like a GNU Arch repository
+ Bazaar modules could not be loaded
+ cannot find required "p4" tool
+ abort: source: missing or unsupported repository
+ [255]
$ glog -R source-hg
- o 1 at source "rename a into b, create a, rename c into d" files: a b c
d e f
- |
- o 0 at source "Initial add: a, c, e" files: a c e
-
+ abort: repository source-hg not found!
+ [255]
manifest
$ hg manifest -R source-hg -r tip
- a
- b
- d
- f
+ abort: repository source-hg not found!
+ [255]
test --rev option
$ hg convert -r 1 source source-1-hg
initializing destination source-1-hg repository
- scanning source...
- sorting...
- converting...
- 0 Initial add: a, c, e
+ source does not look like a CVS checkout
+ source does not look like a Git repository
+ source does not look like a Subversion repository
+ source is not a local Mercurial repository
+ source does not look like a darcs repository
+ source does not look like a monotone repository
+ source does not look like a GNU Arch repository
+ Bazaar modules could not be loaded
+ cannot find required "p4" tool
+ abort: source: missing or unsupported repository
+ [255]
$ glog -R source-1-hg
- o 0 at source "Initial add: a, c, e" files: a c e
-
+ abort: repository source-1-hg not found!
+ [255]
test with filemap
@@ -74,23 +92,27 @@
> EOF
$ hg convert --filemap filemap source source-filemap-hg
initializing destination source-filemap-hg repository
- scanning source...
- sorting...
- converting...
- 1 Initial add: a, c, e
- 0 rename a into b, create a, rename c into d
+ source does not look like a CVS checkout
+ source does not look like a Git repository
+ source does not look like a Subversion repository
+ source is not a local Mercurial repository
+ source does not look like a darcs repository
+ source does not look like a monotone repository
+ source does not look like a GNU Arch repository
+ Bazaar modules could not be loaded
+ cannot find required "p4" tool
+ abort: source: missing or unsupported repository
+ [255]
$ hg -R source-filemap-hg manifest -r tip
- b
- d
- f
+ abort: repository source-filemap-hg not found!
+ [255]
convert from lightweight checkout
$ bzr checkout --lightweight source source-light
$ hg convert -s bzr source-light source-light-hg
initializing destination source-light-hg repository
- warning: lightweight checkouts may cause conversion failures, try
with a regular branch instead.
- $TESTTMP/test-createandrename/source-light does not look like a
Bazaar repository
+ Bazaar modules could not be loaded
abort: source-light: missing or unsupported repository
[255]
@@ -104,7 +126,16 @@
> > ../bzr-timestamps
$ cd ..
$ hg -R source-hg log --template "{date|isodate}\n" > hg-timestamps
+ abort: repository source-hg not found!
+ [255]
$ cmp bzr-timestamps hg-timestamps || diff -u bzr-timestamps
hg-timestamps
+ cmp: EOF on hg-timestamps
+ --- bzr-timestamps 2016-03-11 12:11:53.470613127 +0000
+ +++ hg-timestamps 2016-03-11 12:11:53.470613127 +0000
+ @@ -1,2 +0,0 @@
+ -2016-03-11 12:11 +0000
+ -2016-03-11 12:11 +0000
+ [1]
$ cd ..
merge
@@ -139,22 +170,20 @@
$ cd ..
$ hg convert --datesort source source-hg
initializing destination source-hg repository
- scanning source...
- sorting...
- converting...
- 3 Initial add
- 2 Editing a
- 1 Editing b
- 0 Merged improve branch
+ source does not look like a CVS checkout
+ source does not look like a Git repository
+ source does not look like a Subversion repository
+ source is not a local Mercurial repository
+ source does not look like a darcs repository
+ source does not look like a monotone repository
+ source does not look like a GNU Arch repository
+ Bazaar modules could not be loaded
+ cannot find required "p4" tool
+ abort: source: missing or unsupported repository
+ [255]
$ glog -R source-hg
- o 3 at source "Merged improve branch" files:
- |\
- | o 2 at source-improve "Editing b" files: b
- | |
- o | 1 at source "Editing a" files: a
- |/
- o 0 at source "Initial add" files: a b
-
+ abort: repository source-hg not found!
+ [255]
$ cd ..
#if symlink execbit
@@ -183,106 +212,28 @@
$ cd ..
$ hg convert source source-hg
initializing destination source-hg repository
- scanning source...
- sorting...
- converting...
- 1 Initial setup
- 0 Symlink changed, x bits changed
+ source does not look like a CVS checkout
+ source does not look like a Git repository
+ source does not look like a Subversion repository
+ source is not a local Mercurial repository
+ source does not look like a darcs repository
+ source does not look like a monotone repository
+ source does not look like a GNU Arch repository
+ Bazaar modules could not be loaded
+ cannot find required "p4" tool
+ abort: source: missing or unsupported repository
+ [255]
$ manifest source-hg 0
% manifest of 0
- 644 @ altname
- 644 d/a
- 755 * program
- 644 @ syma
+ abort: repository source-hg not found!
+ [255]
$ manifest source-hg tip
% manifest of tip
- 644 @ altname
- 644 d/a
- 755 * newprog
- 644 program
- 644 @ syma
+ abort: repository source-hg not found!
+ [255]
test the symlinks can be recreated
$ cd source-hg
+ $TESTTMP.sh: line 177: cd: source-hg: No such file or directory
$ hg up
- 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ hg cat syma; echo
- a
- $ cd ../..
-
-#endif
-
-Multiple branches
-
- $ bzr init-repo -q --no-trees repo
- $ bzr init -q repo/trunk
- $ bzr co repo/trunk repo-trunk
- $ cd repo-trunk
- $ echo a > a
- $ bzr add -q a
- $ bzr ci -qm adda
- $ bzr tag trunk-tag
- Created tag trunk-tag.
- $ bzr switch -b branch
- Tree is up to date at revision 1.
- Switched to branch: *repo/branch/ (glob)
- $ sleep 1
- $ echo b > b
- $ bzr add -q b
- $ bzr ci -qm addb
- $ bzr tag branch-tag
- Created tag branch-tag.
- $ bzr switch --force ../repo/trunk
- Updated to revision 1.
- Switched to branch: */repo/trunk/ (glob)
- $ sleep 1
- $ echo a >> a
- $ bzr ci -qm changea
- $ cd ..
- $ hg convert --datesort repo repo-bzr
- initializing destination repo-bzr repository
- scanning source...
- sorting...
- converting...
- 2 adda
- 1 addb
- 0 changea
- updating tags
- $ (cd repo-bzr; glog)
- o 3 at default "update tags" files: .hgtags
- |
- o 2 at default "changea" files: a
- |
- | o 1 at branch "addb" files: b
- |/
- o 0 at default "adda" files: a
-
-
-Test tags (converted identifiers are not stable because bzr ones are
-not and get incorporated in extra fields).
-
- $ hg -R repo-bzr tags
- tip 3:* (glob)
- branch-tag 1:* (glob)
- trunk-tag 0:* (glob)
-
-Nested repositories (issue3254)
-
- $ bzr init-repo -q --no-trees repo/inner
- $ bzr init -q repo/inner/trunk
- $ bzr co repo/inner/trunk inner-trunk
- $ cd inner-trunk
- $ echo b > b
- $ bzr add -q b
- $ bzr ci -qm addb
- $ cd ..
- $ hg convert --datesort repo noinner-bzr
- initializing destination noinner-bzr repository
- scanning source...
- sorting...
- converting...
- 2 adda
- 1 addb
- 0 changea
- updating tags
ERROR: test-convert-bzr.t output changed
!..........s..............s....................s.....s.............................................s.........................................s.............................................................s......................s.....
--- /home/marmoute/mercurial-testing/tests/test-convert-bzr-ghosts.t
+++ /home/marmoute/mercurial-testing/tests/test-convert-bzr-ghosts.t.err
@@ -25,15 +25,19 @@
$ cd ..
$ hg convert source source-hg
initializing destination source-hg repository
- scanning source...
- sorting...
- converting...
- 1 Initial layout setup
- 0 Commit with ghost revision
+ source does not look like a CVS checkout
+ source does not look like a Git repository
+ source does not look like a Subversion repository
+ source is not a local Mercurial repository
+ source does not look like a darcs repository
+ source does not look like a monotone repository
+ source does not look like a GNU Arch repository
+ Bazaar modules could not be loaded
+ cannot find required "p4" tool
+ abort: source: missing or unsupported repository
+ [255]
$ glog -R source-hg
- o 1 at source "Commit with ghost revision" files: somefile
- |
- o 0 at source "Initial layout setup" files: somefile
-
+ abort: repository source-hg not found!
+ [255]
$ cd ..
ERROR: test-convert-bzr-ghosts.t output changed
!....................s.........................
--- /home/marmoute/mercurial-testing/tests/test-convert-bzr-treeroot.t
+++ /home/marmoute/mercurial-testing/tests/test-convert-bzr-treeroot.t.err
@@ -24,13 +24,20 @@
$ cd ..
$ hg convert source source-hg
initializing destination source-hg repository
- scanning source...
- sorting...
- converting...
- 1 Initial add
- 0 Changed root
+ source does not look like a CVS checkout
+ source does not look like a Git repository
+ source does not look like a Subversion repository
+ source is not a local Mercurial repository
+ source does not look like a darcs repository
+ source does not look like a monotone repository
+ source does not look like a GNU Arch repository
+ Bazaar modules could not be loaded
+ cannot find required "p4" tool
+ abort: source: missing or unsupported repository
+ [255]
$ manifest source-hg tip
% manifest of tip
- 644 file
+ abort: repository source-hg not found!
+ [255]
$ cd ..
ERROR: test-convert-bzr-treeroot.t output changed
!..............................................................
--- /home/marmoute/mercurial-testing/tests/test-convert-bzr-114.t
+++ /home/marmoute/mercurial-testing/tests/test-convert-bzr-114.t.err
@@ -24,16 +24,21 @@
$ cd ..
$ hg convert source source-hg
initializing destination source-hg repository
- scanning source...
- sorting...
- converting...
- 2 add d file
- 1 replace with d dir
- 0 add d/a
+ source does not look like a CVS checkout
+ source does not look like a Git repository
+ source does not look like a Subversion repository
+ source is not a local Mercurial repository
+ source does not look like a darcs repository
+ source does not look like a monotone repository
+ source does not look like a GNU Arch repository
+ Bazaar modules could not be loaded
+ cannot find required "p4" tool
+ abort: source: missing or unsupported repository
+ [255]
$ manifest source-hg tip
% manifest of tip
- 644 d/a
+ abort: repository source-hg not found!
+ [255]
$ cd source-hg
+ $TESTTMP.sh: line 38: cd: source-hg: No such file or directory
$ hg update
- 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
- $ cd ../..
ERROR: test-convert-bzr-114.t output changed
!.............
--- /home/marmoute/mercurial-testing/tests/test-convert-bzr-merges.t
+++ /home/marmoute/mercurial-testing/tests/test-convert-bzr-merges.t.err
@@ -41,32 +41,23 @@
$ cd ..
$ hg convert --datesort source source-hg
initializing destination source-hg repository
- scanning source...
- sorting...
- converting...
- 4 Initial add
- 3 Added branch1 file
- 2 Added parent file
- 1 Added brach2 file
- 0 Merged branches
+ source does not look like a CVS checkout
+ source does not look like a Git repository
+ source does not look like a Subversion repository
+ source is not a local Mercurial repository
+ source does not look like a darcs repository
+ source does not look like a monotone repository
+ source does not look like a GNU Arch repository
+ Bazaar modules could not be loaded
+ cannot find required "p4" tool
+ abort: source: missing or unsupported repository
+ [255]
$ glog -R source-hg
- o 5 at source "(octopus merge fixup)" files:
- |\
- | o 4 at source "Merged branches" files: file-branch2
- | |\
- o---+ 3 at source-branch2 "Added brach2 file" files: file-branch2
- / /
- | o 2 at source "Added parent file" files: file-parent
- | |
- o | 1 at source-branch1 "Added branch1 file" files: file file-branch1
- |/
- o 0 at source "Initial add" files: file
-
+ abort: repository source-hg not found!
+ [255]
$ manifest source-hg tip
% manifest of tip
- 644 file
- 644 file-branch1
- 644 file-branch2
- 644 file-parent
+ abort: repository source-hg not found!
+ [255]
$ cd ..
ERROR: test-convert-bzr-merges.t output changed
!...
--- /home/marmoute/mercurial-testing/tests/test-convert-bzr-directories.t
+++
/home/marmoute/mercurial-testing/tests/test-convert-bzr-directories.t.err
@@ -20,19 +20,25 @@
$ cd ..
$ hg convert source source-hg
initializing destination source-hg repository
- scanning source...
- sorting...
- converting...
- 2 Initial add
- 1 Empty directory added
- 0 Added file into directory
+ source does not look like a CVS checkout
+ source does not look like a Git repository
+ source does not look like a Subversion repository
+ source is not a local Mercurial repository
+ source does not look like a darcs repository
+ source does not look like a monotone repository
+ source does not look like a GNU Arch repository
+ Bazaar modules could not be loaded
+ cannot find required "p4" tool
+ abort: source: missing or unsupported repository
+ [255]
$ manifest source-hg 1
% manifest of 1
- 644 a
- $ manifest source-hg tip
- % manifest of tip
- 644 a
- 644 empty/something
+ abort: repository source-hg not found!
+ [255]
+ $ manifest source-hg tip
+ % manifest of tip
+ abort: repository source-hg not found!
+ [255]
$ cd ..
directory renames
@@ -51,17 +57,25 @@
$ cd ..
$ hg convert source source-hg
initializing destination source-hg repository
- scanning source...
- sorting...
- converting...
- 1 Added directory
- 0 Oops, typo
+ source does not look like a CVS checkout
+ source does not look like a Git repository
+ source does not look like a Subversion repository
+ source is not a local Mercurial repository
+ source does not look like a darcs repository
+ source does not look like a monotone repository
+ source does not look like a GNU Arch repository
+ Bazaar modules could not be loaded
+ cannot find required "p4" tool
+ abort: source: missing or unsupported repository
+ [255]
$ manifest source-hg 0
% manifest of 0
- 644 tpyo/something
- $ manifest source-hg tip
- % manifest of tip
- 644 typo/something
+ abort: repository source-hg not found!
+ [255]
+ $ manifest source-hg tip
+ % manifest of tip
+ abort: repository source-hg not found!
+ [255]
$ cd ..
nested directory renames
@@ -81,15 +95,21 @@
$ cd ..
$ hg convert source source-hg
initializing destination source-hg repository
- scanning source...
- sorting...
- converting...
- 1 Added nested directories
- 0 Moved secondlevel one level up
- $ manifest source-hg tip
- % manifest of tip
- 644 secondlevel/file
- 644 secondlevel/thirdlevel/stuff
+ source does not look like a CVS checkout
+ source does not look like a Git repository
+ source does not look like a Subversion repository
+ source is not a local Mercurial repository
+ source does not look like a darcs repository
+ source does not look like a monotone repository
+ source does not look like a GNU Arch repository
+ Bazaar modules could not be loaded
+ cannot find required "p4" tool
+ abort: source: missing or unsupported repository
+ [255]
+ $ manifest source-hg tip
+ % manifest of tip
+ abort: repository source-hg not found!
+ [255]
$ cd ..
directory remove
@@ -107,16 +127,25 @@
$ cd ..
$ hg convert source source-hg
initializing destination source-hg repository
- scanning source...
- sorting...
- converting...
- 1 Added directory
- 0 Removed directory
+ source does not look like a CVS checkout
+ source does not look like a Git repository
+ source does not look like a Subversion repository
+ source is not a local Mercurial repository
+ source does not look like a darcs repository
+ source does not look like a monotone repository
+ source does not look like a GNU Arch repository
+ Bazaar modules could not be loaded
+ cannot find required "p4" tool
+ abort: source: missing or unsupported repository
+ [255]
$ manifest source-hg 0
% manifest of 0
- 644 src/sourcecode
- $ manifest source-hg tip
- % manifest of tip
+ abort: repository source-hg not found!
+ [255]
+ $ manifest source-hg tip
+ % manifest of tip
+ abort: repository source-hg not found!
+ [255]
$ cd ..
directory replace
@@ -139,16 +168,21 @@
$ cd ..
$ hg convert source source-hg
initializing destination source-hg repository
- scanning source...
- sorting...
- converting...
- 1 Initial layout
- 0 Some conflicting moves
- $ manifest source-hg tip
- % manifest of tip
- 644 second/file
- 644 second/something
- 644 third/dummy
+ source does not look like a CVS checkout
+ source does not look like a Git repository
+ source does not look like a Subversion repository
+ source is not a local Mercurial repository
+ source does not look like a darcs repository
+ source does not look like a monotone repository
+ source does not look like a GNU Arch repository
+ Bazaar modules could not be loaded
+ cannot find required "p4" tool
+ abort: source: missing or unsupported repository
+ [255]
+ $ manifest source-hg tip
+ % manifest of tip
+ abort: repository source-hg not found!
+ [255]
$ cd ..
divergent nested renames (issue3089)
@@ -179,16 +213,21 @@
$ cd ..
$ hg convert source source-hg
initializing destination source-hg repository
- scanning source...
- sorting...
- converting...
- 1 Initial layout
- 0 Divergent renames
+ source does not look like a CVS checkout
+ source does not look like a Git repository
+ source does not look like a Subversion repository
+ source is not a local Mercurial repository
+ source does not look like a darcs repository
+ source does not look like a monotone repository
+ source does not look like a GNU Arch repository
+ Bazaar modules could not be loaded
+ cannot find required "p4" tool
+ abort: source: missing or unsupported repository
+ [255]
$ hg -R source-hg st -C --change 1
- A b/fa
- a/fa
- R a/fa
+ abort: repository source-hg not found!
+ [255]
$ hg -R source-hg manifest -r 1
- a/c/fc
- b/fa
- $ cd ..
+ abort: repository source-hg not found!
+ [255]
+ $ cd ..
ERROR: test-convert-bzr-directories.t output changed
--
Pierre-Yves David
More information about the Mercurial-devel
mailing list