delete dud branches from vc-bzr

Asked by Riccardo Murri

(Initial request was completed. This request is now about deleting some dud branches.)

Who should I contact to have the 'current', 'devel' and 'trunk'
directories removed? They contain half-created branches from previous attempts, but show up in the vc-bzr product page indeed.

Question information

Language:
English Edit question
Status:
Answered
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Daniel T Chen (crimsun) said :
#1

Hi, Riccardo,

You may find some of the points at this [0] link helpful. Make sure you have python-paramiko installed if you intend to use the sftp access method.

[0] https://wiki.ubuntu.com/BzrMaintainerHowto

Revision history for this message
Riccardo Murri (rmurri) said :
#2

Hi Daniel,

thanks for the URL; it's exactly what I needed!

However, I cannot push the repository::

  $ bzr check
checked branch /home/rmurri/bzr/vc-bzr/ format Bazaar-NG Metadir branch format 5
     2 revisions
     2 unique file texts
     0 repeated file texts
     1 weaves

  $ bzr push --remember --create-prefix
'sftp://<email address hidden>/~riccardo-murri/vc-bzr/current'
  0 revision(s) pushed.

  $ sftp <email address hidden>
  Connecting to bazaar.launchpad.net...
  sftp> ls
  . .. ~riccardo-murri
  sftp> cd ~riccardo-murri
  sftp> ls
  +junk . ..
  sftp> mkdir vc-bzr
  sftp> ls
  +junk . .. vc-bzr
  sftp> bye

  $ bzr push --remember --create-prefix
'sftp://<email address hidden>/~riccardo-murri/vc-bzr/current'
  0 revision(s) pushed.

  $ sftp <email address hidden>
  Connecting to bazaar.launchpad.net...
  sftp> ls
  . .. ~riccardo-murri
  sftp> cd ~riccardo-murri
  sftp> cd vc-bzr
  Couldn't stat remote file: No such file or directory
  sftp> ls
  +junk . ..
  sftp> bye

so it looks operations via sftp are "fake"... may this be the cause
for bzr not pushing?

What should I do?

Cheers,
Riccardo

Revision history for this message
Diogo Matsubara (matsubara) said :
#3

Hello Riccardo,

this might be of some help too:

http://ddaa.net/blog/launchpad/bzr-hosting

Feel free to contact us on #launchpad at irc.freenode.net to try to resolve this problem in real time.

Revision history for this message
James Henstridge (jamesh) said :
#4

