CVS update by scop packages/unsupported/scop/vc, vc-arch.el ...
xemacs-cvs at xemacs.org
xemacs-cvs at xemacs.org
Sat Jul 7 12:37:51 EDT 2007
User: scop
Date: 07/07/07 18:37:51
Modified: packages/unsupported/scop/vc Makefile package-info.in
vc-arch.el vc.el ChangeLog
Removed: packages/unsupported/scop/vc smerge-mode.el
Log:
Revert back to old builtin vc-resolve-conflicts - smerge-mode.el requires too much porting work to be feasible at the moment.
Revision Changes Path
1.16 +2 -2 XEmacs/packages/unsupported/scop/vc/Makefile
Index: Makefile
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/unsupported/scop/vc/Makefile,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -p -r1.15 -r1.16
--- Makefile 2007/06/24 21:05:39 1.15
+++ Makefile 2007/07/07 16:37:45 1.16
@@ -23,11 +23,11 @@ MAINTAINER = Ville Skyttä <scop at xemacs.o
PACKAGE = vc
PKG_TYPE = regular
REQUIRES = dired xemacs-base vc mail-lib ediff sh-script pcl-cvs tramp \
- prog-modes
+ prog-modes elib edebug
CATEGORY = unsupported
ELCS = vc-hooks.elc vc.elc vc-arch.elc vc-cvs.elc vc-git.elc vc-mcvs.elc \
vc-rcs.elc vc-sccs.elc vc-svn.elc mercurial.elc vc-xemacs.elc \
- log-edit.elc smerge-mode.elc
+ log-edit.elc
include ../../../XEmacs.rules
1.8 +1 -1 XEmacs/packages/unsupported/scop/vc/package-info.in
Index: package-info.in
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/unsupported/scop/vc/package-info.in,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- package-info.in 2007/05/21 16:33:27 1.7
+++ package-info.in 2007/07/07 16:37:45 1.8
@@ -13,7 +13,7 @@
filename FILENAME
md5sum MD5SUM
size SIZE
- provides (vc vc-hooks vc-arch vc-cvs vc-git vc-mcvs vc-rcs vc-sccs vc-svn mercurial vc-xemacs log-edit smerge-mode)
+ provides (vc vc-hooks vc-arch vc-cvs vc-git vc-mcvs vc-rcs vc-sccs vc-svn mercurial vc-xemacs log-edit)
requires (REQUIRES)
type regular
))
1.21 +2 -1 XEmacs/packages/unsupported/scop/vc/vc-arch.el
Index: vc-arch.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/unsupported/scop/vc/vc-arch.el,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -p -r1.20 -r1.21
--- vc-arch.el 2007/06/16 12:57:26 1.20
+++ vc-arch.el 2007/07/07 16:37:46 1.21
@@ -358,7 +358,8 @@ Return non-nil if FILE is unchanged."
(if (not (re-search-forward "^<<<<<<< " nil t))
;; The .rej file is obsolete.
(condition-case nil (delete-file rej) (error nil))
- (smerge-mode 1)
+ ;; XEmacs change: make smerge-mode optional.
+ (if (fboundp 'smerge-mode) (smerge-mode 1))
(add-hook 'after-save-hook
'vc-arch-delete-rej-if-obsolete nil t)
(message "There are unresolved conflicts in this file")))
1.41 +95 -3 XEmacs/packages/unsupported/scop/vc/vc.el
Index: vc.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/unsupported/scop/vc/vc.el,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -p -r1.40 -r1.41
--- vc.el 2007/06/24 21:04:21 1.40
+++ vc.el 2007/07/07 16:37:46 1.41
@@ -2101,11 +2101,103 @@ See Info node `Merging'."
(defun vc-maybe-resolve-conflicts (file status &optional name-A name-B)
(vc-resynch-buffer file t (not (buffer-modified-p)))
(if (zerop status) (message "Merge successful")
- (smerge-mode 1)
- (message "File contains conflicts.")))
+ ;; XEmacs change: use vc-resolve-conflicts instead of smerge-mode;
+ ;; also make doing that conditional like it used to be.
+ (if (y-or-n-p "Conflicts detected. Resolve them now? ")
+ (vc-resolve-conflicts name-A name-B)
+ (message "File contains conflicts."))))
+;; XEmacs change: original vc-resolve-conflicts brought back from GNU Emacs
+;; CVS rev 1.339 for use until smerge-mode is available for XEmacs.
+(defvar vc-ediff-windows)
+(defvar vc-ediff-result)
+(eval-when-compile
+ (defvar ediff-buffer-A)
+ (defvar ediff-buffer-B)
+ (defvar ediff-buffer-C)
+ (require 'ediff-util))
;;;###autoload
-(defalias 'vc-resolve-conflicts 'smerge-ediff)
+(defun vc-resolve-conflicts (&optional name-A name-B)
+ "Invoke ediff to resolve conflicts in the current buffer.
+The conflicts must be marked with rcsmerge conflict markers."
+ (interactive)
+ (vc-ensure-vc-buffer)
+ (let* ((found nil)
+ (file-name (file-name-nondirectory buffer-file-name))
+ (your-buffer (generate-new-buffer
+ (concat "*" file-name
+ " " (or name-A "WORKFILE") "*")))
+ (other-buffer (generate-new-buffer
+ (concat "*" file-name
+ " " (or name-B "CHECKED-IN") "*")))
+ (result-buffer (current-buffer)))
+ (save-excursion
+ (set-buffer your-buffer)
+ (erase-buffer)
+ (insert-buffer result-buffer)
+ (goto-char (point-min))
+ (while (re-search-forward (concat "^<<<<<<< "
+ (regexp-quote file-name) "\n") nil t)
+ (setq found t)
+ (replace-match "")
+ (if (not (re-search-forward "^=======\n" nil t))
+ (error "Malformed conflict marker"))
+ (replace-match "")
+ (let ((start (point)))
+ (if (not (re-search-forward "^>>>>>>> [0-9.]+\n" nil t))
+ (error "Malformed conflict marker"))
+ (delete-region start (point))))
+ (if (not found)
+ (progn
+ (kill-buffer your-buffer)
+ (kill-buffer other-buffer)
+ (error "No conflict markers found")))
+ (set-buffer other-buffer)
+ (erase-buffer)
+ (insert-buffer result-buffer)
+ (goto-char (point-min))
+ (while (re-search-forward (concat "^<<<<<<< "
+ (regexp-quote file-name) "\n") nil t)
+ (let ((start (match-beginning 0)))
+ (if (not (re-search-forward "^=======\n" nil t))
+ (error "Malformed conflict marker"))
+ (delete-region start (point))
+ (if (not (re-search-forward "^>>>>>>> [0-9.]+\n" nil t))
+ (error "Malformed conflict marker"))
+ (replace-match "")))
+ (let ((config (current-window-configuration))
+ (ediff-default-variant 'default-B))
+
+ ;; Fire up ediff.
+
+ (set-buffer (ediff-merge-buffers your-buffer other-buffer))
+
+ ;; Ediff is now set up, and we are in the control buffer.
+ ;; Do a few further adjustments and take precautions for exit.
+
+ (make-local-variable 'vc-ediff-windows)
+ (setq vc-ediff-windows config)
+ (make-local-variable 'vc-ediff-result)
+ (setq vc-ediff-result result-buffer)
+ (make-local-variable 'ediff-quit-hook)
+ (setq ediff-quit-hook
+ (lambda ()
+ (let ((buffer-A ediff-buffer-A)
+ (buffer-B ediff-buffer-B)
+ (buffer-C ediff-buffer-C)
+ (result vc-ediff-result)
+ (windows vc-ediff-windows))
+ (ediff-cleanup-mess)
+ (set-buffer result)
+ (erase-buffer)
+ (insert-buffer buffer-C)
+ (kill-buffer buffer-A)
+ (kill-buffer buffer-B)
+ (kill-buffer buffer-C)
+ (set-window-configuration windows)
+ (message "Conflict resolution finished; you may save the buffer"))))
+ (message "Please resolve conflicts now; exit ediff when done")
+ nil))))
;; The VC directory major mode. Coopt Dired for this.
;; All VC commands get mapped into logical equivalents.
1.79 +13 -0 XEmacs/packages/unsupported/scop/vc/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/unsupported/scop/vc/ChangeLog,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -p -r1.78 -r1.79
--- ChangeLog 2007/06/24 21:05:38 1.78
+++ ChangeLog 2007/07/07 16:37:46 1.79
@@ -1,3 +1,16 @@
+2007-07-07 Ville Skyttä <scop at xemacs.org>
+
+ * smerge-mode.el: Removed, requires too much porting work to be
+ feasible at the moment.
+ * Makefile (ELCS): Remove smerge-mode.elc.
+ * package-info.in (provides): Remove smerge-mode.
+
+ * vc.el: Bring back old `vc-resolve-conflicts'.
+ * vc-arch.el (vc-arch-find-file-hook): Make smerge-mode optional.
+
+ * Makefile (REQUIRES): Add elib and edebug (pulled in by ediff).
+
+
2007-06-24 Ville Skyttä <scop at xemacs.org>
* Makefile (VERSION): 0.92.
More information about the XEmacs-CVS
mailing list