[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mercurial
Subject:    Re: SSH issues on Win7 with 1.7.2+19-f9d29777b4eb?
From:       Jon <jon.forums () gmail ! com>
Date:       2010-12-22 16:08:04
Message-ID: 20101222110804.c57c8af9.jon.forums () gmail ! com
[Download RAW message or body]

> > @Steve - Host Name is blank in Default Settings in my putty configuration.
> > 
> > @Mads - is there anything specific you want me to patch up and check for you?
> 
> Something along the lines of:
> 
> diff -r f16b3b1a2234 mercurial/windows.py
> --- a/mercurial/windows.py      Mon Dec 20 15:27:15 2010 -0600
> +++ b/mercurial/windows.py      Wed Dec 22 09:39:00 2010 -0600
> @@ -160,6 +160,9 @@
> 
> def quotecommand(cmd):
> """Build a command string suitable for os.popen* calls."""
> +    if sys.version_info < (2, 7, 1):
> +        # Python versions since 2.7.1 do this extra quoting themselves
> +        return cmd
> # The extra quotes are needed because popen* runs the command
> # through the current COMSPEC. cmd.exe suppress enclosing quotes.
> return '"' + cmd + '"'


That didn't change things, but this patch

C:\hg>hg diff
diff --git a/mercurial/windows.py b/mercurial/windows.py
--- a/mercurial/windows.py
+++ b/mercurial/windows.py
@@ -160,6 +160,9 @@

 def quotecommand(cmd):
     """Build a command string suitable for os.popen* calls."""
+    if sys.version_info > (2, 7, 0):
+        # Python versions since 2.7.1 do this extra quoting themselves
+        return cmd
     # The extra quotes are needed because popen* runs the command
     # through the current COMSPEC. cmd.exe suppress enclosing quotes.
     return '"' + cmd + '"'


...instead of failing, sweetly gives:

C:\vim>hg version
Mercurial Distributed SCM (version 1.7.2+92-f16b3b1a2234)
(see http://mercurial.selenic.com for more information)

Copyright (C) 2005-2010 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

C:\vim>hg in --debug --trace
running c:/tools/TortoisePlink.exe -C -batch -ssh -2 -i \
c:/Users/Jon/.ssh/id_rsa_putty.ppk hg@bitbucket.org "hg -R jonforums/vimenv serve \
--stdio" sending hello command
sending between command
remote: 94
remote: capabilities: lookup changegroupsubset branchmap pushkey stream \
                unbundle=HG10GZ,HG10BZ,HG10UN
remote: 1
comparing with ssh://hg@bitbucket.org/jonforums/vimenv
sending heads command
searching for changes
no changes found


Jon

---
http://jonforums.github.com/
_______________________________________________
Mercurial mailing list
Mercurial@selenic.com
http://selenic.com/mailman/listinfo/mercurial


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic