~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/delta.py

  • Committer: Robert Collins
  • Date: 2005-09-07 10:47:36 UTC
  • mto: (1092.3.1)
  • mto: This revision was merged to the branch mainline in revision 1397.
  • Revision ID: robertc@robertcollins.net-20050907104736-8e592b72108c577d
symlink support updated to work

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
    Each id is listed only once.
37
37
 
38
38
    Files that are both modified and renamed are listed only in
39
 
    renamed, with the text_modified flag true.
 
39
    renamed, with the text_modified flag true. The text_modified
 
40
    applies either to the the content of the file or the target of the
 
41
    symbolic link, depending of the kind of file.
40
42
 
41
43
    Files are only considered renamed if their name has changed or
42
44
    their parent directory has changed.  Renaming a directory
176
178
                old_sha1 = old_tree.get_file_sha1(file_id)
177
179
                new_sha1 = new_tree.get_file_sha1(file_id)
178
180
                text_modified = (old_sha1 != new_sha1)
 
181
            elif kind == 'symlink':
 
182
                t1 = old_tree.get_symlink_target(file_id)
 
183
                t2 = new_tree.get_symlink_target(file_id)
 
184
                if t1 != t2:
 
185
                    mutter("    symlink target changed")
 
186
                    text_modified = True
 
187
                else:
 
188
                    text_modified = False
179
189
            else:
180
190
                ## mutter("no text to check for %r %r" % (file_id, kind))
181
191
                text_modified = False