@@ -13,7 +13,7 @@ def test_new_should_raise_on_invalid_repo_location(self):
1313
1414 @raises (NoSuchPathError )
1515 def test_new_should_raise_on_non_existant_path (self ):
16- Repo ("~ /foobar" )
16+ Repo ("repos /foobar" )
1717
1818 def test_description (self ):
1919 assert_equal ("Unnamed repository; edit this file to name it for gitweb." , self .repo .description )
@@ -25,20 +25,20 @@ def test_heads_should_return_array_of_head_objects(self):
2525 @patch (Git , 'method_missing' )
2626 def test_heads_should_populate_head_data (self , git ):
2727 git .return_value = fixture ('for_each_ref' )
28-
28+
2929 head = self .repo .heads [0 ]
3030 assert_equal ('master' , head .name )
3131 assert_equal ('634396b2f541a9f2d58b00be1a07f0c358b999b3' , head .commit .id )
32-
32+
3333 assert_true (git .called )
3434 assert_equal (git .call_args , (('for_each_ref' , 'refs/heads' ), {'sort' : 'committerdate' , 'format' : '%(refname)%00%(objectname)' }))
3535
36- @patch (Git , 'method_missing' )
36+ @patch (Git , 'method_missing' )
3737 def test_commits (self , git ):
3838 git .return_value = fixture ('rev_list' )
39-
39+
4040 commits = self .repo .commits ('master' , 10 )
41-
41+
4242 c = commits [0 ]
4343 assert_equal ('4c8124ffcf4039d292442eeccabdeca5af5c5017' , c .id )
4444 assert_equal (["634396b2f541a9f2d58b00be1a07f0c358b999b3" ], [p .id for p in c .parents ])
@@ -50,10 +50,10 @@ def test_commits(self, git):
5050 assert_equal ("tom@mojombo.com" , c .committer .email )
5151 assert_equal (time .gmtime (1191999972 ), c .committed_date )
5252 assert_equal ("implement Grit#heads" , c .message )
53-
53+
5454 c = commits [1 ]
5555 assert_equal ([], c .parents )
56-
56+
5757 c = commits [2 ]
5858 assert_equal (["6e64c55896aabb9a7d8e9f8f296f426d21a78c2c" , "7f874954efb9ba35210445be456c74e037ba6af2" ], map (lambda p : p .id , c .parents ))
5959 assert_equal ("Merge branch 'site'" , c .message )
@@ -64,120 +64,120 @@ def test_commits(self, git):
6464 @patch (Git , 'method_missing' )
6565 def test_commit_count (self , git ):
6666 git .return_value = fixture ('rev_list_count' )
67-
67+
6868 assert_equal (655 , self .repo .commit_count ('master' ))
69-
69+
7070 assert_true (git .called )
7171 assert_equal (git .call_args , (('rev_list' , 'master' ), {}))
72-
73- @patch (Git , 'method_missing' )
72+
73+ @patch (Git , 'method_missing' )
7474 def test_commit (self , git ):
7575 git .return_value = fixture ('rev_list_single' )
76-
76+
7777 commit = self .repo .commit ('4c8124ffcf4039d292442eeccabdeca5af5c5017' )
78-
78+
7979 assert_equal ("4c8124ffcf4039d292442eeccabdeca5af5c5017" , commit .id )
80-
80+
8181 assert_true (git .called )
8282 assert_equal (git .call_args , (('rev_list' , '4c8124ffcf4039d292442eeccabdeca5af5c5017' ), {'pretty' : 'raw' , 'max_count' : 1 }))
83-
83+
8484 @patch (Git , 'method_missing' )
8585 def test_tree (self , git ):
8686 git .return_value = fixture ('ls_tree_a' )
87-
87+
8888 tree = self .repo .tree ('master' )
89-
89+
9090 assert_equal (4 , len ([c for c in tree .contents if isinstance (c , Blob )]))
9191 assert_equal (3 , len ([c for c in tree .contents if isinstance (c , Tree )]))
92-
92+
9393 assert_true (git .called )
9494 assert_equal (git .call_args , (('ls_tree' , 'master' ), {}))
9595
9696 @patch (Git , 'method_missing' )
9797 def test_blob (self , git ):
9898 git .return_value = fixture ('cat_file_blob' )
99-
99+
100100 blob = self .repo .blob ("abc" )
101101 assert_equal ("Hello world" , blob .data )
102-
102+
103103 assert_true (git .called )
104104 assert_equal (git .call_args , (('cat_file' , 'abc' ), {'p' : True }))
105105
106106 @patch (Repo , '__init__' )
107107 @patch (Git , 'method_missing' )
108108 def test_init_bare (self , repo , git ):
109109 git .return_value = True
110-
111- Repo .init_bare ("~ /foo/bar.git" )
112-
110+
111+ Repo .init_bare ("repos /foo/bar.git" )
112+
113113 assert_true (git .called )
114114 assert_equal (git .call_args , (('init' ,), {}))
115115 assert_true (repo .called )
116- assert_equal (repo .call_args , (('~ /foo/bar.git' ,), {}))
116+ assert_equal (repo .call_args , (('repos /foo/bar.git' ,), {}))
117117
118118 @patch (Repo , '__init__' )
119119 @patch (Git , 'method_missing' )
120120 def test_init_bare_with_options (self , repo , git ):
121121 git .return_value = True
122-
123- Repo .init_bare ("~ /foo/bar.git" , ** {'template' : "/baz/sweet" })
122+
123+ Repo .init_bare ("repos /foo/bar.git" , ** {'template' : "/baz/sweet" })
124124
125125 assert_true (git .called )
126126 assert_equal (git .call_args , (('init' ,), {'template' : '/baz/sweet' }))
127127 assert_true (repo .called )
128- assert_equal (repo .call_args , (('~ /foo/bar.git' ,), {}))
128+ assert_equal (repo .call_args , (('repos /foo/bar.git' ,), {}))
129129
130130 @patch (Repo , '__init__' )
131131 @patch (Git , 'method_missing' )
132132 def test_fork_bare (self , repo , git ):
133133 git .return_value = None
134-
135- self .repo .fork_bare ("~ /foo/bar.git" )
136-
134+
135+ self .repo .fork_bare ("repos /foo/bar.git" )
136+
137137 assert_true (git .called )
138- assert_equal (git .call_args , (('clone' , '%s/.git' % absolute_project_path (), '~ /foo/bar.git' ), {'bare' : True }))
138+ assert_equal (git .call_args , (('clone' , '%s/.git' % absolute_project_path (), 'repos /foo/bar.git' ), {'bare' : True }))
139139 assert_true (repo .called )
140140
141141 @patch (Repo , '__init__' )
142142 @patch (Git , 'method_missing' )
143143 def test_fork_bare_with_options (self , repo , git ):
144144 git .return_value = None
145-
146- self .repo .fork_bare ("~ /foo/bar.git" , ** {'template' : '/awesome' })
147-
145+
146+ self .repo .fork_bare ("repos /foo/bar.git" , ** {'template' : '/awesome' })
147+
148148 assert_true (git .called )
149- assert_equal (git .call_args , (('clone' , '%s/.git' % absolute_project_path (), '~ /foo/bar.git' ),
149+ assert_equal (git .call_args , (('clone' , '%s/.git' % absolute_project_path (), 'repos /foo/bar.git' ),
150150 {'bare' : True , 'template' : '/awesome' }))
151151 assert_true (repo .called )
152152
153153 @patch (Git , 'method_missing' )
154154 def test_diff (self , git ):
155155 self .repo .diff ('master^' , 'master' )
156-
156+
157157 assert_true (git .called )
158158 assert_equal (git .call_args , (('diff' , 'master^' , 'master' , '--' ), {}))
159159
160160 self .repo .diff ('master^' , 'master' , 'foo/bar' )
161161
162162 assert_true (git .called )
163163 assert_equal (git .call_args , (('diff' , 'master^' , 'master' , '--' , 'foo/bar' ), {}))
164-
164+
165165 self .repo .diff ('master^' , 'master' , 'foo/bar' , 'foo/baz' )
166-
166+
167167 assert_true (git .called )
168168 assert_equal (git .call_args , (('diff' , 'master^' , 'master' , '--' , 'foo/bar' , 'foo/baz' ), {}))
169169
170170 @patch (Git , 'method_missing' )
171171 def test_diff (self , git ):
172172 git .return_value = fixture ('diff_p' )
173-
173+
174174 diffs = self .repo .commit_diff ('master' )
175175 assert_equal (15 , len (diffs ))
176176 assert_true (git .called )
177177
178178 def test_archive_tar (self ):
179179 self .repo .archive_tar
180-
180+
181181 def test_archive_tar_gz (self ):
182182 self .repo .archive_tar_gz
183183
@@ -205,9 +205,9 @@ def test_disable_daemon_serve(self):
205205 def test_alternates_no_file (self , os ):
206206 os .return_value = False
207207 assert_equal ([], self .repo .alternates )
208-
208+
209209 assert_true (os .called )
210-
210+
211211 # @patch(os.path, 'exists')
212212 # def test_alternates_setter_ok(self, os):
213213 # os.return_value = True
0 commit comments