~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: John Arbash Meinel
  • Date: 2006-07-13 18:38:58 UTC
  • mfrom: (1863 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1869.
  • Revision ID: john@arbash-meinel.com-20060713183858-ebf4aa1f9ef8bb6e
[merge] bzr.dev 1863

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
from time import time
52
52
import warnings
53
53
 
 
54
from bzrlib import bzrdir, errors, osutils, urlutils
54
55
from bzrlib.atomicfile import AtomicFile
55
56
from bzrlib.conflicts import Conflict, ConflictList, CONFLICT_SUFFIXES
56
 
import bzrlib.bzrdir as bzrdir
57
57
from bzrlib.decorators import needs_read_lock, needs_write_lock
58
 
import bzrlib.errors as errors
59
58
from bzrlib.errors import (BzrCheckError,
60
59
                           BzrError,
61
60
                           ConflictFormatError,
103
102
from bzrlib.trace import mutter, note
104
103
from bzrlib.transport import get_transport
105
104
from bzrlib.transport.local import LocalTransport
106
 
import bzrlib.urlutils as urlutils
107
105
import bzrlib.ui
108
106
import bzrlib.xml5
109
107
 
356
354
        :return: The WorkingTree that contains 'path', and the rest of path
357
355
        """
358
356
        if path is None:
359
 
            path = os.getcwdu()
 
357
            path = osutils.getcwd()
360
358
        control, relpath = bzrdir.BzrDir.open_containing(path)
361
359
 
362
360
        return control.open_workingtree(), relpath
768
766
                elif self.is_ignored(fp[1:]):
769
767
                    c = 'I'
770
768
                else:
771
 
                    c = '?'
 
769
                    # we may not have found this file, because of a unicode issue
 
770
                    f_norm, can_access = osutils.normalized_filename(f)
 
771
                    if f == f_norm or not can_access:
 
772
                        # No change, so treat this file normally
 
773
                        c = '?'
 
774
                    else:
 
775
                        # this file can be accessed by a normalized path
 
776
                        # check again if it is versioned
 
777
                        # these lines are repeated here for performance
 
778
                        f = f_norm
 
779
                        fp = from_dir_relpath + '/' + f
 
780
                        fap = from_dir_abspath + '/' + f
 
781
                        f_ie = inv.get_child(from_dir_id, f)
 
782
                        if f_ie:
 
783
                            c = 'V'
 
784
                        elif self.is_ignored(fp[1:]):
 
785
                            c = 'I'
 
786
                        else:
 
787
                            c = '?'
772
788
 
773
789
                fk = file_kind(fap)
774
790
 
1000
1016
 
1001
1017
            fl = []
1002
1018
            for subf in os.listdir(dirabs):
1003
 
                if (subf != '.bzr'
1004
 
                    and (subf not in dir_entry.children)):
1005
 
                    fl.append(subf)
 
1019
                if subf == '.bzr':
 
1020
                    continue
 
1021
                if subf not in dir_entry.children:
 
1022
                    subf_norm, can_access = osutils.normalized_filename(subf)
 
1023
                    if subf_norm != subf and can_access:
 
1024
                        if subf_norm not in dir_entry.children:
 
1025
                            fl.append(subf_norm)
 
1026
                    else:
 
1027
                        fl.append(subf)
1006
1028
            
1007
1029
            fl.sort()
1008
1030
            for subf in fl: