1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-25 10:47:00 +00:00

* admin/bzrmerge.el (bzrmerge-apply): Warn the user when the tree might be in

an inconsistent state.
This commit is contained in:
Stefan Monnier 2011-01-17 16:18:00 -05:00
parent 61f74651c4
commit 41f44310b3
2 changed files with 16 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2011-01-17 Stefan Monnier <monnier@iro.umontreal.ca>
* bzrmerge.el (bzrmerge-apply): Warn the user when the tree might be in
an inconsistent state.
2011-01-17 Paul Eggert <eggert@cs.ucla.edu>
Update copyright notes to match recent gnulib-related changes.

View File

@ -218,6 +218,7 @@ Does not make other difference."
(setq bzrmerge-already-done nil)
(let ((merge (car missing))
(skip (cdr missing))
(unsafe nil)
beg end)
(when (or merge skip)
(cond
@ -249,6 +250,7 @@ Does not make other difference."
"--force" "-r" (format "%s..%s" beg end) from)
;; The merge did not update the metadata, so force the next time
;; around to update it (as a "skip").
(setq unsafe t)
(push end skip))
(pop-to-buffer (current-buffer))
(sit-for 1)
@ -271,6 +273,15 @@ Does not make other difference."
(when conflicted
(setq bzrmerge-already-done
(list (cons merge skip) from missing))
(if unsafe
;; FIXME: Obviously, we'd rather make it right rather
;; than output such a warning. But I don't know how to add
;; the metadata to bzr's since the technique used in
;; bzrmerge-add-metadata does not work when there
;; are conflicts.
(display-warning 'bzrmerge "Resolve conflicts manually.
¡BEWARE! Important metadata is kept in this Emacs session!
Do not commit without re-running `M-x bzrmerge' first!")))
(error "Resolve conflicts manually")))))
(cons merge skip)))))