You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2013/08/12 18:41:31 UTC
[46/50] git commit: [#4665] Provide working (if inefficient) git
merge commands when missing source_branch
[#4665] Provide working (if inefficient) git merge commands when missing source_branch
Signed-off-by: Cory Johns <cj...@slashdotmedia.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/6711c10a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/6711c10a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/6711c10a
Branch: refs/heads/cj/6422
Commit: 6711c10a2e55ab3edc31bf14ab511e9eaa7dc746
Parents: 37b8fff
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Wed Aug 7 22:34:45 2013 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Wed Aug 7 22:35:27 2013 +0000
----------------------------------------------------------------------
ForgeGit/forgegit/model/git_repo.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/6711c10a/ForgeGit/forgegit/model/git_repo.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/model/git_repo.py b/ForgeGit/forgegit/model/git_repo.py
index a982b2b..e0e47b8 100644
--- a/ForgeGit/forgegit/model/git_repo.py
+++ b/ForgeGit/forgegit/model/git_repo.py
@@ -84,11 +84,12 @@ class Repository(M.Repository):
merge_request.source_branch,
)
else:
- fetch_command = 'git fetch {} {} # warning: '\
- 'no source branch specified'.format(
- merge_request.downstream_repo_url,
- '<source_branch>',
- )
+ fetch_command = (
+ 'git remote add merge_request {}\n'
+ 'git fetch merge_request'
+ ).format(
+ merge_request.downstream_repo_url,
+ )
return 'git checkout %s\n%s\ngit merge %s' % (
merge_request.target_branch,
fetch_command,