/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

  • Committer: John Arbash Meinel
  • Date: 2007-05-17 18:23:06 UTC
  • mto: This revision was merged to the branch mainline in revision 2499.
  • Revision ID: john@arbash-meinel.com-20070517182306-dhc0cf38l5fhv2dj
Delay joining the path until we are actually going to be using it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1874
1874
                else:
1875
1875
                    old_dirname = entry[0][0]
1876
1876
                    old_basename = entry[0][1]
1877
 
                    old_path = path = pathjoin(old_dirname, old_basename)
 
1877
                    old_path = path = None
1878
1878
                if path_info is None:
1879
1879
                    # the file is missing on disk, show as removed.
1880
1880
                    content_change = True
1884
1884
                    # source and target are both versioned and disk file is present.
1885
1885
                    target_kind = path_info[2]
1886
1886
                    if target_kind == 'directory':
 
1887
                        if path is None:
 
1888
                            old_path = path = pathjoin(old_dirname, old_basename)
1887
1889
                        new_dirname_to_file_id[path] = file_id
1888
1890
                        if source_minikind != 'd':
1889
1891
                            content_change = True
1920
1922
                    else:
1921
1923
                        raise Exception, "unknown kind %s" % path_info[2]
1922
1924
                if source_minikind == 'd':
1923
 
                    old_dirname_to_file_id[path] = file_id
 
1925
                    if path is None:
 
1926
                        old_path = path = pathjoin(old_dirname, old_basename)
 
1927
                    old_dirname_to_file_id[old_path] = file_id
1924
1928
                # parent id is the entry for the path in the target tree
1925
1929
                if old_dirname == last_source_parent[0]:
1926
1930
                    source_parent_id = last_source_parent[1]
1966
1970
                    or old_basename != entry[0][1]
1967
1971
                    or source_exec != target_exec
1968
1972
                    ):
1969
 
                    old_path_u = utf8_decode(old_path)[0]
1970
 
                    if old_path == path:
 
1973
                    if old_path is None:
 
1974
                        old_path = path = pathjoin(old_dirname, old_basename)
 
1975
                        old_path_u = utf8_decode(old_path)[0]
1971
1976
                        path_u = old_path_u
1972
1977
                    else:
1973
 
                        path_u = utf8_decode(path)[0]
 
1978
                        old_path_u = utf8_decode(old_path)[0]
 
1979
                        if old_path == path:
 
1980
                            path_u = old_path_u
 
1981
                        else:
 
1982
                            path_u = utf8_decode(path)[0]
1974
1983
                    source_kind = _minikind_to_kind[source_minikind]
1975
1984
                    return (entry[0][2],
1976
1985
                           (old_path_u, path_u),