~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Aaron Bentley
  • Date: 2006-04-09 06:19:54 UTC
  • mto: This revision was merged to the branch mainline in revision 1649.
  • Revision ID: aaron.bentley@utoronto.ca-20060409061954-d0f04c8e0164a935
Implement single-file merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
1856
1856
        if revision is None or len(revision) < 1:
1857
1857
            base = [None, None]
1858
1858
            other = [branch, -1]
 
1859
            other_branch, path = Branch.open_containing(branch)
1859
1860
        else:
1860
1861
            if len(revision) == 1:
1861
1862
                base = [None, None]
1862
 
                other_branch = Branch.open_containing(branch)[0]
 
1863
                other_branch, path = Branch.open_containing(branch)
1863
1864
                revno = revision[0].in_history(other_branch).revno
1864
1865
                other = [branch, revno]
1865
1866
            else:
1867
1868
                if None in revision:
1868
1869
                    raise BzrCommandError(
1869
1870
                        "Merge doesn't permit that revision specifier.")
1870
 
                b = Branch.open_containing(branch)[0]
 
1871
                b, path = Branch.open_containing(branch)
1871
1872
 
1872
1873
                base = [branch, revision[0].in_history(b).revno]
1873
1874
                other = [branch, revision[1].in_history(b).revno]
 
1875
        if path != "":
 
1876
            interesting_files = [path]
 
1877
        else:
 
1878
            interesting_files = None
1874
1879
        pb = bzrlib.ui.ui_factory.nested_progress_bar()
 
1880
        print path 
1875
1881
        try:
1876
1882
            try:
1877
1883
                conflict_count = merge(other, base, check_clean=(not force),
1878
1884
                                       merge_type=merge_type, 
1879
1885
                                       reprocess=reprocess,
1880
1886
                                       show_base=show_base, 
1881
 
                                       pb=pb)
 
1887
                                       pb=pb, file_list=interesting_files)
1882
1888
            finally:
1883
1889
                pb.finished()
1884
1890
            if conflict_count != 0:
2427
2433
        merger.show_base = show_base 
2428
2434
        merger.reprocess = reprocess
2429
2435
        conflicts = merger.do_merge()
2430
 
        merger.set_pending()
 
2436
        if file_list is None:
 
2437
            merger.set_pending()
2431
2438
    finally:
2432
2439
        pb.clear()
2433
2440
    return conflicts