~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/missing.py

  • Committer: Aaron Bentley
  • Date: 2005-11-29 18:47:47 UTC
  • mto: (1185.72.2 bzr.dev)
  • mto: This revision was merged to the branch mainline in revision 1525.
  • Revision ID: abentley@panoramicfeedback.com-20051129184747-3f28d5b7a02f7955
Used more set operations

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
            remote_ancestry = set(remote_branch.get_ancestry(
99
99
                remote_rev_history[-1]))
100
100
            progress.update('pondering', 4, 5)
101
 
            local_extra = set()
102
 
            remote_extra = set()
103
 
            for elem in local_ancestry.union(remote_ancestry):
104
 
                if ((elem in local_ancestry) and
105
 
                    (elem not in remote_ancestry)):
106
 
                    if elem in local_rev_history:
107
 
                        local_extra.add(elem)
108
 
                elif ((elem not in local_ancestry) and
109
 
                      (elem in remote_ancestry)):
110
 
                    if elem in remote_rev_history:
111
 
                        remote_extra.add(elem)
 
101
            extras = local_ancestry.symmetric_difference(remote_ancestry) 
 
102
            local_extra = extras.intersection(set(local_rev_history))
 
103
            remote_extra = extras.intersection(set(remote_rev_history))
112
104
            progress.clear()
113
105
            local_extra = sorted_revisions(local_extra, local_rev_history_map)
114
106
            remote_extra = sorted_revisions(remote_extra,