Comment 5 for bug 445156

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 445156] Re: vcs-import of libvdpau (git) fails: bzrlib.errors.BzrError: The remote server unexpectedly closed the connection

Hi Paul,

On Tue, 2010-01-05 at 00:30 +0000, Paul Hummer wrote:
> Odd. Here's the output of my git clone-
>
> [-(Mon 2010-01-04 17:26:04)-(~/)-]> git clone git://anongit.freedesktop.org/%7Eaplattner/libvdpau
> Initialized empty Git repository in /home/rockstar/libvdpau/.git/
> fatal: The remote end hung up unexpectedly
>
> [-(Mon 2010-01-04 17:26:08)-(~/)-]> git clone git://anongit.freedesktop.org/~aplattner/libvdpau
> Initialized empty Git repository in /home/rockstar/libvdpau/.git/
> remote: Counting objects: 154, done.
> remote: Compressing objects: 100% (74/74), done.
> remote: Total 154 (delta 64), reused 154 (delta 64)
> Receiving objects: 100% (154/154), 156.78 KiB, done.
> Resolving deltas: 100% (64/64), done.
>
> It looks like git handles %7e different than ~ in requesting a URL, so
> maybe the escaping is also breaking bzr-git. Jelmer, could you shed
> some light on this?
As far as I understand git basically just splits the URL into a host and
a path part and then runs the equivalent of:

ssh "$host" git upload-pack "$path"

(or something similar with netcat when using git://)

It doesn't seem to do any sort of further parsing (including url
de-escaping) of $path.

A strace confirms this:

12553 write(4, "0048git-upload-pack /%7Eaplattne"..., 72) = 72

So bzr-git/dulwich should probably just make sure to urllib.unquote
paths before sending them to a remote server.

  affects bzr-git
  status triaged
  importance medium

Cheers,

Jelmer