# HG changeset patch # User catherine@dellzilla # Date 1233699868 18000 # Node ID 582c84365f6aa48f780b88280ade9b0fb86362eb # Parent 6d7eee8ad690b857514211a058fd3da2c3c9b8f7 svn sucks - supporting git instead diff -r 6d7eee8ad690 -r 582c84365f6a sqlpython/sqlpyPlus.py --- a/sqlpython/sqlpyPlus.py Tue Feb 03 16:43:29 2009 -0500 +++ b/sqlpython/sqlpyPlus.py Tue Feb 03 17:24:28 2009 -0500 @@ -619,13 +619,11 @@ do_pull.__doc__ += '\n\nSupported DDL types: ' + supported_ddl_types supported_ddl_types = supported_ddl_types.split(', ') - def _vc(self, arg, opts, program, initializer): - subprocess.call(initializer) - os.chdir(initializer[2]) + def _vc(self, arg, opts, program): + subprocess.call([program, 'init']) opts.dump = True self._pull(arg, opts, vc=[program, 'add']) subprocess.call([program, 'commit', '-m', '"%s"' % opts.message or 'committed from sqlpython']) - os.chdir('..') @options([ make_option('-f', '--full', action='store_true', help='get dependent objects as well'), @@ -635,7 +633,7 @@ def do_hg(self, arg, opts): '''hg (opts) (objects): Stores DDL on disk and puts files under Mercurial version control.''' - self._vc(arg, opts, 'hg', ['hg', 'init', self.sid]) + self._vc(arg, opts, 'hg') @options([ make_option('-f', '--full', action='store_true', help='get dependent objects as well'), @@ -645,19 +643,17 @@ def do_bzr(self, arg, opts): '''bzr (opts) (objects): Stores DDL on disk and puts files under Bazaar version control.''' - self._vc(arg, opts, 'bzr', ['bzr', 'init', self.sid]) + self._vc(arg, opts, 'bzr') @options([ make_option('-f', '--full', action='store_true', help='get dependent objects as well'), make_option('-a', '--all', action='store_true', help="all schemas' objects"), make_option('-x', '--exact', action='store_true', help="match object name exactly"), make_option('-m', '--message', action='store', type='string', dest='message', help="message to save to hg log during commit")]) - def do_svn(self, arg, opts): - '''svn (opts) (objects): - Stores DDL to disk and commits a change to SVN.''' - self._vc(arg, opts, 'svn', ['svnadmin', 'init', self.sid]) - - subprocess.call(['svn', 'commit', '-m', '"%s"' % opts.message or 'committed from sqlpython']) + def do_git(self, arg, opts): + '''git (opts) (objects): + Stores DDL on disk and puts files under git version control.''' + self._vc(arg, opts, 'git') all_users_option = make_option('-a', action='store_const', dest="scope", default={'col':'', 'view':'user', 'schemas':'user', 'firstcol': ''},