~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Aaron Bentley
  • Date: 2006-10-25 16:04:25 UTC
  • mto: This revision was merged to the branch mainline in revision 2098.
  • Revision ID: abentley@panoramicfeedback.com-20061025160425-9ae6aadd298ae1cf
Move realpath functionality into osutils

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
 
81
81
    :return: workingtree, [relative_paths]
82
82
    """
83
 
    def realpath(path):
84
 
        return osutils.pathjoin(osutils.realpath(osutils.dirname(path)),
85
 
                                osutils.basename(path))
86
 
        
87
83
    if file_list is None or len(file_list) == 0:
88
84
        return WorkingTree.open_containing(default_branch)[0], file_list
89
 
    tree = WorkingTree.open_containing(realpath(file_list[0]))[0]
 
85
    tree = WorkingTree.open_containing(osutils.realpath(file_list[0]))[0]
90
86
    new_list = []
91
87
    for filename in file_list:
92
88
        try:
93
 
            new_list.append(tree.relpath(realpath(filename)))
 
89
            new_list.append(tree.relpath(osutils.real_parent(filename)))
94
90
        except errors.PathNotChild:
95
91
            raise errors.FileInWrongBranch(tree.branch, filename)
96
92
    return tree, new_list