Esempio n. 1
0
def cdm_rtichk(ui, repo, **opts):
    '''check active bug/RFEs for approved RTIs

    Only works on SWAN.'''

    if opts.get('nocheck') or os.path.exists(repo.join('cdm/rtichk.NOT')):
        ui.status('Skipping RTI checks...\n')
        return 0

    if not onSWAN():
        ui.write('RTI checks only work on SWAN, skipping...\n')
        return 0

    parent = wslist[repo].parent(opts.get('parent'))
    active = wslist[repo].active(parent)

    ui.write('RTI check:\n')

    bugs = []

    for com in active.comments():
        match = Comments.isBug(com)
        if match and match.group(1) not in bugs:
            bugs.append(match.group(1))

    # RTI normalizes the gate path for us
    return int(not Rti.rti(bugs, gatePath=parent, output=ui))
Esempio n. 2
0
def cdm_comchk(ui, repo, **opts):
    '''check checkin comments for active files

    Check that checkin comments conform to O/N rules.'''

    active = wslist[repo].active(opts.get('parent'))

    ui.write('Comments check:\n')

    check_db = not opts.get('nocheck')
    return Comments.comchk(active.comments(), check_db=check_db, output=ui)
Esempio n. 3
0
def cdm_comchk(ui, repo, **opts):
    '''check active changeset comment formatting

    Check that active changeset comments conform to O/N rules.

    Each comment line must contain either one bug or ARC case ID
    followed by its synopsis, or credit an external contributor.
    '''

    active = wslist[repo].active(opts.get('parent'))

    ui.write('Comments check:\n')

    check_db = not opts.get('nocheck')
    return Comments.comchk(active.comments(), check_db=check_db, output=ui)
Esempio n. 4
0
def comchk(root, parent, flist, output):
    output.write("Comments:\n")

    return Comments.comchk(git_comments(parent), check_db=True, output=output)
Esempio n. 5
0
def comchk(root, parent, flist, output):
    output.write("Comments:\n")

    return Comments.comchk(git_comments(parent), check_db=True,
                           output=output)
Esempio n. 6
0
	def comchk(self, comments, check_db=False):
		out = StringIO()
		Comments.comchk(comments, check_db=check_db,
				output=out)
		return out.getvalue()