| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,10 +1,7 @@ | |||
| 1 | 1 | import os | |
| 2 | 2 | import inspect | |
| 3 | 3 | ||
| 4 | - # grab the version information | ||
| 5 | - v = open(os.path.join(os.path.dirname(__file__), '..', '..', 'VERSION')) | ||
| 6 | - __version__ = v.readline().strip() | ||
| 7 | - v.close() | ||
| 4 | + __version__ = 'git' | ||
| 8 | 5 | ||
| 9 | 6 | from git.actor import Actor | |
| 10 | 7 | from git.blob import Blob | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -51,11 +51,11 @@ def get_dir(self): | |||
| 51 | 51 | return self.git_dir | |
| 52 | 52 | ||
| 53 | 53 | def execute(self, command, | |
| 54 | - istream = None, | ||
| 55 | - with_status = False, | ||
| 56 | - with_stderr = False, | ||
| 57 | - with_exceptions = False, | ||
| 58 | - with_raw_output = False, | ||
| 54 | + istream=None, | ||
| 55 | + with_status=False, | ||
| 56 | + with_stderr=False, | ||
| 57 | + with_exceptions=False, | ||
| 58 | + with_raw_output=False, | ||
| 59 | 59 | ): | |
| 60 | 60 | """ | |
| 61 | 61 | Handles executing the command on the shell and consumes and returns | |
@@ -96,10 +96,10 @@ def execute(self, command, | |||
| 96 | 96 | ||
| 97 | 97 | # Start the process | |
| 98 | 98 | proc = subprocess.Popen(command, | |
| 99 | - cwd = self.git_dir, | ||
| 100 | - stdin = istream, | ||
| 101 | - stderr = stderr, | ||
| 102 | - stdout = subprocess.PIPE | ||
| 99 | + cwd=self.git_dir, | ||
| 100 | + stdin=istream, | ||
| 101 | + stderr=stderr, | ||
| 102 | + stdout=subprocess.PIPE | ||
| 103 | 103 | ) | |
| 104 | 104 | ||
| 105 | 105 | # Wait for the process to return | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -28,14 +28,14 @@ def make_release_tree (self, base_dir, files): | |||
| 28 | 28 | if hasattr(os, 'link') and path.exists(dest): | |
| 29 | 29 | os.unlink(dest) | |
| 30 | 30 | self.copy_file(orig, dest) | |
| 31 | - # _stamp_version(dest) | ||
| 31 | + _stamp_version(dest) | ||
| 32 | 32 | ||
| 33 | 33 | def _stamp_version(filename): | |
| 34 | 34 | found, out = False, [] | |
| 35 | 35 | f = open(filename, 'r') | |
| 36 | 36 | for line in f: | |
| 37 | 37 | if '__version__ =' in line: | |
| 38 | - line = line.replace("'svn'", "'%s'" % VERSION) | ||
| 38 | + line = line.replace("'git'", "'%s'" % VERSION) | ||
| 39 | 39 | found = True | |
| 40 | 40 | out.append(line) | |
| 41 | 41 | f.close() | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -59,5 +59,5 @@ def test_it_handles_large_input(self): | |||
| 59 | 59 | @patch(Git, 'execute') | |
| 60 | 60 | def test_it_ignores_false_kwargs(self, git): | |
| 61 | 61 | # this_should_not_be_ignored=False implies it *should* be ignored | |
| 62 | - output = self.git.version( pass_this_kwarg=False ) | ||
| 63 | - assert_true( "pass_this_kwarg" not in git.call_args[1] ) | ||
| 62 | + output = self.git.version(pass_this_kwarg=False) | ||
| 63 | + assert_true("pass_this_kwarg" not in git.call_args[1]) | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,7 +3,7 @@ | |||
| 3 | 3 | GIT_REPO = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) | |
| 4 | 4 | ||
| 5 | 5 | def fixture_path(name): | |
| 6 | - test_dir = os.path.dirname( os.path.dirname(__file__) ) | ||
| 6 | + test_dir = os.path.dirname(os.path.dirname(__file__)) | ||
| 7 | 7 | return os.path.join(test_dir, "fixtures", name) | |
| 8 | 8 | ||
| 9 | 9 | def fixture(name): | |
| Back | FazBrowse Home | New Git URL |
0 commit comments