[Checkins] SVN: grokproject/trunk/ also import automatic creation of svn sandbox and import of the project

Philipp von Weitershausen philikon at philikon.de
Wed Jan 10 15:34:40 EST 2007


Log message for revision 71899:
  also import automatic creation of svn sandbox and import of the project
  (via paste's --svn-repository feature)
  

Changed:
  U   grokproject/trunk/TODO.txt
  U   grokproject/trunk/src/grokproject/__init__.py

-=-
Modified: grokproject/trunk/TODO.txt
===================================================================
--- grokproject/trunk/TODO.txt	2007-01-10 20:02:48 UTC (rev 71898)
+++ grokproject/trunk/TODO.txt	2007-01-10 20:34:39 UTC (rev 71899)
@@ -3,5 +3,3 @@
   parts/instance/bin)
 
 * silence buildout output and be more informative on the other hand
-
-* support svn sandbox creation

Modified: grokproject/trunk/src/grokproject/__init__.py
===================================================================
--- grokproject/trunk/src/grokproject/__init__.py	2007-01-10 20:02:48 UTC (rev 71898)
+++ grokproject/trunk/src/grokproject/__init__.py	2007-01-10 20:34:39 UTC (rev 71899)
@@ -18,9 +18,13 @@
 def main():
     usage = "usage: %prog [options] PROJECT"
     parser = optparse.OptionParser(usage=usage)
-    parser.add_option('--dry-run', action="store_true", dest="dry_run",
+    parser.add_option('--no-buildout', action="store_true", dest="no_buildout",
                       default=False, help="Only create project area, do not "
                       "bootstrap the buildout.")
+    parser.add_option('--svn-repository', dest="repos", default=None,
+                      help="Import project to given repository location (this "
+                      "will also create the standard trunk/ tags/ branches/ "
+                      "hierarchy)")
     options, args = parser.parse_args()
     if len(args) != 1:
         parser.print_usage()
@@ -31,10 +35,14 @@
     commands = command.get_commands()
     cmd = commands['create'].load()
     runner = cmd('create')
-    exit_code = runner.run(['-t', 'grokproject', project])
+
+    extra_args = []
+    if options.repos is not None:
+        extra_args.extend(['--svn-repository', options.repos])
+    exit_code = runner.run(extra_args + ['-t', 'grokproject', project])
     # TODO exit_code
 
-    if options.dry_run:
+    if options.no_buildout:
         return
 
     # bootstrap the buildout



More information about the Checkins mailing list