diff options
author | Guido Günther <agx@sigxcpu.org> | 2011-10-22 16:55:47 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2011-10-23 16:20:33 +0200 |
commit | e9e382ef3b26143787aa6d9d0b7a6d5df64c3057 (patch) | |
tree | 48a1980f974434bde8513a86012a3af54b0010fa /gbp-clone | |
parent | 642db87a79ef5e9b5b8f4b20d63bf5e7141d48b2 (diff) |
Replace GitClone by GitRepository.clone()
Diffstat (limited to 'gbp-clone')
-rwxr-xr-x | gbp-clone | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -24,7 +24,7 @@ import sys import os, os.path from gbp.config import (GbpOptionParser, GbpOptionGroup) from gbp.git import (GitRepositoryError, GitRepository) -from gbp.command_wrappers import (GitClone, Command, CommandExecFailed, +from gbp.command_wrappers import (Command, CommandExecFailed, PristineTar) from gbp.errors import GbpError import gbp.log @@ -71,17 +71,13 @@ def main(argv): pass try: - GitClone()([source]) - - (clone, dummy) = os.path.splitext(source.rstrip('/').rsplit('/',1)[1]) - os.chdir(clone) + repo = GitRepository.clone(os.path.curdir, source) + os.chdir(repo.path) # Reparse the config files of the cloned repository so we pick up the # branch information from there: (options, args) = parse_args(argv) - repo = GitRepository(os.path.curdir) - # Track all branches: if options.all: remotes = repo.get_remote_branches() |