~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Vincent Ladeuil
  • Date: 2011-06-27 15:42:09 UTC
  • mfrom: (5993 +trunk)
  • mto: (5993.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 5994.
  • Revision ID: v.ladeuil+lp@free.fr-20110627154209-azubuhbuxsz109hq
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1740
1740
            b = wt.branch
1741
1741
            last_revision = wt.last_revision()
1742
1742
 
1743
 
        revision_ids = b.repository.get_ancestry(last_revision)
1744
 
        revision_ids.pop(0)
1745
 
        for revision_id in revision_ids:
 
1743
        self.add_cleanup(b.repository.lock_read().unlock)
 
1744
        graph = b.repository.get_graph()
 
1745
        revisions = [revid for revid, parents in
 
1746
            graph.iter_ancestry([last_revision])]
 
1747
        for revision_id in reversed(revisions):
 
1748
            if _mod_revision.is_null(revision_id):
 
1749
                continue
1746
1750
            self.outf.write(revision_id + '\n')
1747
1751
 
1748
1752
 
3193
3197
        from bzrlib.msgeditor import (
3194
3198
            edit_commit_message_encoded,
3195
3199
            generate_commit_message_template,
3196
 
            make_commit_message_template_encoded
 
3200
            make_commit_message_template_encoded,
 
3201
            set_commit_message,
3197
3202
        )
3198
3203
 
3199
3204
        commit_stamp = offset = None
3265
3270
                # make_commit_message_template_encoded returns user encoding.
3266
3271
                # We probably want to be using edit_commit_message instead to
3267
3272
                # avoid this.
3268
 
                start_message = generate_commit_message_template(commit_obj)
3269
 
                my_message = edit_commit_message_encoded(text,
3270
 
                    start_message=start_message)
 
3273
                my_message = set_commit_message(commit_obj)
 
3274
                if my_message is None:
 
3275
                    start_message = generate_commit_message_template(commit_obj)
 
3276
                    my_message = edit_commit_message_encoded(text,
 
3277
                        start_message=start_message)
3271
3278
                if my_message is None:
3272
3279
                    raise errors.BzrCommandError("please specify a commit"
3273
3280
                        " message with either --message or --file")
3879
3886
    committed to record the result of the merge.
3880
3887
 
3881
3888
    merge refuses to run if there are any uncommitted changes, unless
3882
 
    --force is given. The --force option can also be used to create a
 
3889
    --force is given.  If --force is given, then the changes from the source 
 
3890
    will be merged with the current working tree, including any uncommitted
 
3891
    changes in the tree.  The --force option can also be used to create a
3883
3892
    merge revision which has more than two parents.
3884
3893
 
3885
3894
    If one would like to merge changes from the working tree of the other