~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to fai.py

  • Committer: Robert Collins
  • Date: 2005-10-24 06:21:01 UTC
  • mto: (147.1.42) (364.1.3 bzrtools)
  • mto: This revision was merged to the branch mainline in revision 324.
  • Revision ID: robertc@robertcollins.net-20051024062101-0e4b070c687be780
Fix continuation direct_merges output, and allow reusing history in a version import

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
__docformat__ = "restructuredtext"
23
23
__doc__ = "Utility functions to be used by commands"
24
24
 
25
 
def direct_merges(merges):
 
25
def direct_merges(merges, excludes=[]):
26
26
    """Get a list of direct merges, from a list of direct and indirect
27
27
    
28
28
    :param merges: Iterator of merge patchlogs
69
69
                print "ancestor of %s is %s" % (log.revision, ancestor)
70
70
        if ancestor is not None:
71
71
            indirect.append(ancestor)
72
 
    return [log for log in logs if not log.revision in indirect]
 
72
    return [log.revision for log in logs if not log.revision in indirect and 
 
73
            log.revision not in excludes]
73
74
 
74
75
def namespace_previous(revision):
75
76
    if revision.patchlevel == 'base-0':