comparison svnwrap/svn_swig_wrapper.py @ 20:2953c867ca99

Minor fixes to the push command to make it more robust.
author Augie Fackler <durin42@gmail.com>
date Wed, 08 Oct 2008 16:44:40 -0500
parents dfdc078661db
children c4523e651325
comparison
equal deleted inserted replaced
19:1267b1944cd7 20:2953c867ca99
54 def __init__(self, revnum, author, message, date, paths, strip_path=''): 54 def __init__(self, revnum, author, message, date, paths, strip_path=''):
55 self.revnum, self.author, self.message = revnum, author, message 55 self.revnum, self.author, self.message = revnum, author, message
56 # TODO parse this into a datetime 56 # TODO parse this into a datetime
57 self.date = date 57 self.date = date
58 self.paths = {} 58 self.paths = {}
59 for p in paths: 59 if paths:
60 self.paths[p[len(strip_path):]] = paths[p] 60 for p in paths:
61 self.paths[p[len(strip_path):]] = paths[p]
61 62
62 def __str__(self): 63 def __str__(self):
63 return 'r%d by %s' % (self.revnum, self.author) 64 return 'r%d by %s' % (self.revnum, self.author)
64 65
65 class SubversionRepo(object): 66 class SubversionRepo(object):
251 commit_info.append(_commit_info) 252 commit_info.append(_commit_info)
252 editor, edit_baton = ra.get_commit_editor2(self.ra, 253 editor, edit_baton = ra.get_commit_editor2(self.ra,
253 message, 254 message,
254 commit_cb, 255 commit_cb,
255 None, 256 None,
256 False) 257 False,
258 self.pool)
257 checksum = [] 259 checksum = []
258 def driver_cb(parent, path, pool): 260 def driver_cb(parent, path, pool):
259 if path in dirs: 261 if path in dirs:
260 return editor.add_directory(path, parent, None, -1, pool) 262 return editor.add_directory(path, parent, None, -1, pool)
261 base_text, new_text, action = file_data[path] 263 base_text, new_text, action = file_data[path]