diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-03-23 18:30:29 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-03-23 18:30:29 +0000 |
commit | b7d9eadd7996603cb6f5c1e9f844b3531fc8af41 (patch) | |
tree | 2a016e6a7b91c3b6fa66c040d4f8036d286a99ab | |
parent | 68f87d4b837fb1eb45934ceda5de21160a4eb639 (diff) | |
download | morph-b7d9eadd7996603cb6f5c1e9f844b3531fc8af41.tar.gz |
Make "morph edit" work with existing branches, and fix "morph merge" pulling right
-rwxr-xr-x | morph | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -489,7 +489,10 @@ class Morph(cliapp.Application): self._clone_to_directory(new_repo, repo, ref) system_branch = self._deduce_system_branch() - if system_branch != ref: + if system_branch == ref: + self.runcmd(['git', 'checkout', system_branch], + cwd=new_repo) + else: self.runcmd(['git', 'checkout', '-b', system_branch, ref], cwd=new_repo) @@ -508,7 +511,7 @@ class Morph(cliapp.Application): basename = os.path.basename(repo) pull_from = os.path.join(mine, other_branch, basename) repo_dir = os.path.join(mine, this_branch, basename) - self.runcmd(['git', 'pull', pull_from], cwd=repo_dir) + self.runcmd(['git', 'pull', pull_from, other_branch], cwd=repo_dir) def msg(self, msg): '''Show a message to the user about what is going on.''' |