Lines 519-530
Link Here
|
519 |
|
519 |
|
520 |
def caterror(mycat): |
520 |
def caterror(mycat): |
521 |
err(mycat+" is not an official category. Skipping QA checks in this directory.\nPlease ensure that you add "+catdir+" to "+repodir+"/profiles/categories\nif it is a new category.") |
521 |
err(mycat+" is not an official category. Skipping QA checks in this directory.\nPlease ensure that you add "+catdir+" to "+repodir+"/profiles/categories\nif it is a new category.") |
522 |
if mymode == "manifest": |
|
|
523 |
pass |
524 |
elif "--pretend" in myoptions: |
525 |
print green("\nRepoMan does a once-over of the neighborhood...") |
526 |
elif quiet < 1: |
527 |
print green("\nRepoMan scours the neighborhood...") |
528 |
|
522 |
|
529 |
def parse_use_local_desc(mylines, usedict=None): |
523 |
def parse_use_local_desc(mylines, usedict=None): |
530 |
"""returns a dict of the form {cpv:set(flags)}""" |
524 |
"""returns a dict of the form {cpv:set(flags)}""" |
Lines 746-751
Link Here
|
746 |
return True |
740 |
return True |
747 |
return False |
741 |
return False |
748 |
|
742 |
|
|
|
743 |
if mymode == "commit": |
744 |
retval = ("","") |
745 |
if isCvs: |
746 |
print |
747 |
print "Performing a " + green("cvs -n up") + \ |
748 |
" with a little magic grep to check for updates." |
749 |
retval = getstatusoutput("/usr/bin/cvs -n up 2>&1 | " + \ |
750 |
"egrep '^[^\?] .*' | " + \ |
751 |
"egrep -v '^. .*/digest-[^/]+|^cvs server: .* -- ignored$'") |
752 |
|
753 |
mylines = retval[1].splitlines() |
754 |
myupdates = [] |
755 |
for x in mylines: |
756 |
if not x: |
757 |
continue |
758 |
if x[0] not in "UPMAR": # Updates,Patches,Modified,Added,Removed |
759 |
print red("!!! Please fix the following issues reported " + \ |
760 |
"from cvs: ")+green("(U,P,M,A,R are ok)") |
761 |
print red("!!! Note: This is a pretend/no-modify pass...") |
762 |
print retval[1] |
763 |
print |
764 |
sys.exit(1) |
765 |
elif x[0] in "UP": |
766 |
myupdates.append(x[2:]) |
767 |
|
768 |
if myupdates: |
769 |
print green("Fetching trivial updates...") |
770 |
if "--pretend" in myoptions: |
771 |
print "(/usr/bin/cvs up "+" ".join(myupdates)+")" |
772 |
retval = os.EX_OK |
773 |
else: |
774 |
retval = os.system("/usr/bin/cvs up " + " ".join(myupdates)) |
775 |
if retval != os.EX_OK: |
776 |
print "!!! cvs exited with an error. Terminating." |
777 |
sys.exit(retval) |
778 |
|
779 |
if mymode == "manifest": |
780 |
pass |
781 |
elif "--pretend" in myoptions: |
782 |
print green("\nRepoMan does a once-over of the neighborhood...") |
783 |
elif quiet < 1: |
784 |
print green("\nRepoMan scours the neighborhood...") |
785 |
|
749 |
dofail = 0 |
786 |
dofail = 0 |
750 |
arch_caches={} |
787 |
arch_caches={} |
751 |
arch_xmatch_caches = {} |
788 |
arch_xmatch_caches = {} |
Lines 1592-1636
Link Here
|
1592 |
print |
1629 |
print |
1593 |
sys.exit(1) |
1630 |
sys.exit(1) |
1594 |
|
1631 |
|
1595 |
retval=["",""] |
|
|
1596 |
if isCvs: |
1632 |
if isCvs: |
1597 |
print "Performing a "+green("cvs -n up")+" with a little magic grep to check for updates." |
|
|
1598 |
retval=getstatusoutput("/usr/bin/cvs -n up 2>&1 | egrep '^[^\?] .*' | egrep -v '^. .*/digest-[^/]+|^cvs server: .* -- ignored$'") |
1599 |
|
1600 |
mylines=retval[1].split("\n") |
1601 |
myupdates=[] |
1602 |
for x in mylines: |
1603 |
if not x: |
1604 |
continue |
1605 |
if x[0] not in "UPMAR": # Updates,Patches,Modified,Added,Removed |
1606 |
print red("!!! Please fix the following issues reported from cvs: ")+green("(U,P,M,A,R are ok)") |
1607 |
print red("!!! Note: This is a pretend/no-modify pass...") |
1608 |
print retval[1] |
1609 |
print |
1610 |
sys.exit(1) |
1611 |
elif x[0] in ["U","P"]: |
1612 |
myupdates+=[x[2:]] |
1613 |
|
1614 |
if myupdates: |
1615 |
print green("Fetching trivial updates...") |
1616 |
if "--pretend" in myoptions: |
1617 |
print "(/usr/bin/cvs up "+" ".join(myupdates)+")" |
1618 |
retval=0 |
1619 |
else: |
1620 |
retval=os.system("/usr/bin/cvs up "+" ".join(myupdates)) |
1621 |
if retval!=0: |
1622 |
print "!!! cvs exited with an error. Terminating." |
1623 |
sys.exit(retval) |
1624 |
|
1625 |
if isCvs: |
1626 |
mycvstree=cvstree.getentries("./",recursive=1) |
1633 |
mycvstree=cvstree.getentries("./",recursive=1) |
1627 |
mychanged=cvstree.findchanged(mycvstree,recursive=1,basedir="./") |
1634 |
mychanged=cvstree.findchanged(mycvstree,recursive=1,basedir="./") |
1628 |
mynew=cvstree.findnew(mycvstree,recursive=1,basedir="./") |
1635 |
mynew=cvstree.findnew(mycvstree,recursive=1,basedir="./") |
1629 |
myremoved=cvstree.findremoved(mycvstree,recursive=1,basedir="./") |
1636 |
myremoved=cvstree.findremoved(mycvstree,recursive=1,basedir="./") |
1630 |
if not (mychanged or mynew or myremoved): |
1637 |
if not (mychanged or mynew or myremoved): |
|
|
1638 |
print green("RepoMan sez:"), "\"Doing nothing is not always good for QA.\"" |
1631 |
print |
1639 |
print |
1632 |
print green("RepoMan sez:"), "\"Doing nothing is not always good for QA.\"\n" |
|
|
1633 |
print |
1634 |
print "(Didn't find any changed files...)" |
1640 |
print "(Didn't find any changed files...)" |
1635 |
print |
1641 |
print |
1636 |
sys.exit(0) |
1642 |
sys.exit(0) |