~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

- merge improved merge base selection from aaron
aaron.bentley@utoronto.ca-20050912025534-43d7275dd948e4ad

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
 
18
 
import os.path
 
18
import os
19
19
import tempfile
20
20
import shutil
21
21
import errno
304
304
        merge_inner(this_branch, other_tree, base_tree, tempdir, 
305
305
                    ignore_zero=ignore_zero, backup_files=backup_files, 
306
306
                    merge_type=merge_type, interesting_ids=interesting_ids)
307
 
        if base_is_ancestor and other_rev_id is not None:
 
307
        if base_is_ancestor and other_rev_id is not None\
 
308
            and other_rev_id not in this_branch.revision_history():
308
309
            this_branch.add_pending_merge(other_rev_id)
309
310
    finally:
310
311
        shutil.rmtree(tempdir)
356
357
            if path == '.':
357
358
                path = ''
358
359
            else:
359
 
                assert path.startswith('./'), "path is %s" % path
 
360
                assert path.startswith('.' + os.sep), "path is %s" % path
360
361
            path = path[2:]
361
362
        adjust_ids.append((path, id))
362
363
    if len(adjust_ids) > 0: