summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/git/__init__.py5
-rw-r--r--lib/git/cmd.py18
-rw-r--r--setup.py4
-rw-r--r--test/git/test_git.py4
-rw-r--r--test/testlib/helper.py2
5 files changed, 15 insertions, 18 deletions
diff --git a/lib/git/__init__.py b/lib/git/__init__.py
index 54f77baf..7de5088a 100644
--- a/lib/git/__init__.py
+++ b/lib/git/__init__.py
@@ -1,10 +1,7 @@
import os
import inspect
-# grab the version information
-v = open(os.path.join(os.path.dirname(__file__), '..', '..', 'VERSION'))
-__version__ = v.readline().strip()
-v.close()
+__version__ = 'git'
from git.actor import Actor
from git.blob import Blob
diff --git a/lib/git/cmd.py b/lib/git/cmd.py
index 85d72353..afa13e2c 100644
--- a/lib/git/cmd.py
+++ b/lib/git/cmd.py
@@ -51,11 +51,11 @@ class Git(MethodMissingMixin):
return self.git_dir
def execute(self, command,
- istream = None,
- with_status = False,
- with_stderr = False,
- with_exceptions = False,
- with_raw_output = False,
+ istream=None,
+ with_status=False,
+ with_stderr=False,
+ with_exceptions=False,
+ with_raw_output=False,
):
"""
Handles executing the command on the shell and consumes and returns
@@ -96,10 +96,10 @@ class Git(MethodMissingMixin):
# Start the process
proc = subprocess.Popen(command,
- cwd = self.git_dir,
- stdin = istream,
- stderr = stderr,
- stdout = subprocess.PIPE
+ cwd=self.git_dir,
+ stdin=istream,
+ stderr=stderr,
+ stdout=subprocess.PIPE
)
# Wait for the process to return
diff --git a/setup.py b/setup.py
index 6386f2fb..db22b2ac 100644
--- a/setup.py
+++ b/setup.py
@@ -28,14 +28,14 @@ class sdist(_sdist):
if hasattr(os, 'link') and path.exists(dest):
os.unlink(dest)
self.copy_file(orig, dest)
- # _stamp_version(dest)
+ _stamp_version(dest)
def _stamp_version(filename):
found, out = False, []
f = open(filename, 'r')
for line in f:
if '__version__ =' in line:
- line = line.replace("'svn'", "'%s'" % VERSION)
+ line = line.replace("'git'", "'%s'" % VERSION)
found = True
out.append(line)
f.close()
diff --git a/test/git/test_git.py b/test/git/test_git.py
index b8fa734a..e452e68b 100644
--- a/test/git/test_git.py
+++ b/test/git/test_git.py
@@ -59,5 +59,5 @@ class TestGit(object):
@patch(Git, 'execute')
def test_it_ignores_false_kwargs(self, git):
# this_should_not_be_ignored=False implies it *should* be ignored
- output = self.git.version( pass_this_kwarg=False )
- assert_true( "pass_this_kwarg" not in git.call_args[1] )
+ output = self.git.version(pass_this_kwarg=False)
+ assert_true("pass_this_kwarg" not in git.call_args[1])
diff --git a/test/testlib/helper.py b/test/testlib/helper.py
index 0e3f6bf5..ccc7f0ac 100644
--- a/test/testlib/helper.py
+++ b/test/testlib/helper.py
@@ -3,7 +3,7 @@ import os
GIT_REPO = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
def fixture_path(name):
- test_dir = os.path.dirname( os.path.dirname(__file__) )
+ test_dir = os.path.dirname(os.path.dirname(__file__))
return os.path.join(test_dir, "fixtures", name)
def fixture(name):