VirtualBox

Changeset 71153 in vbox for trunk/src/VBox/ValidationKit


Ignore:
Timestamp:
Feb 28, 2018 2:47:23 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
121048
Message:

vsc_import.py,vscrevisions.py: Fixed encoding regression from r120255; truncate big commit messages so we don't choke on them during database input validation.

Location:
trunk/src/VBox/ValidationKit/testmanager
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testmanager/batch/vcs_import.py

    r70660 r71153  
    118118        # Parse the XML and add the entries to the database.
    119119        oParser = ET.XMLParser(target = ET.TreeBuilder(), encoding = 'utf-8');
    120         oParser.feed(sLogXml);
     120        oParser.feed(sLogXml.encode('utf-8')); # does its own decoding and processOutputChecked always gives us decoded utf-8 now.
    121121        oRoot = oParser.close();
    122122
     
    128128            if sMessage == '':
    129129                sMessage = ' ';
     130            elif len(sMessage) > VcsRevisionData.kcchMax_sMessage:
     131                sMessage = sMessage[:VcsRevisionData.kcchMax_sMessage - 4] + ' ...';
    130132            if not self.oConfig.fQuiet:
    131133                print('sDate=%s iRev=%u sAuthor=%s sMsg[%s]=%s' % (sDate, iRevision, sAuthor, type(sMessage).__name__, sMessage));
  • trunk/src/VBox/ValidationKit/testmanager/core/vcsrevisions.py

    r69111 r71153  
    5252    kasAllowNullAttributes      = [ ];
    5353    kfAllowUnicode_sMessage     = True;
     54    kcchMax_sMessage            = 8192;
    5455
    5556    def __init__(self):
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette