summaryrefslogtreecommitdiff
path: root/gbp-create-remote-repo
diff options
context:
space:
mode:
Diffstat (limited to 'gbp-create-remote-repo')
-rwxr-xr-xgbp-create-remote-repo9
1 files changed, 4 insertions, 5 deletions
diff --git a/gbp-create-remote-repo b/gbp-create-remote-repo
index 0653a9c..fa105d1 100755
--- a/gbp-create-remote-repo
+++ b/gbp-create-remote-repo
@@ -28,8 +28,7 @@ import subprocess
import tty, termios
import re
import gbp.deb as du
-from gbp.command_wrappers import (CommandExecFailed, PristineTar, GitCommand,
- GitFetch)
+from gbp.command_wrappers import (CommandExecFailed, PristineTar, GitCommand)
from gbp.config import (GbpOptionParser, GbpOptionGroup)
from gbp.errors import GbpError
from gbp.git import (GitRepositoryError, GitRepository)
@@ -131,10 +130,10 @@ def read_yn():
return False
-def setup_branch_tracking(remote, branches):
+def setup_branch_tracking(repo, remote, branches):
gitRemoteAdd = GitCommand('remote', ['add'])
gitRemoteAdd([remote['name'], remote['url']])
- GitFetch()([remote['name']])
+ repo.fetch(remote['name'])
gitTrackRemote = GitCommand('branch', ['--set-upstream'])
for branch in branches:
gitTrackRemote(['%s' % branch, '%s/%s' % (remote['name'], branch)])
@@ -231,7 +230,7 @@ echo "%(pkg)s packaging" > description
push_branches(remote, branches)
if options.track:
- setup_branch_tracking(remote, branches)
+ setup_branch_tracking(repo, remote, branches)
else:
gbp.log.info("You can now add:")
print_config(remote, branches)