~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/delta.py

  • Committer: Daniel Silverstone
  • Date: 2005-11-16 01:36:39 UTC
  • mto: (1185.72.1 bzr.dev)
  • mto: This revision was merged to the branch mainline in revision 1509.
  • Revision ID: dsilvers@digital-scurf.org-20051116013639-9cf6ba2d9fe0125d
Allow the delta display routine to show when a file
has been both renamed and modified in any way (text or meta)

This is done without altering the internal structure of the
TreeDelta object in case it is needed elsewhere as-is

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
            print >>to_file, 'added:'
115
115
            show_list(self.added)
116
116
 
 
117
        extra_modified = []
 
118
 
117
119
        if self.renamed:
118
120
            print >>to_file, 'renamed:'
119
121
            for (oldpath, newpath, fid, kind,
120
122
                 text_modified, meta_modified) in self.renamed:
 
123
                if text_modified or meta_modified:
 
124
                    extra_modified.append((newpath, fid, kind,
 
125
                                           text_modified, meta_modified))
121
126
                if meta_modified:
122
127
                    newpath += '*'
123
128
                if show_ids:
125
130
                else:
126
131
                    print >>to_file, '  %s => %s' % (oldpath, newpath)
127
132
                    
128
 
        if self.modified:
 
133
        if self.modified or extra_modified:
129
134
            print >>to_file, 'modified:'
130
135
            show_list(self.modified)
 
136
            show_list(extra_modified)
131
137
            
132
138
        if show_unchanged and self.unchanged:
133
139
            print >>to_file, 'unchanged:'