What's in the trash

Bug #136942 reported by Vincent Ladeuil
4
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Wishlist
Unassigned

Bug Description

It would be nice to be able to search for removed files in the context of a branch.

Sometimes you know you removed a file from a project, but you can't remember its name nor when you deleted it.

Being able to ask bzr to list all the removed files with the associated revision that removed it may be simple to implement and provides the necessary hints.

This doesn't need to be implemented in bzr core, a plugin may be enough.

Vincent Ladeuil (vila)
Changed in bzr:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

I think we could do this by extending log with a --status-flags option. The value would be a set of letters as listed by bzr help status-flags. The output would implicitly include deltas (like -v).

To fine all deletions, you could then do something like:

  bzr log --status-flags D

Additions, renames and deletes of file foo...

  bzr log --status-flags NRD foo

In the latter case, the delta should be filtered to only show the specified file(s).

Revision history for this message
Parth Malwankar (parthm) wrote :

I have updated the bzr-undelete plugin with --find option which
looks through last N commits for file names matching the
specified regex.

Its doesn't specifically look for deleted files but may be useful in
this scenario. The use case I had in mind was that if we don't
remember the name of the deleted file, we find it with the regex
and then issue the undelete command if needed.

https://launchpad.net/bzr-undelete

Here is a test run:

[test]% bzr st a.txt
nonexistent:
  a.txt
bzr: ERROR: Path(s) do not exist: a.txt
[test]% bzr undelete --find "a.*t"
revno: 15
     batman
     parth
revno: 14
     parth
revno: 13
     parth
revno: 12
     parth
revno: 11
     parth
revno: 1
     a.txt
[test]% bzr undelete a.txt
[test]% bzr st a.txt
added:
  a.txt
[test]% bzr revert
-D a.txt

Martin Pool (mbp)
Changed in bzr:
status: Triaged → Confirmed
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.