summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/ext/vcs/bzr.py2
-rw-r--r--ranger/ext/vcs/git.py2
-rw-r--r--ranger/ext/vcs/vcs.py13
3 files changed, 7 insertions, 10 deletions
diff --git a/ranger/ext/vcs/bzr.py b/ranger/ext/vcs/bzr.py
index aa7112dc..b06f28ec 100644
--- a/ranger/ext/vcs/bzr.py
+++ b/ranger/ext/vcs/bzr.py
@@ -23,7 +23,7 @@ class Bzr(Vcs):
 
     def _bzr(self, args, path=None, catchout=True, retbytes=False):
         """Run a bzr command"""
-        return self._vcs(path or self.path, 'bzr', args, catchout=catchout, retbytes=retbytes)
+        return self._vcs(['bzr'] + args, path or self.path, catchout=catchout, retbytes=retbytes)
 
     def _remote_url(self):
         """Returns remote url"""
diff --git a/ranger/ext/vcs/git.py b/ranger/ext/vcs/git.py
index 41961795..1741ceff 100644
--- a/ranger/ext/vcs/git.py
+++ b/ranger/ext/vcs/git.py
@@ -29,7 +29,7 @@ class Git(Vcs):
 
     def _git(self, args, path=None, catchout=True, retbytes=False):
         """Run a git command"""
-        return self._vcs(path or self.path, 'git', args, catchout=catchout, retbytes=retbytes)
+        return self._vcs(['git'] + args, path or self.path, catchout=catchout, retbytes=retbytes)
 
     def _head_ref(self):
         """Returns HEAD reference"""
diff --git a/ranger/ext/vcs/vcs.py b/ranger/ext/vcs/vcs.py
index ae770699..fbcfc9c4 100644
--- a/ranger/ext/vcs/vcs.py
+++ b/ranger/ext/vcs/vcs.py
@@ -106,21 +106,18 @@ class Vcs(object):
     # Generic
     #---------------------------
 
-    def _vcs(self, path, cmd, args, catchout=True, retbytes=False):
+    def _vcs(self, cmd, path, catchout=True, retbytes=False):
         """Run a VCS command"""
         try:
             if catchout:
-                output = subprocess.check_output([cmd] + args, cwd=path,
+                output = subprocess.check_output(cmd, cwd=path,
                                                  stderr=subprocess.DEVNULL)
                 return output if retbytes else output.decode('UTF-8')
             else:
-                subprocess.check_call([cmd] + args, cwd=path,
+                subprocess.check_call(cmd, cwd=path,
                                       stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
-        except subprocess.CalledProcessError:
-            raise VcsError("{0:s} error on {1:s}. Command: {2:s}"\
-                           .format(cmd, path, ' '.join([cmd] + args)))
-        except FileNotFoundError:
-            raise VcsError("{0:s} error on {1:s}: File not found".format(cmd, path))
+        except (subprocess.CalledProcessError, FileNotFoundError):
+            raise VcsError('{0:s}: {1:s}'.format(str(cmd), path))
 
     def _get_repotype(self, path):
         """Get type for path"""
t, populate real acct views' href='/akspecs/aerc/commit/widgets/account.go?h=0.1.1&id=648ca983f6b2ef29378c32d1ebb6d67798f4af6d'>648ca98 ^
8492a21 ^
0f8b7a1 ^
b389647 ^
24dfc47 ^
c286d3d ^

0911cd5 ^
648ca98 ^

24dfc47 ^
8492a21 ^
0911cd5 ^
c286d3d ^


648ca98 ^




a729179 ^
648ca98 ^

c286d3d ^
b76deea ^
24dfc47 ^
b76deea ^
a409a9f ^
c286d3d ^
24dfc47 ^
c286d3d ^



b76deea ^
0911cd5 ^
24dfc47 ^
2349b7d ^

11f0a72 ^
0f8b7a1 ^

24dfc47 ^

c286d3d ^
2349b7d ^
c286d3d ^

0f8b7a1 ^
b389647 ^
8492a21 ^
c286d3d ^
b389647 ^
c286d3d ^
0911cd5 ^






24dfc47 ^
0911cd5 ^


24dfc47 ^

f87fe50 ^
0911cd5 ^
24dfc47 ^
0911cd5 ^

62946ff ^
24dfc47 ^
62946ff ^

607ece8 ^
1228448 ^


648ca98 ^
b76deea ^


648ca98 ^








c286d3d ^
24dfc47 ^
















c286d3d ^



24dfc47 ^
c286d3d ^

24dfc47 ^




















c286d3d ^



2349b7d ^



cf66462 ^




77c76ba ^
cf66462 ^










2349b7d ^

2349b7d ^



2349b7d ^

b60999c ^




24daef8 ^



b60999c ^
b389647 ^



4ec7f5d ^








b389647 ^

0f8b7a1 ^

b389647 ^





11f0a72 ^
b389647 ^











b60999c ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242