running 'bzr status' on an unknown file falls back to default 'bzr status'
Bug #53638 reported by
Szilveszter Farkas
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Medium
|
John A Meinel |
Bug Description
Steps to reproduce:
---
phanatic@
phanatic@
phanatic@
phanatic@
added a.py
phanatic@
added:
a.py
phanatic@
added:
a.py
unknown:
b.py
phanatic@
added:
a.py
unknown:
b.py
---
I think that 'bzr status <unknown_file>' shouldn't fallback to the default behaviour of 'bzr status'. Instead, it should just print 'unknown: <unknown_file>'
Related branches
description: | updated |
Changed in bzr: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The specific implementation issue is that compare_trees filters the trees by 'file_id', not by path. So compare_trees itself does not operate on unknown files. (It uses the file id to match between the trees anyway).
Now 'show_tree_status' is a higher level wrapper around compare_trees, which then goes through unknowns after it processed compare_trees.
So the specific bug is that passing in a specific_file_list may result in an empty specific_file_ids list, which then results in a complete delta.
This patch should fix that specific bug, so that if a list is sent that only contains unknown files, compare_trees just returns an empty delta.
=== modified file 'bzrlib/delta.py'
trees = trees + tuple(extra_trees)
specific_ file_ids = tree.find_ ids_across_ trees(specific_ files,
trees, require_ versioned= require_ versioned) trees(old_ tree, new_tree, want_unchanged,
specific_ file_ids)
--- bzrlib/delta.py 2006-07-06 13:51:22 +0000
+++ bzrlib/delta.py 2006-07-21 13:31:40 +0000
@@ -184,6 +184,9 @@
+ if specific_files and not specific_file_ids:
+ # All the requested files are unknowns
+ return TreeDelta()
return _compare_
finally: