How to clone a bzr repository

Dmitri Pissarenko dmitri.pissarenko at gmail.com
Tue Jan 6 23:16:54 GMT 2009


---------- Forwarded message ----------
From: Dmitri Pissarenko <dmitri.pissarenko at gmail.com>
Date: 2009/1/7
Subject: Re: How to clone a bzr repository
To: Colin D Bennett <colin at gibibit.com>


Hello!

Thanks for your answer!

> I just realized you may mean that you have a *branch* that you want to
> clone.  A repository is generally considered to be a collection of
> multiple branches stored under a single location, and that is what the
> repo-push and bzr-mirror plugins are good for.
>
> If you just want to clone a single branch, then you should be able to
> just do a "bzr branch REMOTE_URL my_dir" you get a location branch of
> REMOTE_URL in the directory my_dir.  The 'pull' command can then be
> used to pull new changes from the "parent" branch, which is REMOTE_URL.
> (But pull is usually best used when you aren't making changes to the
> 'my_dir' branch.  If you make changes, you'll generally need to do
> 'bzr merge' instead.)

I tried to use the command

bzr branch ftp://anonymous@192.168.1.105/marketing-db-j2ee marketing-db-j2ee

and got this result:

> dp at mycompany-1:~/my-project-j2ee-working-copy$ bzr branch ftp://anonymous@192.168.1.105/my-project-j2ee my-project-j2ee
> bzr: ERROR: socket.error: (110, 'Connection timed out')
>
> Traceback (most recent call last):
>   File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 893, in run_bzr_catch_errors
>     return run_bzr(argv)
>   File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 839, in run_bzr
>     ret = run(*run_argv)
>   File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 539, in run_argv_aliases
>     return self.run(**all_cmd_args)
>   File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 953, in run
>     from_location)
>   File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 888, in open_tree_or_branch
>     bzrdir = klass.open(location)
>   File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 766, in open
>     return BzrDir.open_from_transport(t, _unsupported=_unsupported)
>   File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 803, in open_from_transport
>     redirected)
>   File "/usr/lib/python2.5/site-packages/bzrlib/lazy_import.py", line 125, in __call__
>     return obj(*args, **kwargs)
>   File "/usr/lib/python2.5/site-packages/bzrlib/transport/__init__.py", line 1643, in do_catching_redirections
>     return action(transport)
>   File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 780, in find_format
>     transport, _server_formats=_server_formats)
>   File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 1638, in find_format
>     return format.probe_transport(transport)
>   File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 1648, in probe_transport
>     format_string = transport.get(".bzr/branch-format").read()
>   File "/usr/lib/python2.5/site-packages/bzrlib/transport/ftp/__init__.py", line 252, in get
>     f.retrbinary('RETR '+self._remote_path(relpath), ret.write, 8192)
>   File "/usr/lib/python2.5/ftplib.py", line 390, in retrbinary
>     conn = self.transfercmd(cmd, rest)
>   File "/usr/lib/python2.5/ftplib.py", line 356, in transfercmd
>     return self.ntransfercmd(cmd, rest)[0]
>   File "/usr/lib/python2.5/ftplib.py", line 324, in ntransfercmd
>     conn.connect(sa)
>   File "<string>", line 1, in connect
> error: (110, 'Connection timed out')
>
> bzr 1.10 on python 2.5.2 (linux2)
> arguments: ['/usr/bin/bzr', 'branch', 'ftp://anonymous@192.168.1.105/my-project-j2ee', 'my-project-j2ee']
> encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
> plugins:
>   gtk                  /usr/lib/python2.5/site-packages/bzrlib/plugins/gtk [0.95.0.final.1]
>   launchpad            /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
> *** Bazaar has encountered an internal error.
>     Please report a bug at https://bugs.launchpad.net/bzr/+filebug
>     including this traceback, and a description of what you
>     were doing when the error occurred.
> dp at mycompany-1:~/my-project-j2ee-working-copy$



This is the error on my xubuntu 8.10 machine, on which I executed the
aforementioned command.

