~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/conflicts.py

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
117
117
                resolve(tree, file_list)
118
118
 
119
119
 
120
 
def resolve(tree, paths=None, ignore_misses=False):
 
120
def resolve(tree, paths=None, ignore_misses=False, recursive=False):
 
121
    """Resolve some or all of the conflicts in a working tree.
 
122
 
 
123
    :param paths: If None, resolve all conflicts.  Otherwise, select only
 
124
        specified conflicts.
 
125
    :param recursive: If True, then elements of paths which are directories
 
126
        have all their children resolved, etc.  When invoked as part of
 
127
        recursive commands like revert, this should be True.  For commands
 
128
        or applications wishing finer-grained control, like the resolve
 
129
        command, this should be False.
 
130
    :ignore_misses: If False, warnings will be printed if the supplied paths
 
131
        do not have conflicts.
 
132
    """
121
133
    tree.lock_tree_write()
122
134
    try:
123
135
        tree_conflicts = tree.conflicts()
126
138
            selected_conflicts = tree_conflicts
127
139
        else:
128
140
            new_conflicts, selected_conflicts = \
129
 
                tree_conflicts.select_conflicts(tree, paths, ignore_misses)
 
141
                tree_conflicts.select_conflicts(tree, paths, ignore_misses,
 
142
                    recursive)
130
143
        try:
131
144
            tree.set_conflicts(new_conflicts)
132
145
        except errors.UnsupportedOperation: