~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to baz_import.py

  • Committer: Aaron Bentley
  • Date: 2005-10-04 12:31:20 UTC
  • mto: (147.2.17)
  • mto: This revision was merged to the branch mainline in revision 324.
  • Revision ID: abentley@panoramicfeedback.com-20051004123120-d1d27c1ccf77f51a
Fixed log conversion

Show diffs side-by-side

added added

removed removed

Lines of Context:
462
462
            # cached so we can delete the log
463
463
            log_date = log.date
464
464
            log_summary = log.summary
 
465
            log_description = log.description
465
466
            log_creator = log.creator
466
467
            if os.path.exists(output_dir):
467
468
                bzr_dir = os.path.join(output_dir, '.bzr')
483
484
            baz_inv, log = apply_revision(revdir, revision)
484
485
            log_date = log.date
485
486
            log_summary = log.summary
 
487
            log_description = log.description
486
488
            log_creator = log.creator
487
489
            direct_merges = get_direct_merges(revdir, revision)
488
490
            os.rename(new, old)
491
493
        rev_id = revision_id(revision)
492
494
        if log_summary is None:
493
495
            log_summary = ""
 
496
        if log_description is not None:
 
497
            log_message = "\n".join((log_summary, log_description))
 
498
        else:
 
499
            log_message = log_summary
494
500
        branch.lock_write()
495
501
        try:
496
502
            if missing_ancestor:
501
507
                branch.add_pending_merge(revision_id(merge.revision))
502
508
            branch.set_inventory(baz_inv)
503
509
            commitobj = Commit(reporter=ImportCommitReporter(pb))
504
 
            commitobj.commit(branch, log_summary, verbose=False, 
505
 
                             committer=log_creator, timestamp=timestamp,
506
 
                             timezone=0, rev_id=rev_id)
 
510
            commitobj.commit(branch, log_message.decode('ascii', 'replace'), 
 
511
                             verbose=False, committer=log_creator,
 
512
                             timestamp=timestamp, timezone=0, rev_id=rev_id)
507
513
        finally:
508
514
            branch.unlock()
509
515
    yield Progress("revisions", len(ancestors), len(ancestors))