~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/missing.py

  • Committer: Aaron Bentley
  • Date: 2005-08-26 16:58:52 UTC
  • mto: (1185.3.4)
  • mto: This revision was merged to the branch mainline in revision 1178.
  • Revision ID: abentley@panoramicfeedback.com-20050826165852-470d0fd6768a17ab
TEST NEEDED: fixed fetch when same revision is added twice to new_missing

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
1
2
"""\
2
3
A plugin for displaying what revisions are in 'other' but not in local.
3
4
"""
4
5
 
 
6
import bzrlib
 
7
 
 
8
try:
 
9
    set
 
10
except NameError:
 
11
    from sets import Set as set
 
12
 
 
13
 
 
14
def get_parent(branch):
 
15
    """Get the last pull/push location.
 
16
 
 
17
    TODO: This should probably be part of a Branch object.
 
18
    """
 
19
    import errno
 
20
    _locs = ['parent', 'pull', 'x-pull']
 
21
    loc = None
 
22
    for l in _locs:
 
23
        try:
 
24
            stored_loc = branch.controlfile(l, 'rb').read().strip('\n')
 
25
        except IOError, e:
 
26
            if e.errno != errno.ENOENT:
 
27
                raise
 
28
        else:
 
29
            return stored_loc
 
30
 
 
31
 
5
32
def show_missing(br_local, br_remote, verbose=False, quiet=False):
6
33
    """Show the revisions which exist in br_remote, that 
7
34
    do not exist in br_local.