incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [46/50] git commit: [#4665] Provide working (if inefficient) git merge commands when missing source_branch
Date Mon, 12 Aug 2013 16:41:31 GMT
[#4665] Provide working (if inefficient) git merge commands when missing source_branch

Signed-off-by: Cory Johns <cjohns@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 <cjohns@slashdotmedia.com>
Authored: Wed Aug 7 22:34:45 2013 +0000
Committer: Cory Johns <cjohns@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,


Mime
View raw message