[PATCH 1 of 3] subrepo: support for adding a git subrepo

Martin Geisler mg at lazybytes.net
Sat Nov 13 09:29:53 CST 2010


Eric Eisner <ede at MIT.EDU> writes:

> # HG changeset patch
> # User Eric Eisner <ede at mit.edu>
> # Date 1289503448 18000
> # Node ID ccc59ab604a8160d44847754f8b48dedb25d2f16
> # Parent  e80128e40c044ea6619c3dc160df69ad36a8e5ff
> subrepo: support for adding a git subrepo
>
> gitsubrepo based on patch from David Soria Parra:
> http://bitbucket.org/segv/davids-poor-git-subrepo-attempt/

Yay, thanks for picking this up!

> +    def _gitnodir(self, commands):
> +        """Calls the git command
> +
> +        The methods tries to call the git command. versions previor to 1.6.0
> +        are not supported and very probably fail.
> +        """
> +        cmd = ['git'] + commands
> +        cmd = [util.shellquote(arg) for arg in cmd]
> +        cmd = util.quotecommand(' '.join(cmd))

Can we not use something like this instead:

  subprocess.Popen(['git'] + commands, ...)

I always try to push the quoting of arguments to subprocess instead of
doing it myself.

-- 
Martin Geisler

Mercurial links: http://mercurial.ch/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20101113/d60e09f9/attachment.pgp>


More information about the Mercurial-devel mailing list