comparison svnwrap/svn_swig_wrapper.py @ 83:6c9b7cf1c5aa

push_cmd: delete empty svn directories, refactor directory creation
author Patrick Mezard <pmezard@gmail.com>
date Fri, 14 Nov 2008 16:18:24 -0600
parents 85dcea81f22b
children b033d74be76b
comparison
equal deleted inserted replaced
82:71de43e9f614 83:6c9b7cf1c5aa
267 start = revisions[-1].revnum 267 start = revisions[-1].revnum
268 while len(revisions) > 0: 268 while len(revisions) > 0:
269 yield revisions[0] 269 yield revisions[0]
270 revisions.pop(0) 270 revisions.pop(0)
271 271
272 def commit(self, paths, message, file_data, base_revision, dirs, 272 def commit(self, paths, message, file_data, base_revision, addeddirs,
273 properties, copies): 273 deleteddirs, properties, copies):
274 """Commits the appropriate targets from revision in editor's store. 274 """Commits the appropriate targets from revision in editor's store.
275 """ 275 """
276 self.init_ra_and_client() 276 self.init_ra_and_client()
277 commit_info = [] 277 commit_info = []
278 def commit_cb(_commit_info, pool): 278 def commit_cb(_commit_info, pool):
290 def driver_cb(parent, path, pool): 290 def driver_cb(parent, path, pool):
291 if not parent: 291 if not parent:
292 bat = editor.open_root(edit_baton, base_revision, self.pool) 292 bat = editor.open_root(edit_baton, base_revision, self.pool)
293 batons.append(bat) 293 batons.append(bat)
294 return bat 294 return bat
295 if path in dirs: 295 if path in addeddirs:
296 bat = editor.add_directory(path, parent, None, -1, pool) 296 bat = editor.add_directory(path, parent, None, -1, pool)
297 batons.append(bat)
298 return bat
299 if path in deleteddirs:
300 bat = editor.delete_entry(path, base_revision, parent, pool)
297 batons.append(bat) 301 batons.append(bat)
298 return bat 302 return bat
299 base_text, new_text, action = file_data[path] 303 base_text, new_text, action = file_data[path]
300 compute_delta = True 304 compute_delta = True
301 if action == 'modify': 305 if action == 'modify':