[with patch] bzr status doesn't give the file type for renamed files.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Medium
|
Unassigned |
Bug Description
bzr status appends a "@" or a "/" to filenames for directories and symlinks. It doesn't do that for renamed items, which is not consistant.
The patch below is an attempt to solve this.
=== modified file 'bzrlib/delta.py'
--- bzrlib/delta.py
+++ bzrlib/delta.py
@@ -120,10 +120,19 @@
if meta_modified:
+ 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)
- 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:'
Changed in bzr: | |
status: | Unconfirmed → Confirmed |
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'
text_ modified, meta_modified) in self.renamed:
newpath += '*'
else:
--- bzrlib/delta.py
+++ bzrlib/delta.py
@@ -120,10 +120,19 @@
if meta_modified:
+ 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)
- 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:'