/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to commitmsgs.py

  • Committer: Jelmer Vernooij
  • Date: 2012-03-23 12:56:39 UTC
  • Revision ID: jelmer@samba.org-20120323125639-z3qgalx8qodxr2zw
bzr-handle-patch: Use spaces rather than tabs for indentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
 
try:
18
 
    from bzrlib import bencode
19
 
except ImportError:
20
 
    from bzrlib.util import bencode
21
 
 
22
 
from bzrlib import osutils
 
17
from bzrlib import (
 
18
    bencode,
 
19
    osutils,
 
20
    )
23
21
 
24
22
class SavedCommitMessagesManager(object):
25
23
    """Save global and per-file commit messages.
61
59
        for fi in file_info:
62
60
            file_message = fi['message']
63
61
            if file_message:
64
 
                file_messages[fi['file_id']] = file_message # utf-8 strings
 
62
                file_id = fi['file_id']
 
63
                assert type(file_id) is str
 
64
                file_messages[file_id] = file_message # utf-8 strings
65
65
        for k,v in file_messages.iteritems():
 
66
            assert type(k) is str
66
67
            try:
67
68
                self.file_messages[k] = v + '\n******\n' + self.file_messages[k]
68
69
            except KeyError: