equal
deleted
inserted
replaced
8 import abc |
8 import abc |
9 import hashlib |
9 import hashlib |
10 import os |
10 import os |
11 import subprocess |
11 import subprocess |
12 import tempfile |
12 import tempfile |
|
13 |
|
14 from mercurial import ( |
|
15 pycompat, |
|
16 ) |
|
17 from mercurial.utils import ( |
|
18 procutil, |
|
19 ) |
13 |
20 |
14 NamedTemporaryFile = tempfile.NamedTemporaryFile |
21 NamedTemporaryFile = tempfile.NamedTemporaryFile |
15 |
22 |
16 class BundleWriteException(Exception): |
23 class BundleWriteException(Exception): |
17 pass |
24 pass |
109 self.put_binary = put_binary |
116 self.put_binary = put_binary |
110 self.get_binary = get_binary |
117 self.get_binary = get_binary |
111 |
118 |
112 def _call_binary(self, args): |
119 def _call_binary(self, args): |
113 p = subprocess.Popen( |
120 p = subprocess.Popen( |
114 args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, |
121 pycompat.rapply(procutil.tonativestr, args), |
|
122 stdout=subprocess.PIPE, stderr=subprocess.PIPE, |
115 close_fds=True) |
123 close_fds=True) |
116 stdout, stderr = p.communicate() |
124 stdout, stderr = p.communicate() |
117 returncode = p.returncode |
125 returncode = p.returncode |
118 return returncode, stdout, stderr |
126 return returncode, stdout, stderr |
119 |
127 |