Changeset 4452:26d0461ceb6f in livinglogic.python.xist

Show
Ignore:
Timestamp:
04/07/11 17:53:47 (8 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Docstring for oradiff. Fix typo in various script docstrings.

Location:
src/ll/orasql/scripts
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • src/ll/orasql/scripts/oracreate.py

    r4447 r4452  
    2929 
    3030    ``-v``, ``--verbose`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
    31         Produces output (on stderr) while to datebase is read or written. 
     31        Produces output (on stderr) while to database is read or written. 
    3232 
    3333    ``-c``, ``--color`` : ``yes``, ``no`` or ``auto`` 
     
    4646 
    4747    ``-k``, ``--keepjunk`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
    48         If given, database objects that have ``$`` or ``SYS_EXPORT_SCHEMA_`` in 
     48        If true, database objects that have ``$`` or ``SYS_EXPORT_SCHEMA_`` in 
    4949        their name will be skipped (otherwise these objects will be included). 
    5050 
    5151    ``-i``, ``--ignore`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
    52         If given, errors occuring while the database is read or written will be 
     52        If true, errors occuring while the database is read or written will be 
    5353        ignored. 
    5454 
  • src/ll/orasql/scripts/oradelete.py

    r4447 r4452  
    2929 
    3030    ``-v``, ``--verbose`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
    31         Produces output (on stderr) while to datebase is read or written. 
     31        Produces output (on stderr) while to database is read or written. 
    3232 
    3333    ``-c``, ``--color`` : ``yes``, ``no`` or ``auto`` 
  • src/ll/orasql/scripts/oradiff.py

    r4422 r4452  
    1010 
    1111 
     12""" 
     13Purpose 
     14------- 
     15 
     16``oradiff`` can be used to find the difference between two Oracle database schemas. 
     17 
     18 
     19Options 
     20------- 
     21 
     22``oradiff`` supports the following options: 
     23 
     24    ``connectstring1`` 
     25        Oracle connectstring for the first database schema. 
     26 
     27    ``connectstring2`` 
     28        Oracle connectstring for the second database schema. 
     29 
     30    ``-v``, ``--verbose`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
     31        Produces output (on stderr) while to database is read. 
     32 
     33    ``-c``, ``--color`` : ``yes``, ``no`` or ``auto`` 
     34        Should the output (when the ``-v`` option is used) be colored. If ``auto`` 
     35        is specified (the default) then the output is colored if stderr is a 
     36        terminal. 
     37 
     38    ``-m``, ``--mode`` : ``brief``, ``udiff`` or ``full`` 
     39        Specifies how the differences should be shown. ``brief`` only prints 
     40        whether objects are different (or which ones exist in one of the databases); 
     41        ``udiff`` outputs the differences in "unified diff" format and ``full`` 
     42        outputs the object from the second schema if they differ (i.e. it outputs 
     43        the script that must be executed to copy the differences from schema 2 
     44        to schema 1). 
     45 
     46    ``-n``, ``--context`` : integer 
     47        The number of context lines in unified diff mode (i.e. the number of 
     48        unchanged lines above and below each block of changes; the default is 2) 
     49 
     50    ``-k``, ``--keepjunk`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
     51        If true (the default), database objects that have ``$`` or 
     52        ``SYS_EXPORT_SCHEMA_`` in their name will be skipped (otherwise these 
     53        objects will be included in the output). 
     54 
     55    ``-b``, ``--blank`` : ``literal``, ``trail``, ``lead``, ``both`` or ``collapse`` 
     56        The ``-b`` option specifies how whitespace in the database objects should 
     57        be compared. With ``literal`` all whitespace is significant, with ``trail`` 
     58        trailing whitespace will be ignore, with ``lead`` leading whitespace will 
     59        be ignored, with ``both`` trailing and leading whitespace will be ignored 
     60        and with ``collapse`` trailing and leading whitespace will be ignored and 
     61        stretches of whitespace will be treated as a single space. 
     62 
     63    ``-e``, ``--encoding`` : encoding 
     64        The encoding of the output (default is ``utf-8``). 
     65 
     66Example 
     67------- 
     68 
     69Compare the schemas ``user@db`` and ``user2@db2``, collapsing whitespace and 
     70using unified diff mode with 5 context lines:: 
     71 
     72    $ oradiff user/pwd@db user2/pwd2@db2 -bcollapse -mudiff -n5 -v >db.diff 
     73""" 
     74 
     75 
    1276import sys, os, difflib, argparse 
    1377 
    1478from ll import misc, orasql, astyle 
     79 
     80 
     81__docformat__ = "reStructuredText" 
    1582 
    1683 
     
    112179def main(args=None): 
    113180    p = argparse.ArgumentParser(description="compare two Oracle database schemas") 
    114     p.add_argument("connectionstring1", help="First schema") 
    115     p.add_argument("connectionstring2", help="Second schema") 
     181    p.add_argument("connectstring1", help="First schema") 
     182    p.add_argument("connectstring2", help="Second schema") 
    116183    p.add_argument("-v", "--verbose", dest="verbose", help="Give a progress report? (default %(default)s)", default=False, action=misc.FlagAction) 
    117184    p.add_argument("-c", "--color", dest="color", help="Color output (default %(default)s)", default="auto", choices=("yes", "no", "auto")) 
     
    133200    stderr = astyle.Stream(sys.stderr, color) 
    134201 
    135     connection1 = orasql.connect(args.connectionstring1) 
    136     connection2 = orasql.connect(args.connectionstring2) 
     202    connection1 = orasql.connect(args.connectstring1) 
     203    connection2 = orasql.connect(args.connectstring2) 
    137204 
    138205    def fetch(connection): 
  • src/ll/orasql/scripts/oradrop.py

    r4447 r4452  
    2929 
    3030    ``-v``, ``--verbose`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
    31         Produces output (on stderr) while to datebase is read or written. 
     31        Produces output (on stderr) while to database is read or written. 
    3232 
    3333    ``-c``, ``--color`` : ``yes``, ``no`` or ``auto`` 
     
    4848 
    4949    ``-k``, ``--keepjunk`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
    50         If given, database objects that have ``$`` or ``SYS_EXPORT_SCHEMA_`` in 
    51         their name will be skipped (otherwise these objects will be included in 
    52         the output). 
     50        If true (the default), database objects that have ``$`` or 
     51        ``SYS_EXPORT_SCHEMA_`` in their name will be skipped (otherwise these 
     52        objects will be included in the output). 
    5353 
    5454    ``-i``, ``--ignore`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
    55         If given, errors occuring while the database is read or written will be 
     55        If true, errors occuring while the database is read or written will be 
    5656        ignored. 
    5757 
  • src/ll/orasql/scripts/orafind.py

    r4451 r4452  
    3434         
    3535    ``-v``, ``--verbose`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
    36         Produces output (on stderr) while to datebase is read or written. 
     36        Produces output (on stderr) while to database is read or written. 
    3737 
    3838    ``-c``, ``--color`` : ``yes``, ``no`` or ``auto`` 
  • src/ll/orasql/scripts/oragrant.py

    r4450 r4452  
    2727 
    2828    ``-v``, ``--verbose`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
    29         Produces output (on stderr) while to datebase is read or written. 
     29        Produces output (on stderr) while to database is read or written. 
    3030 
    3131    ``-c``, ``--color`` : ``yes``, ``no`` or ``auto`` 
     
    3939 
    4040    ``-k``, ``--keepjunk`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
    41         If given, database objects that have ``$`` or ``SYS_EXPORT_SCHEMA_`` in 
    42         their name will be skipped (otherwise these objects will be included). 
     41        If true (the default), database objects that have ``$`` or 
     42        ``SYS_EXPORT_SCHEMA_`` in their name will be skipped (otherwise these 
     43        objects will be included in the output). 
    4344 
    4445    ``-i``, ``--ignore`` : ``false``, ``no``, ``0``, ``true``, ``yes`` or ``1`` 
    45         If given, errors occuring while the database is read or written will be 
     46        If true, errors occuring while the database is read or written will be 
    4647        ignored. 
    4748