/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 commit.py

  • Committer: John Arbash Meinel
  • Date: 2007-10-03 15:49:31 UTC
  • mto: (322.1.1 trunk) (330.3.3 trunk)
  • mto: This revision was merged to the branch mainline in revision 368.
  • Revision ID: john@arbash-meinel.com-20071003154931-29y6lt71hx6bqhp7
We can make bencode work again by a simple decode/encode step.

Show diffs side-by-side

added added

removed removed

Lines of Context:
322
322
        self._files_box.show()
323
323
        self._left_pane_box.pack_start(self._files_box)
324
324
 
 
325
        # Keep note that all strings stored in a ListStore must be UTF-8
 
326
        # strings. GTK does not support directly setting and restoring Unicode
 
327
        # objects.
325
328
        liststore = gtk.ListStore(
326
329
            gobject.TYPE_STRING,  # [0] file_id
327
330
            gobject.TYPE_STRING,  # [1] real path
495
498
            self._last_selected_file = self._files_store.get_path(selection)
496
499
 
497
500
    def _get_specific_files(self):
 
501
        """Return the list of selected paths, and file info.
 
502
 
 
503
        :return: ([unicode paths], [{utf-8 file info}]
 
504
        """
498
505
        self._save_current_file_message()
499
506
        files = []
500
507
        records = iter(self._files_store)
503
510
 
504
511
        file_info = []
505
512
        for record in records:
506
 
            if record[2]: # [2] checkbox
 
513
            if record[2]:           # [2] checkbox
507
514
                file_id = record[0] # [0] file_id
508
 
                path = record[1] # [1] real path
 
515
                path = record[1]    # [1] real path
509
516
                file_message = record[5] # [5] commit message
510
517
                files.append(path.decode('UTF-8'))
511
518
                if file_message:
554
561
        rev_id = None
555
562
        revprops = {}
556
563
        if file_info:
557
 
            revprops['file-info'] = bencode.bencode(file_info)
 
564
            revprops['file-info'] = bencode.bencode(file_info).decode('UTF-8')
558
565
        try:
559
566
            rev_id = self._wt.commit(message,
560
567
                       allow_pointless=False,