]> git.eshelyaron.com Git - emacs.git/commitdiff
* smerge-mode.el (smerge-auto): New function.
authorDan Nicolaescu <dann@ics.uci.edu>
Mon, 14 Jan 2008 07:38:05 +0000 (07:38 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Mon, 14 Jan 2008 07:38:05 +0000 (07:38 +0000)
* vc-svn.el (vc-svn-find-file-hook):
* vc-arch.el (vc-arch-find-file-hook):
* pcvs.el (cvs-revert-if-needed):
* vc.el (vc-maybe-resolve-conflicts): Use it instead of vc-mode.
(top-level): Add a Todo list.

lisp/ChangeLog
lisp/pcvs.el
lisp/smerge-mode.el
lisp/vc-arch.el
lisp/vc-svn.el
lisp/vc.el

index 3e9da0593db77307bd9a9986d2d6e2ed41408f1b..7c63ad22bef0e4ebd3677e949eeba0f8547d22df 100644 (file)
@@ -1,3 +1,12 @@
+2008-01-14  Dan Nicolaescu  <dann@ics.uci.edu>
+
+       * smerge-mode.el (smerge-auto): New function.
+       * vc-svn.el (vc-svn-find-file-hook):
+       * vc-arch.el (vc-arch-find-file-hook):
+       * pcvs.el (cvs-revert-if-needed):
+       * vc.el (vc-maybe-resolve-conflicts): Use it instead of vc-mode.
+       (top-level): Add a Todo list.
+
 2008-01-13  Dan Nicolaescu  <dann@ics.uci.edu>
 
        * vc.el (vc-update): Resolve conflicts if necessary instead of
index c4a7f67d93070da164ef41aa6601b0e56434c6e8..401962872a244368f3a68a91d50fd619906bdeb2 100644 (file)
@@ -2311,7 +2311,7 @@ this file, or a list of arguments to send to the program."
            ;; do want to reset the mode for VC, so we do it explicitly.
            (vc-find-file-hook)
            (when (eq (cvs-fileinfo->type fileinfo) 'CONFLICT)
-             (smerge-mode 1))))))))
+             (smerge-auto))))))))
 
 \f
 (defun cvs-change-cvsroot (newroot)
index b72107eb6c35107e01018b0c5ba5c75fe2068d8f..fe7d06e537b3f4cf7a1c0ec45d9a64eb9f7ec68a 100644 (file)
@@ -1021,6 +1021,14 @@ buffer names."
   (unless smerge-mode
     (smerge-remove-props (point-min) (point-max))))
 
+;;;###autoload
+(defun smerge-auto ()
+  "Turn on `smerge-mode' and move point to first conflict marker.
+If no conflict maker is found, turn off `smerge-mode'."
+  (smerge-mode 1)
+  (condition-case nil
+      (smerge-next)
+    (error (smerge-auto-leave))))
 
 (provide 'smerge-mode)
 
index 284fe032a25dacfe7fc8e2c88c6074892be28c7b..97c99dd81930d784e862125ca9eac66a14392a8b 100644 (file)
@@ -360,7 +360,7 @@ 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)
+             (smerge-auto)
              (add-hook 'after-save-hook
                        'vc-arch-delete-rej-if-obsolete nil t)
              (message "There are unresolved conflicts in this file")))
index e387b57d4fe97d5d105f329ccb230ce89cd887c5..16e10edc2028dc6a72ac22b3ce2cc69e37687beb 100644 (file)
@@ -551,7 +551,7 @@ and that it passes `vc-svn-global-switches' to it before FLAGS."
           (re-search-forward "^<<<<<<< " nil t))
         ;; There are conflict markers.
         (progn
-          (smerge-mode 1)
+          (smerge-auto)
           (add-hook 'after-save-hook 'vc-svn-resolve-when-done nil t))
       ;; There are no conflict markers.  This is problematic: maybe it means
       ;; the conflict has been resolved and we should immediately call "svn
index 5006af37ec52e3ab80eb15066cb5673a86540472..cc2627bb792e44b8b88b4fd7ff90f089fbcceb8d 100644 (file)
@@ -7,8 +7,6 @@
 ;; Maintainer: Andre Spiegel <spiegel@gnu.org>
 ;; Keywords: tools
 
-;; $Id$
-
 ;; This file is part of GNU Emacs.
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;;   to your backend and which does not map to any of the VC generic
 ;;   concepts.
 
+;;; Todo:
+
+;; - Make vc-checkin avoid reverting the buffer if has not changed
+;;   after the checkin.  Comparing (md5 BUFFER) to (md5 FILE) should
+;;   be enough.
+;;
+;; - vc-update/vc-merge should deal with VC systems that don't
+;;   update/merge on a file basis, but on a whole repository basis.
+;;
+;; - vc-register should register multiple files at a time. The
+;;  `register' backend function already supports that.
+;;
+;; - the *VC-log* buffer needs font-locking.
+;;
+;; - make it easier to write logs, maybe C-x 4 a should add to the log
+;;   buffer if there's one instead of the ChangeLog.
+;;
+;; - deal with push/pull operations.
+;;
+;; - decide if vc-status should replace vc-dired.
+;;
+;; - vc-status should be made asynchronous.
+;;
+;; - vc-status needs a menu, mouse bindings and some color bling.
+
 ;;; Code:
 
 (require 'vc-hooks)
@@ -2222,7 +2245,7 @@ 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)
+    (smerge-auto)
     (message "File contains conflicts.")))
 
 ;;;###autoload