@@ -8,7 +8,7 @@ def __init__(self, remote_tree, local_tree):
8
8
def start_branch (clone , default_branch_name , new_branch_name ):
9
9
''' Start a new repository branch, push it to origin and return it.
10
10
'''
11
- clone .remotes . origin . fetch ()
11
+ clone .git . fetch ('origin' )
12
12
13
13
if 'origin/' + new_branch_name in clone .refs :
14
14
start_point = clone .refs ['origin/' + new_branch_name ].commit
@@ -18,7 +18,7 @@ def start_branch(clone, default_branch_name, new_branch_name):
18
18
# Start or update the branch, letting origin override the local repo.
19
19
logging .debug ('start_branch() start_point is %s' % repr (start_point ))
20
20
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 )
22
22
23
23
return branch
24
24
@@ -65,15 +65,15 @@ def save_working_file(clone, path, message, base_sha):
65
65
66
66
try :
67
67
# sync: pull --rebase followed by push.
68
- clone .remotes . origin . pull (branch_name , rebase = True )
68
+ clone .git . pull ('origin' , branch_name , rebase = True )
69
69
70
- except AssertionError :
70
+ except :
71
71
# raise the two trees in conflict.
72
- clone .remotes . origin . fetch ()
72
+ clone .git . fetch ('origin' )
73
73
remote_tree = clone .refs ['origin/' + branch_name ].commit .tree
74
74
raise MergeConflict (remote_tree , new_commit .tree )
75
75
76
76
else :
77
- clone .remotes . origin . push (clone .active_branch .name )
77
+ clone .git . push ('origin' , clone .active_branch .name )
78
78
79
79
return clone .active_branch .commit
0 commit comments