Here are the messages of the FileZilla FTP server, which runs on my
Windows machine, from which I wanted to copy the branch:

> (000003) 06.01.2009 23:58:14 - (not logged in) (192.168.1.108)> 220-FileZilla Server version 0.9.4d beta
> (000003) 06.01.2009 23:58:14 - (not logged in) (192.168.1.108)> 220-written by Tim Kosse (Tim.Kosse at gmx.de)
> (000003) 06.01.2009 23:58:14 - (not logged in) (192.168.1.108)> 220 Please visit http://sourceforge.net/projects/filezilla/
> (000003) 06.01.2009 23:58:14 - (not logged in) (192.168.1.108)> USER anonymous
> (000003) 06.01.2009 23:58:14 - (not logged in) (192.168.1.108)> 331 Password required for anonymous
> (000003) 06.01.2009 23:58:14 - (not logged in) (192.168.1.108)> PASS **********
> (000003) 06.01.2009 23:58:14 - anonymous (192.168.1.108)> 230 Logged on
> (000003) 06.01.2009 23:58:14 - anonymous (192.168.1.108)> TYPE I
> (000003) 06.01.2009 23:58:14 - anonymous (192.168.1.108)> 200 Type set to I
> (000003) 06.01.2009 23:58:14 - anonymous (192.168.1.108)> PASV
> (000003) 06.01.2009 23:58:14 - anonymous (192.168.1.108)> 227 Entering Passive Mode (192,168,1,105,16,121)
> (000003) 07.01.2009 00:00:14 - anonymous (192.168.1.108)> 421 Connection timed out.
> (000003) 07.01.2009 00:00:14 - anonymous (192.168.1.108)> disconnected.

Here is the version of bzr on xubuntu:

> dp at mycompany-1:~$ bzr version
> Bazaar (bzr) 1.10
>   Python interpreter: /usr/bin/python 2.5.2
>   Python standard library: /usr/lib/python2.5
>   bzrlib: /usr/lib/python2.5/site-packages/bzrlib
>   Bazaar configuration: /home/dp/.bazaar
>   Bazaar log file: /home/dp/.bzr.log
>
> Copyright 2005, 2006, 2007, 2008 Canonical Ltd.
> http://bazaar-vcs.org/
>
> bzr comes with ABSOLUTELY NO WARRANTY.  bzr is free software, and
> you may use, modify and redistribute it under the terms of the GNU
> General Public License version 2 or later.

On Windows machine I'm using Tortoise Bazaar with following version info:

> About Tortoise Bazaar
> Tortoise Bazaar 0.0.1dev
> Copyright 2008 Canonical Ltd.
>
> About Bazaar
> Bazaar (bzr) 1.7rc2
> Python interpreter: D:\Programme\Bazaar\python25.dll 2.5.2
> Python standard library: D:\Programme\Bazaar\lib\library.zip
> bzrlib: D:\Programme\Bazaar\lib\library.zip\bzrlib
> Bazaar configuration: C:\Dokumente und Einstellungen\user\Anwendungsdaten\bazaar\2.0
> Bazaar log file: C:\Dokumente und Einstellungen\user\Eigene Dateien\.bzr.log
>
> Copyright 2005, 2006, 2007, 2008 Canonical Ltd.
> http://bazaar-vcs.org/
>
> bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
> you may use, modify and redistribute it under the terms of the GNU
> General Public License version 2 or later.
>
> About Plugins
> qbzr 0.9.4dev0
> QBzr - Qt-based frontend for Bazaar

What can I try to clone a branch from Windows machine to xubuntu?

It needs not be FTP, any other alternative is accepted.

Thanks in advance


Dmitri Pissarenko



-- 
Dmitri Pissarenko
Tichtelgasse 23/1, 1120 Wien, Austria
Phone: +43 699 113 579 41
WWW: http://www.xing.com/profile/Dmitri_Pissarenko
E-Mail: dp at sw-dev.at



More information about the bazaar mailing list