コード例 #1
0
ファイル: branchdiff.py プロジェクト: altoid/schemadiff
def get_schema_for_branch(p4, filespec, branch):
    p4_ts = bss_date(p4, branch)
    version = "%(filespec)s@%(ts)s" % {
        "filespec" : filespec,
        "ts" : p4_ts }

    logging.debug("filespec:  %s" % version)
    return schemadiff.get_schema_from_filespec(p4, version)
コード例 #2
0
ファイル: specdiff.py プロジェクト: altoid/schemadiff
    oldspec = args.oldspec
    newspec = args.newspec
    dmlfile = args.dmlfile

    p4 = P4.P4()
    conn = None
    cursor = None

    try:
        schemadiff.log_in_to_p4(p4)

        conn = dsn.getConnection()
        cursor = conn.cursor()

        schema1 = schemadiff.get_schema_from_filespec(p4, oldspec)
        schema2 = schemadiff.get_schema_from_filespec(p4, newspec)

        schemadiff.diff_schemas(cursor,
                                schema1,
                                schema2,
                                "specdiff_old",
                                "specdiff_new",
                                dmlfile=dmlfile,
                                validate=validate)

    except P4.P4Exception as p4e:
        logging.error(p4e)

        for e in p4.warnings:
            logging.warning(e)