~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/missing.py

  • Committer: v.ladeuil+lp at free
  • Date: 2007-05-18 18:20:31 UTC
  • mto: (2485.8.44 bzr.connection.sharing)
  • mto: This revision was merged to the branch mainline in revision 2646.
  • Revision ID: v.ladeuil+lp@free.fr-20070518182031-gbg2cgidv5l20x9p
Takes Robert comments into account.

* bzrlib/transport/ftp.py:
(FtpTransport.__init__): Write a better explanation.

* bzrlib/tests/test_init.py:
(InstrumentedTransport): Just make hooks a class attribute.
(InstrumentedTransport._get_FTP): Run hook directly in the for
loop.
(TransportHooks.run_hook, TransportHooks.uninstall_hook): Not
needed. The hooks should be cleaned up by the test itself.
(TestInit.setUp.cleanup): Resset to default hooks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Display what revisions are missing in 'other' from 'this' and vice versa."""
18
18
 
19
 
from bzrlib import ui
20
 
from bzrlib.log import (
21
 
    LogRevision,
22
 
    )
23
 
from bzrlib.symbol_versioning import (
24
 
    deprecated_function,
25
 
    zero_seventeen,
26
 
    )
27
 
 
28
 
 
29
 
@deprecated_function(zero_seventeen)
 
19
import bzrlib.ui as ui
 
20
 
 
21
 
30
22
def iter_log_data(revisions, revision_source, verbose):
31
 
    for revision in iter_log_revisions(revisions, revision_source, verbose):
32
 
        yield revision.revno, revision.rev, revision.delta
33
 
 
34
 
 
35
 
def iter_log_revisions(revisions, revision_source, verbose):
36
23
    last_tree = revision_source.revision_tree(None)
37
24
    last_rev_id = None
38
25
    for revno, rev_id in revisions:
50
37
            delta = revision_tree.changes_from(parent_tree)
51
38
        else:
52
39
            delta = None
53
 
        yield LogRevision(rev, revno, delta=delta)
 
40
        yield revno, rev, delta
54
41
 
55
42
 
56
43
def find_unmerged(local_branch, remote_branch):
119
106
def _get_ancestry(repository, progress, label, step, rev_history):
120
107
    progress.update('%s ancestry' % label, step, 5)
121
108
    if len(rev_history) > 0:
122
 
        ancestry = set(repository.get_ancestry(rev_history[-1],
123
 
                       topo_sorted=False))
 
109
        ancestry = set(repository.get_ancestry(rev_history[-1]))
124
110
    else:
125
111
        ancestry = set()
126
112
    return ancestry