No interface to undelete a file

Bug #788969 reported by Greg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Explorer
Confirmed
Low
Unassigned

Bug Description

I could not find any interface in Bazaar Explorer to undelete a file (which had been deleted as part of a previous commit).
Possible work-arounds are:
1) Browse the Log to find a revision containing the file, then manually copy the text to a newly created file.
This works but is tedious and may potentially lose file characters since I was copying from some viewing application using Copy & Paste.
2) 'Reverse cherry pick' to a revision containing the file, then 'revert working tree' except for the restored file(s) I'm after.
This kind of works but is messy as conflicts which are present leave temporary merge marker files around. I'm also concerned that this operation may cause incorrect history to be reported as I am not really reverse cherry picking, just trying to access an old file.
3) There is a way using bzr commands, it seems, to revert only a single file from a revision. I did not try this as I was trying to work within Bazaar Explorer. (source: https://answers.launchpad.net/bzr/+question/51092 )

Ideally, Bazaar Explorer would have a filter (like other GUIs) to 'show deleted' files and I can click and undelete to the last valid revision. Perhaps QBZR could have more options on the right click context menu to add this in its Browse view.

Revision history for this message
Alexander Belchenko (bialix) wrote :

Greg, bzr itself has no UI to undelete files, so we don't have anything directly accessible in the qbzr/explorer.
And because bzr assigns special unique file-ids to each file then on undelete you should restire not only file content but also its fileid. So I think no.1 above is the wrong way to undelete. It could be useful to have as part of qcat or as context menuy maybe to save content of the file at some revision with user-specified name. But this should be separate bug against qbzr. Can you file it please?

So I think the best way is no.3 -- revert one file to the desired state. You can invoke this command even now in bzr-explorer with All Commands dialog.

So, actually your proposal as you explained it:

"Ideally, Bazaar Explorer would have a filter (like other GUIs) to 'show deleted' files and I can click and undelete to the last valid revision. Perhaps QBZR could have more options on the right click context menu to add this in its Browse view."

cannot be implemented in the direct way, because bzr has no list of deleted files. To find all deleted files we need to scan the entire history of the project and check every revision, and for every revision check the delta for deleted files. As you may imagine it will be very slow for long history. This is related to the bug report about "log doesn't show deleted files" or something similar, can't find it right now.

By your links to bzr answers I found plugin https://launchpad.net/bzr-undelete which should help here.

Revision history for this message
Alexander Belchenko (bialix) wrote :

Another not quite related bug report: https://bugs.launchpad.net/qbzr/+bug/567348

Revision history for this message
Greg (gregspecialsource) wrote :

Thanks Axelander, I've submited a bug against qbzr : https://bugs.launchpad.net/qbzr/+bug/789538

Jonathan Riddell (jr)
Changed in bzr-explorer:
status: New → Confirmed
importance: Undecided → Low
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.