##// END OF EJS Templates
Merge with crew-stable
Patrick Mezard -
r5293:32ec518e merge default
parent child Browse files
Show More
@@ -201,17 +201,17 b' def uisetup(ui):'
201 201 '''use closure to save diff command to use'''
202 202 def mydiff(ui, repo, *pats, **opts):
203 203 return dodiff(ui, repo, path, diffopts, pats, opts)
204 mydiff.__doc__ = '''use %(path)r to diff repository (or selected files)
204 mydiff.__doc__ = '''use %(path)s to diff repository (or selected files)
205 205
206 206 Show differences between revisions for the specified
207 files, using the %(path)r program.
207 files, using the %(path)s program.
208 208
209 209 When two revision arguments are given, then changes are
210 210 shown between those revisions. If only one revision is
211 211 specified then that revision is compared to the working
212 212 directory, and, when no revisions are specified, the
213 213 working directory files are compared to its parent.''' % {
214 'path': path,
214 'path': util.uirepr(path),
215 215 }
216 216 return mydiff
217 217 cmdtable[cmd] = (save(cmd, path, diffopts),
@@ -35,7 +35,7 b' class sshrepository(remoterepository):'
35 35 cmd = cmd % (sshcmd, args, remotecmd, self.path)
36 36
37 37 ui.note('running %s\n' % cmd)
38 res = os.system(cmd)
38 res = util.system(cmd)
39 39 if res != 0:
40 40 self.raise_(repo.RepoError(_("could not create remote repo")))
41 41
@@ -51,6 +51,7 b' class sshrepository(remoterepository):'
51 51 cmd = '%s %s "%s -R %s serve --stdio"'
52 52 cmd = cmd % (sshcmd, args, remotecmd, self.path)
53 53
54 cmd = util.quotecommand(cmd)
54 55 ui.note('running %s\n' % cmd)
55 56 self.pipeo, self.pipei, self.pipee = os.popen3(cmd, 'b')
56 57
@@ -1001,6 +1001,12 b" if os.name == 'nt':"
1001 1001 _quotere = re.compile(r'(\\*)("|\\$)')
1002 1002 return '"%s"' % _quotere.sub(r'\1\1\\\2', s)
1003 1003
1004 def quotecommand(cmd):
1005 """Build a command string suitable for os.popen* calls."""
1006 # The extra quotes are needed because popen* runs the command
1007 # through the current COMSPEC. cmd.exe suppress enclosing quotes.
1008 return '"' + cmd + '"'
1009
1004 1010 def explain_exit(code):
1005 1011 return _("exited with status %d") % code, code
1006 1012
@@ -1154,6 +1160,9 b' else:'
1154 1160 else:
1155 1161 return "'%s'" % s.replace("'", "'\\''")
1156 1162
1163 def quotecommand(cmd):
1164 return cmd
1165
1157 1166 def testpid(pid):
1158 1167 '''return False if pid dead, True if running or not sure'''
1159 1168 if os.sys.platform == 'OpenVMS':
@@ -1681,3 +1690,7 b' def drop_scheme(scheme, path):'
1681 1690 if path.startswith('//'):
1682 1691 path = path[2:]
1683 1692 return path
1693
1694 def uirepr(s):
1695 # Avoid double backslash in Windows path repr()
1696 return repr(s).replace('\\\\', '\\')
General Comments 0
You need to be logged in to leave comments. Login now