Resolved on IRC. The problem was that bzr could not initialise paramiko (because pycrypto wasn't available for Python 2.4). So the "sftp://..." URL was interpreted as a filesystem path.

The "0 revisions pushed" was because the local branch Riccardo was pushing to had the two revisions from the previous push.

Revision history for this message
Riccardo Murri (rmurri) said :
#5

Alas, only progressed to some further error...

The "0 revisions pushed is solved exactly as JamesH says,
but bzr push is still giving errors.

I tried some python code suggested by JamesH::

Python 2.4.1 (#2, May 5 2005, 11:32:06)
[GCC 3.3.5 (Debian 1:3.3.5-12)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import bzrlib.bzrdir
>>> bzrlib.bzrdir.BzrDir.create_branch_and_repo('sftp://<email address hidden>/~rmurri/vc-bzr/trunk',True)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/site-packages/bzrlib/bzrdir.py", line 224,
in create_branch_and_repo
    bzrdir._find_or_create_repository(force_new_repo)
  File "/usr/lib/python2.4/site-packages/bzrlib/bzrdir.py", line 230,
in _find_or_create_repository
    return self.create_repository()
  File "/usr/lib/python2.4/site-packages/bzrlib/bzrdir.py", line 789,
in create_repository
    return self._format.repository_format.initialize(self, shared)
  File "/usr/lib/python2.4/site-packages/bzrlib/repository.py", line
1321, in initialize
    control_store.get_weave_or_empty('inventory', transaction)
  File "/usr/lib/python2.4/site-packages/bzrlib/store/versioned/__init__.py",
line 179, in get_weave_or_empty
    return self.get_weave(file_id, transaction)
  File "/usr/lib/python2.4/site-packages/bzrlib/store/versioned/__init__.py",
line 127, in get_weave
    w = self._versionedfile_class(self.filename(file_id),
self._transport, self._file_mode,
  File "/usr/lib/python2.4/site-packages/bzrlib/knit.py", line 289, in __init__
    access_mode, create=create, file_mode=file_mode)
  File "/usr/lib/python2.4/site-packages/bzrlib/knit.py", line 999, in __init__
    fp = self._transport.get(self._filename)
  File "/usr/lib/python2.4/site-packages/bzrlib/transport/sftp.py",
line 417, in get
    self._translate_io_exception(e, path, ': error retrieving')
  File "/usr/lib/python2.4/site-packages/bzrlib/transport/sftp.py",
line 540, in _translate_io_exception
    raise e
IOError: /~rmurri/vc-bzr/trunk/.bzr/repository/inventory.kndx

Issuing the same command again ends up in a different error, namely
that "mkdir .bzr" fails as that directory already exists.

I'm using bzr 0.8.2-2bpo1 from www.backports.org (backport from Debian
testing to Debian stable).

Cheers,
Riccardo

Revision history for this message
David Allouche (ddaa) said :
#6

The situation is lightly screwed, because bzr won't let you push on an already
created directory that is not a proper branch, and Launchpad does not let you
deleted an already created branch (bug 34540). We can delete branches manually,
but that requires going through an admin.

To get your branch pushed, you can use a sftp client (nautilus, lftp) to:

 * open sftp://<email address hidden>/~rmurri/vc-bzr/current
 * delete the existing .bzr there
 * copy the .bzr from your local branch
 * delete .bzr/checkout on sftp

There should be a simpler way to recover from that situation: filed bug 53340.

I cannot help diagnose the root cause of the problem.

Revision history for this message
Riccardo Murri (rmurri) said :
#7

Hi David,

thanks for your instructions:

On 7/18/06, David Allouche <email address hidden> wrote:
> To get your branch pushed, you can use a sftp client (nautilus, lftp) to:
>
> * open sftp://<email address hidden>/~rmurri/vc-bzr/current
> * delete the existing .bzr there
> * copy the .bzr from your local branch
> * delete .bzr/checkout on sftp
>

following the steps above, I was able to put a valid bzr branch under
.../vc-bzr/current::

  $ bzr branch http://bazaar.launchpad.net/~rmurri/vc-bzr/current vc-bzr
Branched 9 revision(s).

Still, I cannot push to that::

  $ bzr ci -m "Added Version: line to comment headers"
modified vc-bzr.el
Committed revision 10.
  $ bzr push sftp://bazaar.launchpad.net/~rmurri/vc-bzr/current
bzr: ERROR: exceptions.IOError: checkout
  at /usr/lib/python2.4/site-packages/bzrlib/transport/sftp.py line 540
  in _translate_io_exception

If I do not remove the ``.bzr/checkout`` directory, then I get a
different error::

  $ bzr push sftp://bazaar.launchpad.net/~rmurri/vc-bzr/current
bzr: WARNING: This transport does not update the working tree of:
sftp://bazaar.launchpad.net/%7Ermurri/vc-bzr/current/
bzr: ERROR: exceptions.IOError: /~rmurri/vc-bzr/current/.bzr/branch/bound
  at /usr/lib/python2.4/site-packages/bzrlib/transport/sftp.py line 540
  in _translate_io_exception

Might these be related to some timeout in bzr/paramiko? When I upload
the repository through 'lftp' it takes ages to complete... Sometimes,
even a simple 'cd' command takes *minutes* to return to prompt.

Or, could this be a bug of bzr 0.8.2? Indeed, I get all sort of
errors even when trying to ``bzr push`` to a machine I have full ssh
access to::

  $ sftp host.at.work
  Connecting to host.at.work...
  <email address hidden>'s password:
  sftp> pwd
  Remote working directory: /afs/host.at.work/home/r/rmurri
  sftp> ^D

  $ bzr push sftp://host.at.work/vc-bzr
  <email address hidden>'s password:
  bzr: ERROR: File exists: 'vc-bzr': Failure: unable to mkdir

  $ bzr push sftp://host.at.work/vc-bzr2
  <email address hidden>'s password:
  bzr: ERROR: No such file: '/vc-bzr2': No such file: unable to stat
  Exception exceptions.AttributeError: "'LockableFiles' object has no
attribute '_lock_count'" in <bound method LockableFiles.__del__ of
LockableFiles(<bzrlib.transport.sftp.SFTPTransport
url=sftp://host.at.work/vc-bzr2/>)> ignored

  $ bzr push sftp://host.at.work/~rmurri/vc-bzr
  <email address hidden>'s password:
  bzr: ERROR: Parent directory of sftp://host.at.work/~rmurri/vc-bzr
does not exist.

  $ bzr push sftp://host.at.work/tmp/vc-bzr
  <email address hidden>'s password:
  0 revision(s) pushed.
  ^^^^^^^^^^^^^
  should be 9 at least

Anyway, the initial request of "how to first import files in
launchpad" is now solved :-) I can live with uploading snapshots of my
local branch through lftp until the issue with ``bzr push`` is
cleared.

Thank you all for your kind help.

Riccardo

Revision history for this message
David Allouche (ddaa) said :
#8

> $ bzr ci -m "Added Version: line to comment headers"
> modified vc-bzr.el
> Committed revision 10.
> $ bzr push sftp://bazaar.launchpad.net/~rmurri/vc-bzr/current
> bzr: ERROR: exceptions.IOError: checkout
> at /usr/lib/python2.4/site-packages/bzrlib/transport/sftp.py line 540
> in _translate_io_exception

Apparently my recipe is broken.

> If I do not remove the ``.bzr/checkout`` directory, then I get a
> different error::
>
> $ bzr push sftp://bazaar.launchpad.net/~rmurri/vc-bzr/current
> bzr: WARNING: This transport does not update the working tree of:
> sftp://bazaar.launchpad.net/%7Ermurri/vc-bzr/current/
> bzr: ERROR: exceptions.IOError: /~rmurri/vc-bzr/current/.bzr/branch/bound
> at /usr/lib/python2.4/site-packages/bzrlib/transport/sftp.py line 540
> in _translate_io_exception

The steps I gave assumed a plain standalone branch, not a checkout (or
bound branch). Apparently, the branch you uploaded is a bound branch.
But I do not know whether this error is "normal". You should check with
the bzr developers.

> Might these be related to some timeout in bzr/paramiko? When I upload
> the repository through 'lftp' it takes ages to complete... Sometimes,
> even a simple 'cd' command takes *minutes* to return to prompt.

Filed bug 53423 about the slowness. I think these two problems are
mainly poor error handling in bzr, but not related to the slowness your
are experiencing.Try using an official bzr release or the development
branch: http://bazaar-vcs.org/OfficialDownloads

> $ bzr push sftp://host.at.work/vc-bzr
> <email address hidden>'s password:
> bzr: ERROR: File exists: 'vc-bzr': Failure: unable to mkdir

Apparently, vc-bzr is an existing directory but is not recognised by bzr
as a branch.

> $ bzr push sftp://host.at.work/vc-bzr2
> <email address hidden>'s password:
> bzr: ERROR: No such file: '/vc-bzr2': No such file: unable to stat
> Exception exceptions.AttributeError: "'LockableFiles' object has no
> attribute '_lock_count'" in <bound method LockableFiles.__del__ of
> LockableFiles(<bzrlib.transport.sftp.SFTPTransport
> url=sftp://host.at.work/vc-bzr2/>)> ignored

Please get in touch with the bzr community to address this problem:
http://bazaar-vcs.org/BzrSupport

> $ bzr push sftp://host.at.work/~rmurri/vc-bzr
> <email address hidden>'s password:
> bzr: ERROR: Parent directory of sftp://host.at.work/~rmurri/vc-bzr
> does not exist.

Apparently, /~rmurri does not expand. SFTP servers do not always support
that syntax, try with lftp first or use absolute paths.

> $ bzr push sftp://host.at.work/tmp/vc-bzr
> <email address hidden>'s password:
> 0 revision(s) pushed.
> ^^^^^^^^^^^^^
> should be 9 at least

Known bzr bug. Confusing but harmless, the push worked successfully.

You will get better help about your remaining problems if you ask the
bzr people directly.
--
                                                            -- ddaa

Revision history for this message
Riccardo Murri (rmurri) said :
#9

Hello,

upgrading to latest bzr and paramiko solved the problem: I can now
``bzr push`` my repository correctly (see
http://bazaar.launchpad.net/~rmurri/vc-bzr/emacs21 )

``bzr`` required a non-existent destination directory: it successfully
pushed the repository to .../vc-bzr/emacs21 (non existent prior to the
push), but refused to push to ../vc-bzr/current (existent, yet empty).

I am now using bzr and paramiko installed from the development version
snapshots:

   sw revno branch
   ======== ===== =========================================
   bzr 1881 http://bazaar-vcs.org/bzr/bzr.dev/
   paramiko 371 http://www.lag.net/paramiko/bzr/paramiko/

They were both installed by ``python2.4 setup.py install``.

I have *unsuccessfully* tried other combinations:

  bzr 0.8.2 + paramiko 1.5.1
      both from debian testing, ``bzr push`` gives the error messages
      described in my other posts.

  bzr 0.9.0dev (revno 1881) + paramiko 1.5.1
      bzr from devel sources, paramiko from debian testing, ``bzr
      push`` dies with uninformative error message ".bzr: ERROR: .bzr"

Thank you all very much for your help and suggestions.

Who should I contact to have the 'current', 'devel' and 'trunk'
directories removed? They contain half-created branches from previous
attempts, but show up in the vc-bzr product page indeed. (May I
suggest that an empty directory in a products supermirror space gets
removed if its empty after a few days? So I would just remove the
``.bzr`` subdir via SFTP, and forget about the whole thing.)

Regards,
Riccardo

Can you help with this problem?

Provide an answer of your own, or ask Riccardo Murri for more information if necessary.

To post a message you must log in.