diff options
author | John Keeping <john@keeping.me.uk> | 2013-09-07 17:19:29 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-09-09 08:13:07 -0700 |
commit | ae34ac126fa609fb17955b02c685d7de164b4e54 (patch) | |
tree | a960163cdd91f664dcf76bf18dd505f9d517f7e9 /git_remote_helpers/git/non_local.py | |
parent | d2dbd399fa03b37ce797ed6fc609574a7e677079 (diff) | |
download | git-ae34ac126fa609fb17955b02c685d7de164b4e54.tar.gz |
git_remote_helpers: remove little used Python libraryjk/remove-remote-helpers-in-python
When it was originally added, the git_remote_helpers library was used as
part of the tests of the remote-helper interface, but since commit
fc407f9 (Add new simplified git-remote-testgit, 2012-11-28) a simple
shell script is used for this.
A search on Ohloh [1] indicates that this library isn't used by any
external projects and even the Python remote helpers in contrib/ don't
use this library, so it is only used by its own test suite.
Since this is the only Python library in Git, removing it will make
packaging easier as the Python scripts only need to be installed for one
version of Python, whereas the library should be installed for all
available versions.
[1] http://code.ohloh.net/search?s=%22git_remote_helpers%22
Signed-off-by: John Keeping <john@keeping.me.uk>
Acked-by: Sverre Rabbelier <srabbelier@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git_remote_helpers/git/non_local.py')
-rw-r--r-- | git_remote_helpers/git/non_local.py | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/git_remote_helpers/git/non_local.py b/git_remote_helpers/git/non_local.py deleted file mode 100644 index e70025095d..0000000000 --- a/git_remote_helpers/git/non_local.py +++ /dev/null @@ -1,61 +0,0 @@ -import os -import subprocess - -from git_remote_helpers.util import check_call, die, warn - - -class NonLocalGit(object): - """Handler to interact with non-local repos. - """ - - def __init__(self, repo): - """Creates a new non-local handler for the specified repo. - """ - - self.repo = repo - - def clone(self, base): - """Clones the non-local repo to base. - - Does nothing if a clone already exists. - """ - - path = os.path.join(self.repo.get_base_path(base), '.git') - - # already cloned - if os.path.exists(path): - return path - - os.makedirs(path) - args = ["git", "clone", "--bare", "--quiet", self.repo.gitpath, path] - - check_call(args) - - return path - - def update(self, base): - """Updates checkout of the non-local repo in base. - """ - - path = os.path.join(self.repo.get_base_path(base), '.git') - - if not os.path.exists(path): - die("could not find repo at %s", path) - - args = ["git", "--git-dir=" + path, "fetch", "--quiet", self.repo.gitpath] - check_call(args) - - args = ["git", "--git-dir=" + path, "update-ref", "refs/heads/master", "FETCH_HEAD"] - child = check_call(args) - - def push(self, base): - """Pushes from the non-local repo to base. - """ - - path = os.path.join(self.repo.get_base_path(base), '.git') - - if not os.path.exists(path): - die("could not find repo at %s", path) - - args = ["git", "--git-dir=" + path, "push", "--quiet", self.repo.gitpath, "--all"] - child = check_call(args) |