~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to baz_import.py

  • Committer: Aaron Bentley
  • Date: 2006-11-22 13:08:43 UTC
  • Revision ID: aaron.bentley@utoronto.ca-20061122130843-4eaenjjvsrkk564v
Get encoding working

Show diffs side-by-side

added added

removed removed

Lines of Context:
562
562
                        fast=False, verbose=False, dry_run=False,
563
563
                        max_count=None, standalone=False):
564
564
    revdir = None
 
565
    log_encoding = 'ascii'
 
566
    if encoding is not None:
 
567
        log_encoding = encoding
565
568
 
566
569
    # Uncomment this for testing, it basically just has baz2bzr only update
567
570
    # 5 patches at a time
664
667
            target_tree.set_inventory(baz_inv)
665
668
            commitobj = Commit(reporter=ImportCommitReporter())
666
669
            commitobj.commit(working_tree=target_tree,
667
 
                             message=log_message.decode('ascii', 'replace'), 
668
 
                             verbose=False, committer=log_creator,
669
 
                             timestamp=timestamp, timezone=0, rev_id=rev_id,
670
 
                             revprops={})
 
670
                message=log_message.decode(log_encoding, 'replace'),
 
671
                verbose=False, committer=log_creator, timestamp=timestamp,
 
672
                timezone=0, rev_id=rev_id, revprops={})
671
673
        finally:
672
674
            target_tree.unlock()
673
675
            branch.unlock()