pysvn update with ignore_externals
svn ant task 的update不支持ignore_externals. pysvn 则可以import osimport pysvndef notify(event_dict): action = event_dict["action"] path = event_dict["path"] if action != pysvn.wc_notify_action.update_update \ and action != pysvn.wc_notify_action.update_completed: print '%s %s' % (action, path)def updateWithIgnoreExternals(path): client = pysvn.Client() client.callback_notify = notify for dirpath, dirnames, filenames in os.walk(path): if '.svn' in dirnames: print 'svn updating ' + dirpath print client.update(dirpath, ignore_externals=True) del dirnames[:]updateWithIgnoreExternals('/home/jason/svn')
页:
[1]