Hi Courtney,
On Sun, Jun 19, 2011 at 03:55:02PM -0500, Courtney Bane wrote:
> On Sun, Jun 19, 2011 at 07:21:49PM +0200, Guido Günther wrote:
> > Patch looks great. But according to the got-clone manpage git also
> > supports ~user expansion:
> > 
> > ssh://[user@]host.xz[:port]/~[user]/path/to/repo.git/ 
> > 
> > Could you handle that case too?
> 
> Sure. I've attached an updated patch that handles both forms of homedir
> URLs. This one is a little bit more involved, since I had to modify the
> remote script, in addition to the URL parsing. (Note that, according to
> the bash manpage, the "~username/" part can't be quoted, and from
> testing, dash has the same behavior.)

Great. Thanks! We only need to...

> -if [ -d "%(dir)s" ]; then
> -    echo "Repository at \"%(dir)s\" already exists - giving up."
> +if [ -d %(base)s"%(dir)s" ]; then
> +    echo "Repository at \"%(base)s%(dir)s\" already exists - giving up."
>      exit 1
>  fi
> -mkdir -p "%(dir)s"
> -cd "%(dir)s"
> +mkdir -p %(base)s"%(dir)s"
> +cd %(base)s"%(dir)s"
>  git init --bare --shared
>  echo "%(pkg)s packaging" > description
>  EOF""" % remote

...make sure we move the %(base)s into the quotes like "%(base)s%(dir)s"
to be safe when the path contains spaces.

It would be great if you could also add some doctests (there are
examples in gbp/deb.py) to parse_remote but that's not a must.

Cheers,
 -- Guido




--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to