~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 20:00:00 UTC
  • mto: (1185.72.2 bzr.dev)
  • mto: This revision was merged to the branch mainline in revision 1525.
  • Revision ID: abentley@panoramicfeedback.com-20051129200000-cd4331961ebedd63
Refactored shortcut

Show diffs side-by-side

added added

removed removed

Lines of Context:
122
122
    elif len(remote_rev_history) == 0:
123
123
        return local_history, set()
124
124
    elif local_rev_history[-1] in remote_history:
125
 
        return set(), set(remote_rev_history[remote_rev_history.index(local_rev_history[-1])+1:])
 
125
        return set(), _after(remote_rev_history, local_rev_history)
126
126
    elif remote_rev_history[-1] in local_history:
127
 
        return set(local_rev_history[local_rev_history.index(remote_rev_history[-1])+1:]), set()
 
127
        return _after(local_rev_history, remote_rev_history), set()
128
128
    else:
129
129
        return None
130
130
 
 
131
def _after(larger_history, smaller_history):
 
132
    return set(larger_history[larger_history.index(smaller_history[-1])+1:])
131
133
 
132
134
def _get_history(branch, progress, label, step):
133
135
    progress.update('%s history' % label, step, 5)