Comment 1 for bug 4001

Revision history for this message
Matthieu Moy (matthieu-moy) wrote :

OOps, small bug in my patch itself. The last assignment on kind_str should be "kind_str = ''".

Below is the updated patch:

=== modified file 'bzrlib/delta.py'
--- bzrlib/delta.py
+++ bzrlib/delta.py
@@ -120,10 +120,19 @@
                  text_modified, meta_modified) in self.renamed:
                 if meta_modified:
                     newpath += '*'
+ if kind == 'directory':
+ kind_str = '/'
+ elif kind == 'symlink':
+ kind_str = '@'
+ else:
+ kind_str = ''
+
                 if show_ids:
- print >>to_file, ' %s => %s %s' % (oldpath, newpath, fid)
+ print >>to_file, ' %s%s => %s%s %s' % \
+ (oldpath, kind_str, newpath, kind_str, fid)
                 else:
- print >>to_file, ' %s => %s' % (oldpath, newpath)
+ print >>to_file, ' %s%s => %s%s' % \
+ (oldpath, kind_str, newpath, kind_str)

         if self.modified:
             print >>to_file, 'modified:'