From 7f7985fee4f7ec01de0075d7076d53bba5f8b8f6 Mon Sep 17 00:00:00 2001 From: Vadim Sikora Date: Thu, 29 Jan 2015 13:45:19 +0100 Subject: [PATCH 1/2] Little bit more detailed git.incoming Sometimes it's not really clear from commit message what changes are going to be deployed so it's nice to see not only what commits are there but also who is the author. --- dploi_fabric/git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dploi_fabric/git.py b/dploi_fabric/git.py index d3fc328..08774ad 100644 --- a/dploi_fabric/git.py +++ b/dploi_fabric/git.py @@ -72,7 +72,7 @@ def incoming(remote='origin', branch=None): """ if not branch: branch = env.branch - run(("cd %(path)s; git fetch " + remote + " && git log --oneline .." + remote + '/' + branch) % env) + run(("cd %(path)s; git fetch " + remote + " && git log --oneline --pretty=format:'%C(yellow)%h%C(reset) - %s %C(bold blue)<%an>%C(reset)' .." + remote + '/' + branch) % env) def local_branch_is_dirty(ignore_untracked_files=True): From 9ce7c509952fe1a6992edb29431710e17ba737f3 Mon Sep 17 00:00:00 2001 From: Vadim Sikora Date: Thu, 29 Jan 2015 14:00:43 +0100 Subject: [PATCH 2/2] escape format string --- dploi_fabric/git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dploi_fabric/git.py b/dploi_fabric/git.py index 08774ad..b1114ba 100644 --- a/dploi_fabric/git.py +++ b/dploi_fabric/git.py @@ -72,7 +72,7 @@ def incoming(remote='origin', branch=None): """ if not branch: branch = env.branch - run(("cd %(path)s; git fetch " + remote + " && git log --oneline --pretty=format:'%C(yellow)%h%C(reset) - %s %C(bold blue)<%an>%C(reset)' .." + remote + '/' + branch) % env) + run(("cd %(path)s; git fetch " + remote + " && git log --oneline --pretty=format:'%%C(yellow)%%h%%C(reset) - %%s %%C(bold blue)<%%an>%%C(reset)' .." + remote + '/' + branch) % env) def local_branch_is_dirty(ignore_untracked_files=True):