vc-update fails

Bug #148877 reported by Soh Kam Yung
2
Affects Status Importance Assigned to Milestone
vc-bzr
Won't Fix
Undecided
Riccardo Murri

Bug Description

Emacs is displaying file <xxx> which is under the bzr version control. I make some changes to file.

I then commit the change to <xxx> using the command-line (bzr commit -m "..." <xxx>).

I attempted to update the emacs buffer for <xxx> using 'vc-update', but it fails with the following message:

"vc-update: Sorry, merging news is not implemented for Bzr"

Riccardo Murri (rmurri)
Changed in vc-bzr:
assignee: nobody → rmurri
status: New → Confirmed
Revision history for this message
Riccardo Murri (rmurri) wrote : vc-update use cases?

On second thought: true, `vc-bzr` lacks vc-merge-news support, but
that is not what you want here.

vc-merge-news is used when the (on-disk) working copy of the file
needs to be updated from a newer copy in the repository, and the Emacs
buffer is updated as a consequence. This happens with centralized
VCSes like CVS or SVN, where many working copies read and write
changes to the same central repository: the remote repository copy can
differ from the local working copy because someone else committed
changes that you will need to merge into your local working copy.

This *does not* happen with Bzr, as each working tree has an
associated repository (branch), and the working copy is updated each
time the branch is updated. Bzr does not update the working tree only
in case of a `push` to a remote branch, so I think the only use case
for merge-news in Bzr would be the following:

  1. Commit some changes to a local branch
  2. `bzr push` the changes to a remote branch via SSH/SFTP
  3. Use Emacs+Tramp to open a file in the remote branch' working tree
  4. Use `vc-update` to update the remote working tree file (and Emacs
     buffer) contents to match the latest branch changes.

Are there any other use cases for vc-update with Bzr?

If you just want to update the buffer contents from the file contents,
use `M-x revert-buffer` (Warning: this will discard any unsaved changes
in the buffer!)

Revision history for this message
Riccardo Murri (rmurri) wrote :

I've committed a patch that "mostly works", but a couple of bugs in
Bzr prevent it from properly detecting conflicts, see:

  https://bugs.launchpad.net/bugs/148964
  https://bugs.launchpad.net/bugs/148969

I think this bug cannot be closed before those are fixed...

Changed in vc-bzr:
status: Confirmed → In Progress
Revision history for this message
Riccardo Murri (rmurri) wrote :

The merge-news functionality of current vc.el is not suited for Bzr, see: http://www.nabble.com/Re%3A-Another-VC-terminology-change--p13178719.html

I have thus removed `vc-bzr-merge-news' from the mainstream `trunk' branch, and created an experimental branch to host it.

Revision history for this message
Riccardo Murri (rmurri) wrote :

I no longer have time to work on vc-bzr; please refer to the GNU Emacs CVS sources.

Changed in vc-bzr:
status: In Progress → Won't Fix
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.