Changeset 433 in tailor for vcpx/bzr.py


Ignore:
Timestamp:
07/26/05 23:48:35 (8 years ago)
Author:
lele@…
Hash name:
20050726214835-97f81-b7b36e0e7ea125328e7d386cc7e3bf14594c30f1
Message:

Uniquify the mechanism of computing the destination changelog
Now all targets share a similar mechanism to compute the changelog of
the committed patch, honoring the eventual encoding and skipping missing
parts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vcpx/bzr.py

    r431 r433  
    3434        """ 
    3535 
    36         logmessage = remark 
     36        from sys import getdefaultencoding 
     37         
     38        encoding = ExternalCommand.FORCE_ENCODING or getdefaultencoding() 
     39         
     40        logmessage = [] 
     41        if remark: 
     42            logmessage.append(remark.encode(encoding)) 
    3743        if changelog: 
    38             logmessage += '\n%s' % changelog 
    39         logmessage += '\n\nOriginal author: %s\nDate: %s\n' % (author, date) 
     44            logmessage.append(changelog.encode(encoding)) 
     45        logmessage.append('') 
     46        logmessage.append('Original author: %s' % author.encode(encoding)) 
     47        logmessage.append('Date: %s' % date) 
     48        logmessage.append('') 
    4049 
    41         cmd = [BAZAAR_CMD, "commit", "-m", logmessage] 
     50        cmd = [BAZAAR_CMD, "commit", "-m", '\n'.join(logmessage)] 
    4251        if not entries: 
    4352            entries = ['.'] 
Note: See TracChangeset for help on using the changeset viewer.