~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to fai.py

  • Committer: Aaron Bentley
  • Date: 2006-11-23 00:05:45 UTC
  • mfrom: (0.8.7 show_paths)
  • Revision ID: aaron.bentley@utoronto.ca-20061123000545-vk3id8fxuzzclvsh
Add show-paths command from Alexander Belchenko

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
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
29
29
    :type merges: iter of `pybaz.Patchlog`
30
30
    :return: The direct merges
36
36
        return []
37
37
    for log in logs:
38
38
        try:
39
 
            this_indirect = set([str(f) for f in log.new_patches
40
 
                                 if f != log.revision and
 
39
            this_indirect = set([str(f) for f in log.new_patches 
 
40
                                 if f != log.revision and 
41
41
                                     str(f) not in indirect])
42
42
        except pybaz.errors.NamespaceError:
43
43
            print
44
44
            print "log ", log, " unusable, attempting to use archive copy."
45
45
            log = pybaz.Revision(str(log.revision)).patchlog
46
 
            this_indirect = set([str(f) for f in log.new_patches
47
 
                                 if f != log.revision and
 
46
            this_indirect = set([str(f) for f in log.new_patches 
 
47
                                 if f != log.revision and 
48
48
                                     str(f) not in indirect])
49
49
        indirect.update(this_indirect)
50
50
        if log.continuation_of is not None:
56
56
        except pybaz.errors.ExecProblem:
57
57
            # baz does not know
58
58
            # guess
59
 
            if log.revision.patchlevel != 'version-0':
 
59
            if log.revision.patchlevel != 'version-0': 
60
60
                ancestor = namespace_previous(log.revision)
61
61
            else:
62
62
                found = False
123
123
    :rtype: Iterator of str
124
124
    """
125
125
    args = [ 'new-merges', '--dir', directory ]
126
 
    if reverse:
 
126
    if reverse: 
127
127
        args.append('--reverse')
128
128
    args.append(version)
129
129
    return sequence_cmd(args)