summaryrefslogtreecommitdiff
path: root/git/db/interface.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2011-06-07 12:26:29 +0200
committerSebastian Thiel <byronimo@gmail.com>2011-06-07 12:26:29 +0200
commit09517bd78660ee3fbd6716c920c36b967f7a71cf (patch)
treef74f0e5f41a3a9ef1027d4fb1b8db873160a514f /git/db/interface.py
parent63a0bbe14d0b5b3a29f9647f4089604d8436458e (diff)
downloadgitpython-09517bd78660ee3fbd6716c920c36b967f7a71cf.tar.gz
clone and clone_from methods now support the RemoteProgress interface, using similar functionality as used by the fetch, push and pull methods
Diffstat (limited to 'git/db/interface.py')
-rw-r--r--git/db/interface.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/git/db/interface.py b/git/db/interface.py
index 1a22bb7d..a7502e85 100644
--- a/git/db/interface.py
+++ b/git/db/interface.py
@@ -304,7 +304,7 @@ class TransportDB(object):
as well, these are assumed to resovle to a meaningful string though.
:param refspecs: iterable of reference specifiers or RefSpec instance,
identifying the references to be fetch from the remote.
- :param progress: callable which receives progress messages for user consumption
+ :param progress: RemoteProgress derived instance which receives progress messages for user consumption or None
:param kwargs: may be used for additional parameters that the actual implementation could
find useful.
:return: List of FetchInfo compatible instances which provide information about what
@@ -746,19 +746,24 @@ class HighLevelRepository(object):
of this class"""
raise NotImplementedError()
- def clone(self, path):
+ def clone(self, path, progress = None):
"""Create a clone from this repository.
:param path:
is the full path of the new repo (traditionally ends with ./<name>.git).
+ :param progress:
+ a RemoteProgress instance or None if no progress information is required
+
:return: ``git.Repo`` (the newly cloned repo)"""
raise NotImplementedError()
@classmethod
- def clone_from(cls, url, to_path):
+ def clone_from(cls, url, to_path, progress = None):
"""Create a clone from the given URL
:param url: valid git url, see http://www.kernel.org/pub/software/scm/git/docs/git-clone.html#URLS
:param to_path: Path to which the repository should be cloned to
+ :param progress:
+ a RemoteProgress instance or None if no progress information is required
:return: instance pointing to the cloned directory with similar capabilities as this class"""
raise NotImplementedError()