Show More
@@ -87,18 +87,21 b' def _add_files_and_push(vcs, dest, clone' | |||
|
87 | 87 | added_file = jn(path, '%ssetup.py' % tempfile._RandomNameSequence().next()) |
|
88 | 88 | Command(cwd).execute('touch %s' % added_file) |
|
89 | 89 | Command(cwd).execute('%s add %s' % (vcs, added_file)) |
|
90 | author_str = 'Marcin Kuźminski <me@email.com>' | |
|
91 | ||
|
92 | git_ident = "git config user.name {} && git config user.email {}".format( | |
|
93 | 'Marcin Kuźminski', 'me@email.com') | |
|
90 | 94 | |
|
91 | 95 | for i in xrange(kwargs.get('files_no', 3)): |
|
92 | 96 | cmd = """echo 'added_line%s' >> %s""" % (i, added_file) |
|
93 | 97 | Command(cwd).execute(cmd) |
|
94 | author_str = 'Marcin Kuźminski <me@email.com>' | |
|
95 | 98 | if vcs == 'hg': |
|
96 | 99 | cmd = """hg commit -m 'commited new %s' -u '%s' %s """ % ( |
|
97 | 100 | i, author_str, added_file |
|
98 | 101 | ) |
|
99 | 102 | elif vcs == 'git': |
|
100 |
cmd = """ |
|
|
101 | """--author '%s' %s """ % (i, author_str, added_file) | |
|
103 | cmd = """%s && git commit -m 'commited new %s' %s""" % ( | |
|
104 | git_ident, i, added_file) | |
|
102 | 105 | Command(cwd).execute(cmd) |
|
103 | 106 | |
|
104 | 107 | # PUSH it back |
@@ -108,7 +111,8 b' def _add_files_and_push(vcs, dest, clone' | |||
|
108 | 111 | 'hg push --verbose', clone_url) |
|
109 | 112 | elif vcs == 'git': |
|
110 | 113 | stdout, stderr = Command(cwd).execute( |
|
111 |
|
|
|
114 | """%s && git push --verbose %s master""" % ( | |
|
115 | git_ident, clone_url)) | |
|
112 | 116 | |
|
113 | 117 | return stdout, stderr |
|
114 | 118 |
General Comments 0
You need to be logged in to leave comments.
Login now