ctrochalakis /
tx-submissions
(http://transifex.org/)
fork of transifex
GSoC '08: Introducing a new transifex submission system, an api and a command line client
Clone URL : http://bitbucket.org/ctrochalakis/tx-submissions/ (size: 1.4 MB)
| commit 454: | 8ccd1219d925 |
| parent 453: | b6c626697209 |
| branch: | default |
Swich all run_command calls to use the new function
Changed (Δ78 bytes):
raw changeset »
transifex/util.py (4 lines added, 6 lines removed)
transifex/vcs/__init__.py (1 lines added, 1 lines removed)
transifex/vcs/git.py (1 lines added, 1 lines removed)
transifex/vcs/util.py
tx-init.py (3 lines added, 3 lines removed)
Up to file-list transifex/util.py:
| … | … | @@ -103,13 +103,11 @@ def check_podata(contents): |
103 |
103 |
>>> check_podata(c) |
104 |
104 |
0 |
105 |
105 |
""" |
106 |
from subprocess import Popen, PIPE |
|
107 |
p = Popen(['msgfmt', '-c', '-'], stdin=PIPE) |
|
108 |
p.stdin.write(contents) |
|
109 |
p.communicate() |
|
110 |
|
|
106 |
try: |
|
107 |
p = run_command('msgfmt -c -', _input=contents) |
|
108 |
return True |
|
109 |
except CommandError: |
|
111 |
110 |
return False |
112 |
return True |
|
113 |
111 |
|
114 |
112 |
def python_to_args(**kwargs): |
115 |
113 |
""" |
Up to file-list transifex/vcs/__init__.py:
| … | … | @@ -1,5 +1,5 @@ import os |
1 |
1 |
import os |
2 |
from transifex. |
|
2 |
from transifex.util import run_command |
|
3 |
3 |
|
4 |
4 |
class RepoError(Exception): |
5 |
5 |
pass |
Up to file-list transifex/vcs/git.py:
| … | … | @@ -1,6 +1,6 @@ import os |
1 |
1 |
import os |
2 |
2 |
from transifex.vcs import _Repo, RepoError |
3 |
from transifex. |
|
3 |
from transifex.util import run_command |
|
4 |
4 |
|
5 |
5 |
def repository(path=''): |
6 |
6 |
""" |
| … | … | @@ -9,7 +9,7 @@ from optparse import OptionParser |
9 |
9 |
|
10 |
10 |
from turbogears import config |
11 |
11 |
|
12 |
from transifex.util import header, load_config |
|
12 |
from transifex.util import header, load_config, run_command |
|
13 |
13 |
from transifex.model import * |
14 |
14 |
|
15 |
15 |
from turbogears.database import metadata, session |
| … | … | @@ -133,7 +133,6 @@ def create_test_repos(): |
133 |
133 |
""" |
134 |
134 |
Create test repositories in <workdir>/testing-repos |
135 |
135 |
""" |
136 |
from transifex.util import run_commands |
|
137 |
136 |
troot = get_testing_dir() |
138 |
137 |
log.info("Creating Testing repositories...") |
139 |
138 |
sets = ["init", "cvs", "svn", "hg", "git"] |
| … | … | @@ -172,7 +171,8 @@ def create_test_repos(): |
172 |
171 |
|
173 |
172 |
for (i, scmtype) in enumerate(sets): |
174 |
173 |
log.info(' - %s' % scmtype) |
175 |
|
|
174 |
for command in coms_set[i]: |
|
175 |
print run_command(command) |
|
176 |
176 |
log.info("Done.\n") |
177 |
177 |
|
178 |
178 |
