~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/delta.py

  • Committer: Robert Collins
  • Date: 2005-10-03 01:15:02 UTC
  • mfrom: (1092.2.28)
  • Revision ID: robertc@robertcollins.net-20051003011502-f579a509a136b774
mergeĀ fromĀ baz2bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
    Each id is listed only once.
36
36
 
37
37
    Files that are both modified and renamed are listed only in
38
 
    renamed, with the text_modified flag true.
 
38
    renamed, with the text_modified flag true. The text_modified
 
39
    applies either to the the content of the file or the target of the
 
40
    symbolic link, depending of the kind of file.
39
41
 
40
42
    Files are only considered renamed if their name has changed or
41
43
    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