~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/missing.py

  • Committer: John Arbash Meinel
  • Date: 2005-12-01 17:36:29 UTC
  • mto: (1185.50.19 bzr-jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1532.
  • Revision ID: john@arbash-meinel.com-20051201173629-aecb08238e0976a2
Removing instances of os.sep

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env python
2
1
"""\
3
2
A plugin for displaying what revisions are in 'other' but not in local.
4
3
"""
5
4
 
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
 
 
32
5
def show_missing(br_local, br_remote, verbose=False, quiet=False):
33
6
    """Show the revisions which exist in br_remote, that 
34
7
    do not exist in br_local.
87
60
    for revno, rev_id in missing_remote:
88
61
        rev = br_remote.get_revision(rev_id)
89
62
        if verbose:
90
 
            parent_rev_id = rev.parents[0].revision_id
 
63
            parent_rev_id = rev.parent_ids[0]
91
64
            if last_rev_id == parent_rev_id:
92
65
                parent_tree = last_tree
93
66
            else: