[Fwd: bzrtools: "import" fails on simple archive]
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bzrtools (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
affects bzrtools
Hi,
recently John Meinel mentioned the "import" command. This was exactly
what I was looking for. But it doesn't work that easy, I'm afraid.
$mkdir upstream-1.0.1
$touch upstream-
$tar czf upstream-
$mkdir my-branch
$cd my-branch
$bzr init
$bzr import ../upstream-
bzr: ERROR: bzrlib.
u'/home/
Traceback (most recent call last):
File "/usr/local/
650, in run_bzr_
return run_bzr(argv)
File "/usr/local/
612, in run_bzr
ret = run(*run_argv)
File "/usr/local/
304, in run_argv_aliases
return self.run(
File
"/usr/local/
line 545, in run
do_
File
"/usr/local/
line 272, in do_import
import_
File
"/usr/local/
line 165, in import_tar
import_
File
"/usr/local/
line 201, in import_archive
trans_id = tt.trans_
File
"/usr/local/
line 240, in trans_id_tree_path
path = self.canonical_
File
"/usr/local/
line 234, in canonical_path
relpath = self._tree.
File "/usr/local/
line 449, in relpath
return osutils.
File "/usr/local/
822, in relpath
raise errors.
PathNotChild: Path '/' is not a child of path u'/home/
bzr 0.15.0dev0 on python 2.5.0.final.0 (linux2)
arguments: ['/usr/
** please send this report to <email address hidden>
/usr/local/
UserWarning: file group
LockableFiles(
url=file:
unlocked
warn("file group %r was not explicitly unlocked" % self)
/usr/local/
UserWarning: file group
LockableFiles(
url=file:
unlocked
warn("file group %r was not explicitly unlocked" % self)
/usr/local/
UserWarning: file group
LockableFiles(
url=file:
unlocked
warn("file group %r was not explicitly unlocked" % self)
I think this is because TarFile.
(two slashes). A quick fix that works for me is:
--- upstream_import.py 2007-01-08 17:08:42 +0000
+++ upstream_import.py 2007-01-29 12:03:54 +0000
@@ -193,7 +193,7 @@
if prefix is not None:
- relative_path = relative_
+ relative_path = relative_
if relative_path == '':
bye, matthias
--
GPG key available at: <http://
Hi,
recently John Meinel mentioned the "import" command. This was exactly
what I was looking for. But it doesn't work that easy, I'm afraid.
$mkdir upstream-1.0.1
$touch upstream-
$tar czf upstream-
$mkdir my-branch
$cd my-branch
$bzr init
$bzr import ../upstream-
bzr: ERROR: bzrlib.
u'/home/
Traceback (most recent call last):
File "/usr/local/
650, in run_bzr_
return run_bzr(argv)
File "/usr/local/
612, in run_bzr
ret = run(*run_argv)
File "/usr/local/
304, in run_argv_aliases
return self.run(
File
"/usr/local/
line 545, in run
do_
File
"/usr/local/
line 272, in do_import
import_
File
"/usr/local/
line 165, in import_tar
import_
File
"/usr/local/
line 201, in import_archive
trans_id = tt.trans_
File
"/usr/local/
line 240, in trans_id_tree_path
path = self.canonical_
File
"/usr/local/
line 234, in canonical_path
relpath = self._tree.
File "/usr/local/
line 449, in relpath
return osutils.
File "/usr/local/
822, in relpath
raise errors.
PathNotChild: Path '/' is not a child of path u'/home/
bzr 0.15.0dev0 on python 2.5.0.final.0 (linux2)
arguments: ['/usr/
** please send this report to <email address hidden>
/usr/local/
UserWarning: file group
LockableFiles(
url=file:
warn("file group %r was not explicitly unlocked" % self)
/usr/local/
UserWarning: file group
LockableFiles(
url=file:
warn("file group %r was not explicitly unlocked" % self)
/usr/local/
UserWarning: file group
LockableFiles(
url=file:
unlocked
warn("file group %r was not explicitly unlocked" % self)
I think this is because TarFile.
(two slashes). A quick fix that works for me is:
--- upstream_import.py 2007-01-08 17:08:42 +0000
+++ upstream_import.py 2007-01-29 12:03:54 +0000
@@ -193,7 +193,7 @@
if prefix is not None:
- relative_path = relative_
+ relative_path = relative_
if relative_path == '':
bye, matthias
I'm closing this report because this has been fixed a while ago.
March 9 2007
* Handle broken python tar implementations in upstream_import
* RELEASE: bzrtools 0.15.2
Thanks for your report.