bzr remove needs a --keep-remote option to avoid remote deletes

Bug #772127 reported by James
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

Hi

Ref: https://bugs.launchpad.net/bugs/402196

I hit this issue again with some files that were versioned but needed to be unversioned, but kept on disk. On reading the original bug I noticed a suggestion to make a feature request for a '--keep-remote' option (or similar naming).

Here's another take it from some googling, which describes the process from another developer:
http://stackoverflow.com/questions/2648362/remove-files-from-bazaar

"We need a way to make sure that a bzr push or bzr pull doesn't actually remove those from the working copy. Anyone have any ideas?"

I'd add to that the solution needs to involve zero manual work on updating a operation-critical remote branch non destructively (for instance a website). At the moment if someone runs a bzr remove --keep I can see this happening in a staging branch and make allowances for it manually before a critical branch is updated. It would be nice to be able to run bzr pull without having to do manual reverts and undeletes.

As I understand it:

* 'bzr remove' marks the file as removed, which is then removed from disk and bzr in all remote branches (when they are pulled)
* adding the --keep flag removes it from bzr in all remotes when pulled but only keeps it on disk in the developer's branch where --keep was supplied.
* when my co-developers pull my changes, suddenly required files are removed from disk meaning I need to notify them about this beforehand. phone, email etc.
* on a critical branch it's not suitable that important files are destroyed on a pull -- there is a timelag involved in reverting them OR I have to copy the files/symlinks/directories and add them back in after the pull. much better to just keep them on disk.

My solution would be to add a --keep-remote rather than alter the behaviour of --keep as people may be relying on the current behaviour.

--keep-remote would
1. do everything --keep does but
2. mark the file as 'kept', when a remote branch is updated via pull, the file is removed from bzr but kept on disk.

To avoid the files being versioned again, I could add it to the ignore file. If at some point, the files need to be removed from disk then they can be manually removed as required. That's outside the sphere of bzr, though.

This option would remove the need for manual mv/cp revert/undelete work when updating remote branches.

Thanks
James

Revision history for this message
James (james-ellis-gmail) wrote :

i've marked this as "opinion", I can't see anywhere to make it a "feature request" as suggested.

Changed in bzr:
status: New → Opinion
Revision history for this message
Martin Pool (mbp) wrote :

I'm not sure this should be an option to 'rm' but there's definitely a need to express it somehow.

Changed in bzr:
status: Opinion → Confirmed
importance: Undecided → Medium
tags: added: feature
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.