From a07cdbae1d485fd715a5b6eca767f211770fea4d Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Mon, 19 Oct 2009 18:06:19 +0200 Subject: Added remote module and test cases - about to implement remote option handling --- lib/git/repo.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/git/repo.py') diff --git a/lib/git/repo.py b/lib/git/repo.py index c53a4d9b..ddbedd0c 100644 --- a/lib/git/repo.py +++ b/lib/git/repo.py @@ -17,6 +17,7 @@ from actor import Actor from refs import * from objects import * from config import GitConfigParser +from remote import Remote class Repo(object): """ @@ -107,6 +108,13 @@ class Repo(object): ``git.Head[]`` """ return Head.list_items(self) + + @property + def remotes(self): + """ + A list of Remote objects allowing to access and manipulate remotes + """ + return Remote.list_items(self) # alias heads branches = heads -- cgit v1.2.1 From 048acc4596dc1c6d7ed3220807b827056cb01032 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Mon, 19 Oct 2009 18:53:55 +0200 Subject: Added configuration access including tests to remote config: fixed issue that would cause it to abort reading if the file did not exist - this is valid now Test does not work as the configuration parsing does not work as expected - this must be fixed first --- lib/git/repo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/git/repo.py') diff --git a/lib/git/repo.py b/lib/git/repo.py index ddbedd0c..d5cc9782 100644 --- a/lib/git/repo.py +++ b/lib/git/repo.py @@ -149,7 +149,7 @@ class Repo(object): elif config_level == "global": return os.path.expanduser("~/.gitconfig") elif config_level == "repository": - return "%s/config" % self.git.git_dir + return "%s/config" % self.path raise ValueError( "Invalid configuration level: %r" % config_level ) -- cgit v1.2.1