File tree Expand file tree Collapse file tree
Open diff view settings
Expand file tree Collapse file tree
Open diff view settings
Original file line number Diff line number Diff line change 11import os
22import inspect
33
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'
85
96from git .actor import Actor
107from git .blob import Blob
Original file line number Diff line number Diff line change @@ -51,11 +51,11 @@ def get_dir(self):
5151 return self .git_dir
5252
5353 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 ,
5959 ):
6060 """
6161 Handles executing the command on the shell and consumes and returns
@@ -96,10 +96,10 @@ def execute(self, command,
9696
9797 # Start the process
9898 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
103103 )
104104
105105 # 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):
2828 if hasattr (os , 'link' ) and path .exists (dest ):
2929 os .unlink (dest )
3030 self .copy_file (orig , dest )
31- # _stamp_version(dest)
31+ _stamp_version (dest )
3232
3333def _stamp_version (filename ):
3434 found , out = False , []
3535 f = open (filename , 'r' )
3636 for line in f :
3737 if '__version__ =' in line :
38- line = line .replace ("'svn '" , "'%s'" % VERSION )
38+ line = line .replace ("'git '" , "'%s'" % VERSION )
3939 found = True
4040 out .append (line )
4141 f .close ()
Original file line number Diff line number Diff line change @@ -59,5 +59,5 @@ def test_it_handles_large_input(self):
5959 @patch (Git , 'execute' )
6060 def test_it_ignores_false_kwargs (self , git ):
6161 # 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 33GIT_REPO = os .path .dirname (os .path .dirname (os .path .dirname (__file__ )))
44
55def fixture_path (name ):
6- test_dir = os .path .dirname ( os .path .dirname (__file__ ) )
6+ test_dir = os .path .dirname (os .path .dirname (__file__ ))
77 return os .path .join (test_dir , "fixtures" , name )
88
99def fixture (name ):
You can’t perform that action at this time.
0 commit comments