[meld] Teach git support about .git as a file (closes bgo#589640)
- From: Kai Willadsen <kaiw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [meld] Teach git support about .git as a file (closes bgo#589640)
- Date: Sun, 13 Sep 2009 10:08:14 +0000 (UTC)
commit 2a5a309ffd3a215ca99e53a2c0d6ba99761e7f2d
Author: Geoffrey Irving <irving naml us>
Date: Fri Jul 24 14:49:45 2009 -0400
Teach git support about .git as a file (closes bgo#589640)
Instead of being a directory, .git can be a file containing "gitdir: ...",
so replace os.path.isdir with os.path.exists.
meld/vc/git.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/meld/vc/git.py b/meld/vc/git.py
index 3f51e22..833b9b2 100644
--- a/meld/vc/git.py
+++ b/meld/vc/git.py
@@ -47,6 +47,12 @@ class Vc(_vc.CachedVc):
"unmerged": _vc.STATE_CONFLICT,
}
+ def check_repo_root(self, location):
+ # Check exists instead of isdir, since .git might be a git-file
+ if not os.path.exists(os.path.join(location, self.VC_DIR)):
+ raise ValueError
+ return location
+
def commit_command(self, message):
return [self.CMD,"commit","-m",message]
def diff_command(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]