Mercurial > public > mercurial-scm > hg-stable
diff mercurial/patch.py @ 7106:4674706b5b95
python2.6: use subprocess if available
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Sun, 05 Oct 2008 21:35:26 +0200 |
parents | 7b5c063b0b94 |
children | 94cf0d1f48a3 |
line wrap: on
line diff
--- a/mercurial/patch.py Fri Oct 17 17:34:25 2008 +0200 +++ b/mercurial/patch.py Sun Oct 05 21:35:26 2008 +0200 @@ -9,7 +9,7 @@ from i18n import _ from node import hex, nullid, short import base85, cmdutil, mdiff, util, revlog, diffhelpers, copies -import cStringIO, email.Parser, os, popen2, re, errno +import cStringIO, email.Parser, os, re, errno import sys, tempfile, zlib class PatchError(Exception): @@ -1308,7 +1308,7 @@ return fd, name = tempfile.mkstemp(prefix="hg-patchbomb-", suffix=".txt") try: - p = popen2.Popen3('diffstat -p1 -w79 2>/dev/null > ' + name) + p = util.Popen3('diffstat -p1 -w79 2>/dev/null > ' + name) try: for line in patchlines: p.tochild.write(line + "\n")