# Path: formatters/log.py
# class Paint:
# 
#     @staticmethod
#     def bold(s):
#         return "%s[01m%s%s[0m" % (chr(27), s.rstrip(), chr(27))
# 
#     @staticmethod
#     def red(s):
#         return "%s[33;31m%s%s[0m" % (chr(27), s.rstrip(), chr(27))
# 
#     @staticmethod
#     def green(s):
#         return "%s[31;32m%s%s[0m" % (chr(27), s.rstrip(), chr(27))
# 
#     @staticmethod
#     def blue(s):
#         return "%s[34;01m%s%s[0m" % (chr(27), s.rstrip(), chr(27))
# 
#     @staticmethod
#     def yellow(s):
#         return "%s[31;33m%s%s[0m" % (chr(27), s.rstrip(), chr(27))


import os
from config import Config
from formatters.log import Paint
        if not Error.CONFLICT_STATISTIC.has_key(key):
            Error.CONFLICT_STATISTIC[key] = 0

        Error.CONFLICT_STATISTIC[key] += conflictNum

    @staticmethod
    def getStatisticKey(target):
        relpath = os.path.relpath(target, Config.PRJ_ROOT)
        key = relpath[0:relpath.find("/")]

        return key        

    @staticmethod
    def fail(message):
        Error.FAILED_LIST.append(message)


    @staticmethod
    def showStatistic():
        for key in Error.FILENOTFOUND_STATISTIC.keys():
            print "%3d files not found in %s" % (Error.FILENOTFOUND_STATISTIC[key], key)

        if Error.TOTAL_FILENOTFOUND > 0:
            print Paint.bold("%3d files not found totally, they might be removed or moved to other place by vendor?" % Error.TOTAL_FILENOTFOUND)
            print " "

        for key in Error.CONFLICT_STATISTIC.keys():
            print "%3d conflicts in %s " % (Error.CONFLICT_STATISTIC[key], key)

        if Error.TOTAL_CONFLICTS > 0:

# Path: formatters/log.py
# class Paint:
# 
#     @staticmethod
#     def bold(s):
#         return "%s[01m%s%s[0m" % (chr(27), s.rstrip(), chr(27))
# 
#     @staticmethod
#     def red(s):
#         return "%s[33;31m%s%s[0m" % (chr(27), s.rstrip(), chr(27))
# 
#     @staticmethod
#     def green(s):
#         return "%s[31;32m%s%s[0m" % (chr(27), s.rstrip(), chr(27))
# 
#     @staticmethod
#     def blue(s):
#         return "%s[34;01m%s%s[0m" % (chr(27), s.rstrip(), chr(27))
# 
#     @staticmethod
#     def yellow(s):
#         return "%s[31;33m%s%s[0m" % (chr(27), s.rstrip(), chr(27))


# Path: autopatch/error.py
import os
from config import Config
from formatters.log import Paint

        if not Error.CONFLICT_STATISTIC.has_key(key):
            Error.CONFLICT_STATISTIC[key] = 0

        Error.CONFLICT_STATISTIC[key] += conflictNum

    @staticmethod
    def getStatisticKey(target):
        relpath = os.path.relpath(target, Config.PRJ_ROOT)
        key = relpath[0:relpath.find("/")]

        return key        

    @staticmethod
    def fail(message):
        Error.FAILED_LIST.append(message)


    @staticmethod
    def showStatistic():
        for key in Error.FILENOTFOUND_STATISTIC.keys():
            print "%3d files not found in %s" % (Error.FILENOTFOUND_STATISTIC[key], key)

        if Error.TOTAL_FILENOTFOUND > 0:
            print Paint.bold("%3d files not found totally, they might be removed or moved to other place by vendor?" % Error.TOTAL_FILENOTFOUND)
            print " "

        for key in Error.CONFLICT_STATISTIC.keys():
            print "%3d conflicts in %s " % (Error.CONFLICT_STATISTIC[key], key)

        if Error.TOTAL_CONFLICTS > 0:

            print Paint.bold("%3d conflicts in %d files, go through the reject files in 'autopatch/reject' to find them out" % (Error.TOTAL_CONFLICTS, Error.CONFLICT_FILE_NUM))