Skip to content

Commit 7309c5b

Browse files
committed
Switched to subprocess-style git commands.
Addresses git version incompatibilities, more detail: * gitpython-developers/GitPython#142 * gitpython-developers/GitPython#143
1 parent 77bc1c6 commit 7309c5b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: bizarro/repo.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def __init__(self, remote_tree, local_tree):
88
def start_branch(clone, default_branch_name, new_branch_name):
99
''' Start a new repository branch, push it to origin and return it.
1010
'''
11-
clone.remotes.origin.fetch()
11+
clone.git.fetch('origin')
1212

1313
if 'origin/' + new_branch_name in clone.refs:
1414
start_point = clone.refs['origin/' + new_branch_name].commit
@@ -18,7 +18,7 @@ def start_branch(clone, default_branch_name, new_branch_name):
1818
# Start or update the branch, letting origin override the local repo.
1919
logging.debug('start_branch() start_point is %s' % repr(start_point))
2020
branch = clone.create_head(new_branch_name, commit=start_point, force=True)
21-
clone.remotes.origin.push(new_branch_name)
21+
clone.git.push('origin', new_branch_name)
2222

2323
return branch
2424

@@ -65,15 +65,15 @@ def save_working_file(clone, path, message, base_sha):
6565

6666
try:
6767
# sync: pull --rebase followed by push.
68-
clone.remotes.origin.pull(branch_name, rebase=True)
68+
clone.git.pull('origin', branch_name, rebase=True)
6969

70-
except AssertionError:
70+
except:
7171
# raise the two trees in conflict.
72-
clone.remotes.origin.fetch()
72+
clone.git.fetch('origin')
7373
remote_tree = clone.refs['origin/' + branch_name].commit.tree
7474
raise MergeConflict(remote_tree, new_commit.tree)
7575

7676
else:
77-
clone.remotes.origin.push(clone.active_branch.name)
77+
clone.git.push('origin', clone.active_branch.name)
7878

7979
return clone.active_branch.commit

0 commit comments

Comments
 (0)