[damned-lies] Only push specific branch



commit 801fffdadd63b2a72c5bad1e5a44beb5601a33c0
Author: Claude Paroz <claude 2xlibre net>
Date:   Wed Feb 5 17:43:26 2014 +0100

    Only push specific branch

 stats/models.py |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/stats/models.py b/stats/models.py
index 13a767c..717e63d 100644
--- a/stats/models.py
+++ b/stats/models.py
@@ -722,13 +722,16 @@ class Branch(models.Model):
                         fout.close()
                         fin.close()
                         os.rename(linguas_file+"~", linguas_file)
-                        utils.run_shell_command("cd \"%(dest)s\" && git add %(lg_file)s" % var_dict, 
raise_on_error=True)
+                        utils.run_shell_command(
+                            "cd \"%(dest)s\" && git add %(lg_file)s" % var_dict, raise_on_error=True)
                     var_dict['msg'] = "Added %s translation" % language.name
                 # git commit -m "Updated %s translation."
-                utils.run_shell_command("cd \"%(dest)s\" && git commit -m \"%(msg)s\" --author 
\"%(author)s\"" % var_dict,
+                utils.run_shell_command(
+                    "cd \"%(dest)s\" && git commit -m \"%(msg)s\" --author \"%(author)s\"" % var_dict,
                     raise_on_error=True)
                 # git push
-                utils.run_shell_command("cd \"%(dest)s\" && git push" % var_dict, raise_on_error=True)
+                utils.run_shell_command(
+                    "cd \"%(dest)s\" && git push origin %(branch)s" % var_dict, raise_on_error=True)
         # Finish by updating stats
         self.update_stats(force=False)
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]