~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: John Arbash Meinel
  • Date: 2008-05-19 20:35:37 UTC
  • mto: This revision was merged to the branch mainline in revision 3441.
  • Revision ID: john@arbash-meinel.com-20080519203537-6dqmxtn6fxlk1ter
Add bzrlib.missing.find_unmerged_mainline_revisions

This is a helper function that is designed to give 'missing' what it wants
without having to search all of ancestry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3330
3330
        try:
3331
3331
            remote_branch.lock_read()
3332
3332
            try:
3333
 
                local_extra, remote_extra = find_unmerged(local_branch,
3334
 
                                                          remote_branch)
 
3333
                graph = local_branch.repository.get_graph(
 
3334
                            remote_branch.repository)
 
3335
                local_revision_id = local_branch.last_revision()
 
3336
                remote_revision_id = remote_branch.last_revision()
 
3337
                if theirs_only:
 
3338
                    local_extra = None
 
3339
                    remote_extra = graph.find_unique_ancestors(
 
3340
                        remote_revision_id, [local_revision_id])
 
3341
                elif mine_only:
 
3342
                    remote_extra = None
 
3343
                    local_extra = graph.find_unique_ancestors(
 
3344
                        local_revision_id, [remote_revision_id])
 
3345
                else:
 
3346
                    local_extra, remote_extra = graph.find_difference(
 
3347
                        local_revision_id, remote_revision_id)
 
3348
                # We now have the set of local and remote revisions, but they
 
3349
                # are not sorted. They also include all merged revisions, while
 
3350
                # missing only shows the mainline revisions.
 
3351
 
3335
3352
                if log_format is None:
3336
3353
                    registry = log.log_formatter_registry
3337
3354
                    log_format = registry.get_default(local_branch)