Merge lp:~luoyonggang/subvertpy/closefile into lp:~jelmer/subvertpy/trunk

Proposed by Yonggang Luo
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: 2428
Merged at revision: 2436
Proposed branch: lp:~luoyonggang/subvertpy/closefile
Merge into: lp:~jelmer/subvertpy/trunk
Diff against target: 38 lines (+8/-3)
1 file modified
subvertpy/tests/__init__.py (+8/-3)
To merge this branch: bzr merge lp:~luoyonggang/subvertpy/closefile
Reviewer Review Type Date Requested Status
Jelmer Vernooij Approve
Review via email: mp+95117@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Merged, tweaked. Thanks for the patch.

review: Approve
lp:~luoyonggang/subvertpy/closefile updated
2429. By Yonggang Luo

There is one more file need to be closed.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'subvertpy/tests/__init__.py'
--- subvertpy/tests/__init__.py 2011-11-08 14:41:55 +0000
+++ subvertpy/tests/__init__.py 2012-02-29 10:14:24 +0000
@@ -209,6 +209,11 @@
209 def log_message_func(self, items):209 def log_message_func(self, items):
210 return self.next_message210 return self.next_message
211211
212 def write_file(self, filename, content):
213 f = open(filename, 'w')
214 f.write(content)
215 f.close()
216
212 def make_repository(self, relpath, allow_revprop_changes=True):217 def make_repository(self, relpath, allow_revprop_changes=True):
213 """Create a repository.218 """Create a repository.
214219
@@ -222,11 +227,11 @@
222 if sys.platform == 'win32':227 if sys.platform == 'win32':
223 revprop_hook = os.path.join(abspath, "hooks",228 revprop_hook = os.path.join(abspath, "hooks",
224 "pre-revprop-change.bat")229 "pre-revprop-change.bat")
225 open(revprop_hook, 'w').write("exit 0\n")230 self.write_file(revprop_hook, "exit 0\n")
226 else:231 else:
227 revprop_hook = os.path.join(abspath, "hooks",232 revprop_hook = os.path.join(abspath, "hooks",
228 "pre-revprop-change")233 "pre-revprop-change")
229 open(revprop_hook, 'w').write("#!/bin/sh\n")234 self.write_file(revprop_hook, "#!/bin/sh\n")
230 os.chmod(revprop_hook, os.stat(revprop_hook).st_mode | 0111)235 os.chmod(revprop_hook, os.stat(revprop_hook).st_mode | 0111)
231236
232 if sys.platform == 'win32':237 if sys.platform == 'win32':
@@ -368,7 +373,7 @@
368 os.makedirs(os.path.dirname(f))373 os.makedirs(os.path.dirname(f))
369 except OSError:374 except OSError:
370 pass375 pass
371 open(f, 'w').write(files[f])376 self.write_file(f, files[f])
372377
373 def make_client(self, repospath, clientpath, allow_revprop_changes=True):378 def make_client(self, repospath, clientpath, allow_revprop_changes=True):
374 """Create a repository and a checkout. Return the checkout.379 """Create a repository and a checkout. Return the checkout.

Subscribers

People subscribed via source and target branches

to all changes: