commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnue] r9735 - trunk/gnue-common/utils


From: reinhard
Subject: [gnue] r9735 - trunk/gnue-common/utils
Date: Mon, 25 Jun 2007 09:22:46 -0500 (CDT)

Author: reinhard
Date: 2007-06-25 09:22:46 -0500 (Mon, 25 Jun 2007)
New Revision: 9735

Removed:
   trunk/gnue-common/utils/GTest.py
   trunk/gnue-common/utils/README
   trunk/gnue-common/utils/fix-cvsignore
   trunk/gnue-common/utils/fix-encoding.sh
   trunk/gnue-common/utils/generate-tool-schemas.py
   trunk/gnue-common/utils/svn2cl
   trunk/gnue-common/utils/xml2sql/
Modified:
   trunk/gnue-common/utils/release
Log:
Removed some outdated stuff from utils directory.


Deleted: trunk/gnue-common/utils/GTest.py
===================================================================
--- trunk/gnue-common/utils/GTest.py    2007-06-25 13:44:57 UTC (rev 9734)
+++ trunk/gnue-common/utils/GTest.py    2007-06-25 14:22:46 UTC (rev 9735)
@@ -1,163 +0,0 @@
-#!/usr/bin/env python
-# GNU Enterprise Common Testing client 
-#
-# Copyright 2001-2006 Free Software Foundation
-#
-# This file is part of GNU Enterprise.
-#
-# GNU Enterprise is free software; you can redistribute it 
-# and/or modify it under the terms of the GNU General Public 
-# License as published by the Free Software Foundation; either 
-# version 2, or (at your option) any later version.
-#
-# GNU Enterprise is distributed in the hope that it will be 
-# useful, but WITHOUT ANY WARRANTY; without even the implied 
-# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
-# PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public 
-# License along with program; see the file COPYING. If not, 
-# write to the Free Software Foundation, Inc., 59 Temple Place 
-# - Suite 330, Boston, MA 02111-1307, USA.
-#
-# $Id: GTest.py,v 1.6 2003/01/02 00:45:46 jcater Exp $
-
-
-import sys, string, os
-
-def getInput(message, default, responseSet=None):
-  print ""
-  while 1:
-    if default != None:
-      print "%s [%s] " % (message, default),
-    else:
-      print "%s " % (message),
-
-    val = string.strip(sys.stdin.readline())
-    print ""
-
-    if not len(val) and default != None:
-      return default
-    elif responseSet and string.upper(val) in (responseSet):
-      return string.upper(val)
-    elif not responseSet:
-      return val
-
-
-def getYesNo(message, default=None):
-  return getInput(message,default,('Y','N')) == 'Y'
-
-def getNumber(message, default=None):
-  return getInput(message,default,('0','1','2','3','4','5',
-                                   '6','7','8','9')) 
-
-def chooseTest():
-    print """
-GNU Enterprise Framework Tests and Demos:
-=========================================
-
-0)  GNU RPC test (client part)
-    (you have to start the GNU RPC test server first)     
-
-1)  GNU RPC test (server part)
-    (has to be started before you can run choice "0" )
-
-2)  GNU Application Server demo
-    (test the application server directly,
-     i.e no client-server or RPC code)
-
-3)  GNU Application Server RPC demo client
-    (you have to start the application server first;
-     please type 'gacvs' on an other console to start
-     it up.)
-
-4)  GNU Application Server demo (feature enhanced, unofficial version)
-    (you have to setup the database first. Please read
-     gnue/appserver/src/_featuretest/README  for more information.
-     
-9)  quit
-
-"""
-    return getNumber("Your choice:")
-
-
-def runTest(x):
-
-    if x=="0":
-        from gnue.common.commdrivers._test import test
-        print """
-GNU RPC test (client part)
-==========================
-
-0) test proxy (no server needed)
-
-1) test xmlrpc (server needed)
-
-2) test pw_xmlrpc (server needed)
-
-3) test sockets (server needed)
-   (not working)
-        
-        """
-        y=getNumber("Your choice:")
-        if y=="0":
-          test.test_proxy()
-        elif y=="1":
-          test.test_xmlrpc()
-        elif y=="2":
-          test.test_pw_xmlrpc()
-        elif y=="3":          
-          test.test_sockets()
-        else:
-          pass
-        
-    elif x=="1":      
-        from gnue.common.commdrivers._test import server
-        print """
-GNU RPC test (server part)
-==========================
-
-Choose the protocol:
-
-0) xmlrpc
-
-1) pw_xmlrpc
-
-2) test sockets 
-   (not working)
-        
-        """
-        y=getNumber("Your choice:")
-        if y=="0":
-          server.bind_xmlrpc()
-          server.run()
-        elif y=="1":
-          server.bind_pw_xmlrpc()
-          server.run()
-        elif y=="2":
-          server.bind_sockets()
-          server.run()
-        else:
-          pass
-        
-    elif x=="2":
-        from gnue.appserver import test
-        test.run()
-
-    elif x=="3":
-        from gnue.appserver import geasRpcClient
-        geasRpcClient.run()
-    elif x=="4":
-        from gnue.appserver._featuretest import atest
-        atest.run()
-    else:
-        sys.exit()
-        
-    
-if __name__ == "__main__":
-  if len(sys.argv)>1:
-    choice=sys.argv[1]
-  else:
-    choice=chooseTest()
-  
-  runTest(choice)

Deleted: trunk/gnue-common/utils/README
===================================================================
--- trunk/gnue-common/utils/README      2007-06-25 13:44:57 UTC (rev 9734)
+++ trunk/gnue-common/utils/README      2007-06-25 14:22:46 UTC (rev 9735)
@@ -1,24 +0,0 @@
-This directory contains tools. Some are just used by CVS developers and
-some are provided for GNUe users. Some can be used completely apart from
-GNUe.
-
-User tools:
-
-connection.gfd    a GNUe forms file, which provides a form to edit 
-                  GNUe connection.conf configuration files.
-
-
-xml2sql           a framework to convert database schemas stored
-                  in a XML format into database dependent sql.
-                  The conversion is done using XSLT definitions.
-                  The used XML format is called GNUe Schema Definition
-                  format and can be edited by GNUe Designer.
-
-
-CVS developer tools: (if you don't already know what a file in here does,
-                      you don't need to run it ;)
-
-create-technote-index.py   
-po-diff.py 
-create-po.sh 
-setup-win4lin-stage.sh

Deleted: trunk/gnue-common/utils/fix-cvsignore
===================================================================
--- trunk/gnue-common/utils/fix-cvsignore       2007-06-25 13:44:57 UTC (rev 
9734)
+++ trunk/gnue-common/utils/fix-cvsignore       2007-06-25 14:22:46 UTC (rev 
9735)
@@ -1,9 +0,0 @@
-for f in `find . -name '*.pyc'`
-do
-  base=`dirname $f`
-  if [ ! -f $base/.cvsignore ]
-  then
-    echo "*.pyc" > $base/.cvsignore
-    cvs add $base/.cvsignore
-  fi
-done

Deleted: trunk/gnue-common/utils/fix-encoding.sh
===================================================================
--- trunk/gnue-common/utils/fix-encoding.sh     2007-06-25 13:44:57 UTC (rev 
9734)
+++ trunk/gnue-common/utils/fix-encoding.sh     2007-06-25 14:22:46 UTC (rev 
9735)
@@ -1,15 +0,0 @@
-tmp="$1".tmp
-if [ ! -z "$1" ] 
-then 
-
-  cp "$1" "$tmp"
-  echo -n > "$1"
-  if [ `head -1 "$tmp"|grep -c "#!"` -eq 1 ] 
-  then 
-    head -1 "$tmp" > "$1"
-  fi 
-
-  echo "# -*- coding: iso-8859-1 -*-" >> "$1"
-  grep -v "^#!" "$tmp" >> "$1"
-
-fi 

Deleted: trunk/gnue-common/utils/generate-tool-schemas.py
===================================================================
--- trunk/gnue-common/utils/generate-tool-schemas.py    2007-06-25 13:44:57 UTC 
(rev 9734)
+++ trunk/gnue-common/utils/generate-tool-schemas.py    2007-06-25 14:22:46 UTC 
(rev 9735)
@@ -1,111 +0,0 @@
-#!/bin/env python
-#
-# This file is part of GNU Enterprise.
-#
-# GNU Enterprise is free software; you can redistribute it
-# and/or modify it under the terms of the GNU General Public
-# License as published by the Free Software Foundation; either
-# version 2, or (at your option) any later version.
-#
-# GNU Enterprise is distributed in the hope that it will be
-# useful, but WITHOUT ANY WARRANTY; without even the implied
-# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-# PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public
-# License along with program; see the file COPYING. If not,
-# write to the Free Software Foundation, Inc., 59 Temple Place
-# - Suite 330, Boston, MA 02111-1307, USA.
-#
-# Copyright 2001-2006 Free Software Foundation
-#
-#
-# FILE:
-# gnuedtd
-#
-# DESCRIPTION:
-# This script generates a database schema for the client apps based on
-# their GParser markup
-#
-# NOTES:
-#
-
-import sys, string, time
-from gnue.common.definitions import GParser
-from gnue.common.formatting import GTypecast
-from gnue.common.schema.Objects import *
-
-# This is simply to initialize gettext support :(
-from gnue.common.apps import GBaseApp
-
-class GenerateSchema:
-  def __init__ (self, tool, dest=sys.__stdout__):
-
-    if tool == 'reports':
-      from gnue.reports import GRParser, VERSION, PACKAGE
-      xmlElements = GRParser.getXMLelements()
-      topLevelElement = 'report'
-      name = PACKAGE
-      version = VERSION
-
-    elif tool == 'forms':
-      from gnue.forms import GFParser, VERSION, PACKAGE
-      xmlElements = GFParser.getXMLelements()
-      topLevelElement = 'form'
-      name = PACKAGE
-      version = VERSION
-
-    elif tool == 'navigator':
-      from gnue.navigator import GNParser, VERSION, PACKAGE
-      xmlElements = GNParser.getXMLelements()
-      topLevelElement = 'processes'
-      name = PACKAGE
-      version = VERSION
-
-    elif tool == 'schema':
-      from gnue.common.schema import GSParser
-      from gnue.common import VERSION, PACKAGE
-      xmlElements = GSParser.getXMLelements()
-      topLevelElement = 'schema'
-      name = 'GNUe Schema'
-      version = VERSION
-
-    elif tool == 'gnurpc':
-      from gnue.common.commdrivers._parser import Parser
-      xmlElements = Parser.getXMLelements()
-      topLevelElement = 'gnurpc'
-      name = 'GNURPC'
-      from gnue.common import VERSION as version
-
-    else:
-      print "\nSyntax: gnuedtd <forms|reports|schema|navigator|gnurpc> 
[outfile.dtd]\n"
-      sys.exit()
-      
-    # TODO: Is this a good prefix????
-    TABLE_PREFIX = 'gnue_%s_' % tool 
-    PK_FIELD = 'gnue_id'
-    PK_PARENT_FIELD = 'gnue_parent_id'
-
-    schema = GSSchema()
-    tables = GSTables(schema)
-    
-    for tag in xmlElements.keys(): 
-      table = GSTable()
-      fields = GSFields(table)
-      table['name'] = TABLE_PREFIX + tag
-      
-      # Primary key
-      pk = GSField(fields)
-      pk['name'] = 'gnue_id'
-      
-
-
-if len(sys.argv) > 1:
-  try:
-    dest = open(sys.argv[2],'w')
-  except IndexError:
-    dest = sys.stdout
-  GenerateSchema(sys.argv[1], dest)
-  dest.close()
-else:
-  GenerateSchema(None)

Modified: trunk/gnue-common/utils/release
===================================================================
--- trunk/gnue-common/utils/release     2007-06-25 13:44:57 UTC (rev 9734)
+++ trunk/gnue-common/utils/release     2007-06-25 14:22:46 UTC (rev 9735)
@@ -10,10 +10,12 @@
 
 package=$(basename $(pwd) | sed -e 's/gnue-//')
 version=$(gcvs -c "import src; print src.version.get_version()")
+major=$(gcvs -c "import src; print src.version.major")
+minor=$(gcvs -c "import src; print src.version.minor")
 phase=$(gcvs -c "import src; print src.version.phase")
 build=$(gcvs -c "import src; print src.version.build")
 
-echo "$(date --iso-8601=seconds) Releasing gnue-$package $version"
+echo "$(date --iso-8601=seconds) Building gnue-$package $version"
 
 # Update svn so we don't forget any changes
 echo "$(date --iso-8601=seconds) Updating svn"
@@ -40,7 +42,7 @@
 
 # Commit to svn
 echo "$(date --iso-8601=seconds) Committing svn"
-svn commit --message "Released ${version}."
+svn commit --message "Built ${version}."
 
 # Wait for firewall
 sleep 20
@@ -68,8 +70,8 @@
 # Tag subversion
 if [ "$phase" == "final" -a "$build" == "0" ]; then
   echo "$(date --iso-8601=seconds) Creating release tag in svn"
-  svn copy --message "Released ${version}." . \
-    svn+ssh://svn.gnuenterprise.org/var/svn/gnue/tags/$package-$version
+  svn copy --message "Released ${package}-${major}.${minor}" . \
+    
svn+ssh://svn.gnuenterprise.org/var/svn/gnue/tags/${package}-${major}.${minor}
 fi
 
 # Post documentation to web page

Deleted: trunk/gnue-common/utils/svn2cl
===================================================================
--- trunk/gnue-common/utils/svn2cl      2007-06-25 13:44:57 UTC (rev 9734)
+++ trunk/gnue-common/utils/svn2cl      2007-06-25 14:22:46 UTC (rev 9735)
@@ -1,137 +0,0 @@
-#!/usr/bin/env python
-
-"""
-Script that generates ChangeLog file much like the old cvs2cl script.
-
-Syntax:
-  svn2cl [output]
-
-If run with no arguments, output is written to stdout. If <output>
-is specified, output is written to that file instead.
-"""
-SVNCMD="svn log -v --xml"
-
-import xml.parsers.expat
-import tempfile, os, sys, string
-
-
-class Parser:
-  def __init__(self, input, output):
-
-    self.out = output
-    self.package = os.path.basename (os.getcwd ())
-
-    p = xml.parsers.expat.ParserCreate()
-
-    p.StartElementHandler = self.start_element
-    p.EndElementHandler = self.end_element
-    p.CharacterDataHandler = self.char_data
-    p.ParseFile(input)
-
-    self.paths = []
-    self.revision = ""
-
-  # 3 handler functions
-  def start_element(self, name, attrs):
-    self.text = ""
-    if name == "logentry":
-      self.revision = attrs['revision']
-    elif name == "paths":
-      self.paths = []
-
-  def end_element(self, name):
-    if name == "logentry":
-      self.out.write("\n")
-    elif name == "author":
-      self.author = self.text
-    elif name == "path":
-      p = string.split (self.text, '/', 3)
-      if len (p) == 4:
-        if p [2] == self.package:
-          self.paths.append (p [3])
-    elif name == "msg":
-      self.out.write("%s  Rev %s  %s\n\n" % (
-             self.date,
-             string.ljust(self.revision,5),
-             self.author))
-      self.out.write("\t* %s" % linewrap("%s: %s" % (string.join(self.paths,', 
'), self.text)))
-    elif name == "date":
-      self.date = self.text[:10] + ' ' + self.text[11:19]
-
-
-  def char_data(self, data):
-    self.text += data.encode('ascii',"replace")
-
-
-def linewrap(message,maxWidth=68,indent = "\t  "):
-
-  text = ""
-
-  temptext = string.strip(str(message))
-  #buff = string.split(temptext,"\n")
-  buff = string.split(temptext.replace('\n\n','\r').replace('\n',' '),'\r')
-  first = 1
-
-  for strings in buff:
-    while len(strings) > maxWidth:
-      index = 0
-
-      for sep in [' ',',',':','.',';']:
-        ind = string.rfind(strings,sep,0,maxWidth-1)+1
-        if ind > index: index = ind
-
-      if index > maxWidth or index==0:
-        index = maxWidth-1
-
-      line = strings[:index]
-      if not first:
-        text += indent
-      text += "%s\n" % line
-      strings = strings[index:].strip()
-
-      first = 0
-    line = strings
-    if not first:
-      text += indent
-    text += "%s\n" % line
-    first = 0
-
-
-  return text
-
-
-
-if __name__ == '__main__':
-  filename = tempfile.mktemp('xml')
-  if os.system(SVNCMD + '> %s' % filename):
-    print "Unable to retrieve svn log"
-    sys.exit(1)
-
-  inp = open(filename)
-
-  # Get output destination... either
-  # stdout or first arg of command line
-  try:
-    out = open(sys.argv[1],'w')
-    close = 1
-  except IndexError:
-    out = sys.stdout
-    close = 0
-
-  try:
-    Parser(inp, out)
-  except:
-    try:
-      inp.close()
-      os.unlink(filename)
-      if close:
-        out.close()
-    except:
-      pass
-    raise
-
-  # Clean up input/output files
-  inp.close()
-  os.unlink(filename)
-  if close:
-    out.close()





reply via email to

[Prev in Thread] Current Thread [Next in Thread]