bzr remove needs a --keep-remote option to avoid remote deletes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Hi
Ref: https:/
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://
"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/
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
tags: | added: check-for-breezy |
i've marked this as "opinion", I can't see anywhere to make it a "feature request" as suggested.