From 26afaccc28bcb7187dbb1b50cae3154753c1b14d Mon Sep 17 00:00:00 2001 From: Kai Tetzlaff Date: Wed, 27 Jul 2011 08:38:18 +0200 Subject: [PATCH] update subrepo elisp-vcs --- dvc/Makefile.in | 2 ++ dvc/lisp/Makefile.in | 2 +- dvc/lisp/xmtn-automate.el | 34 +++++++++++++++++++++++++++++++--- dvc/lisp/xmtn-conflicts.el | 16 +++++++++++++--- dvc/lisp/xmtn-multi-status.el | 2 ++ dvc/lisp/xmtn-sync.el | 6 ++++++ 6 files changed, 55 insertions(+), 7 deletions(-) diff --git a/dvc/Makefile.in b/dvc/Makefile.in index d16f9df..207d68d 100644 --- a/dvc/Makefile.in +++ b/dvc/Makefile.in @@ -82,6 +82,8 @@ miscfiles = Makefile.in COPYING INSTALL* install-sh \ dvc-load.el.in dvc-load-install.el.in \ lisp/dvc-version.el \ texinfo/dvc-version.texinfo \ + texinfo/dvc-intro.texinfo \ + texinfo/fdl.texinfo \ configure.ac configure extradist = diff --git a/dvc/lisp/Makefile.in b/dvc/lisp/Makefile.in index 11a37fe..4c5da3f 100644 --- a/dvc/lisp/Makefile.in +++ b/dvc/lisp/Makefile.in @@ -53,7 +53,7 @@ install: all echo Installing $$elc ; \ $(INSTALL_DATA) $$elc "$(lispdir)" ; \ done - $(INSTALL_DATA) xmtn-hooks.lua $(lispdir) + $(INSTALL_DATA) $(srcdir)/xmtn-hooks.lua $(lispdir) clean: rm -f *.elc dvc-site.el \ diff --git a/dvc/lisp/xmtn-automate.el b/dvc/lisp/xmtn-automate.el index 2d7070d..34c25cd 100644 --- a/dvc/lisp/xmtn-automate.el +++ b/dvc/lisp/xmtn-automate.el @@ -316,10 +316,40 @@ Signals an error if output contains zero lines or more than one line." (buffer (xmtn-automate--new-buffer session)) (root (xmtn-automate--session-root session))) (let ((process-connection-type nil); use a pipe, not a tty +<<<<<<< TREE (default-directory root)) (let ((process (apply 'start-process name buffer xmtn-executable "automate" "stdio" xmtn-automate-arguments))) +======= + (default-directory root) + ;; start-process merges stderr and stdout from the child, + ;; but stderr messages are not packetized, so they confuse + ;; the packet parser. This is only a problem when the + ;; session will run 'sync ssh:' or 'sync file:', since those + ;; spawn new mtn processes that can report errors on + ;; stderr. All other errors will be reported properly thru + ;; the stdout packetized error stream. xmtn-sync uses the + ;; unique xmtn-sync-session-root for the session root, so we + ;; treat that specially. + (cmd (if (string= xmtn-sync-session-root (file-name-nondirectory root)) + (progn + (setf (xmtn-automate--session-error-file session) + (dvc-make-temp-name (concat xmtn-sync-session-root "-errors"))) + (list dvc-sh-executable + "-c" + (mapconcat + 'concat + (append (list xmtn-executable "--db=:memory:" "automate" "stdio") + xmtn-automate-arguments + (list "2>" + (xmtn-automate--session-error-file session))) + " "))) + ;; not the sync session + (append (list xmtn-executable "automate" "stdio") + xmtn-automate-arguments)))) + (let ((process (apply 'start-process name buffer cmd))) +>>>>>>> MERGE-SOURCE (ecase (process-status process) (run ;; If the process started ok, it outputs the stdio @@ -678,11 +708,9 @@ Each element of the list is a list; key, signature, name, value, trust." (defun xmtn--heads (root branch) (xmtn-automate-command-output-lines root - (cons - (list "ignore-suspend-certs" "") (list "heads" (or branch - (xmtn--tree-default-branch root)))))) + (xmtn--tree-default-branch root))))) (defun xmtn--rev-author (root rev) "Return first author of REV" diff --git a/dvc/lisp/xmtn-conflicts.el b/dvc/lisp/xmtn-conflicts.el index 1bef8b6..b104335 100644 --- a/dvc/lisp/xmtn-conflicts.el +++ b/dvc/lisp/xmtn-conflicts.el @@ -827,7 +827,7 @@ header." (defun xmtn-conflicts-resolve-ediff (side) "Resolve the current conflict via ediff SIDE." (interactive) - (if xmtn-conflicts-current-conflict-buffer + (if (buffer-live-p xmtn-conflicts-current-conflict-buffer) (error "another conflict resolution is already in progress.")) (let* ((elem (ewoc-locate xmtn-conflicts-ewoc)) @@ -950,24 +950,34 @@ header." ) (ewoc-invalidate xmtn-conflicts-ewoc elem))) +(defun xmtn-conflicts-left_resolution-needed (conflict) + (let ((res (xmtn-conflicts-conflict-left_resolution conflict))) + (or (not res) + (eq (car res) 'resolved_internal)))) + (defun xmtn-conflicts-resolve-user_leftp () "Non-nil if user_left resolution is appropriate for current conflict." (let* ((conflict (ewoc-data (ewoc-locate xmtn-conflicts-ewoc))) (type (xmtn-conflicts-conflict-conflict_type conflict))) - (and (not (xmtn-conflicts-conflict-left_resolution conflict)) + (and (xmtn-conflicts-left_resolution-needed conflict) (or (equal type 'content) (and (equal type 'duplicate_name) ;; if no file_id, it's a directory (xmtn-conflicts-conflict-left_file_id conflict))) ))) +(defun xmtn-conflicts-right_resolution-needed (conflict) + (let ((res (xmtn-conflicts-conflict-right_resolution conflict))) + (or (not res) + (eq (car res) 'resolved_internal)))) + (defun xmtn-conflicts-resolve-user_rightp () "Non-nil if user_right resolution is appropriate for current conflict." (let* ((conflict (ewoc-data (ewoc-locate xmtn-conflicts-ewoc))) (type (xmtn-conflicts-conflict-conflict_type conflict))) ;; duplicate_name is the only conflict type that needs a right resolution - (and (xmtn-conflicts-conflict-left_resolution conflict) + (and (xmtn-conflicts-right_resolution-needed conflict) (not (xmtn-conflicts-conflict-right_resolution conflict)) (equal type 'duplicate_name) ;; if no file_id, it's a directory diff --git a/dvc/lisp/xmtn-multi-status.el b/dvc/lisp/xmtn-multi-status.el index ac52ffd..8dc9950 100644 --- a/dvc/lisp/xmtn-multi-status.el +++ b/dvc/lisp/xmtn-multi-status.el @@ -494,6 +494,8 @@ If SAVE-CONFLICTS non-nil, don't delete conflicts files." (setq default-directory (xmtn-tree-root (expand-file-name work))) (setq xmtn-status-root (expand-file-name (concat (file-name-as-directory default-directory) "../"))) (setq xmtn-status-ewoc (ewoc-create 'xmtn-status-printer)) + ;; FIXME: sometimes, this causes problems for ewoc-set-hf (deletes bad region) + ;; But otherwise it is necessary to clean out old ewoc before creating new one. (let ((inhibit-read-only t)) (delete-region (point-min) (point-max))) (ewoc-set-hf xmtn-status-ewoc (format "Root : %s\n" xmtn-status-root) "") (ewoc-enter-last xmtn-status-ewoc diff --git a/dvc/lisp/xmtn-sync.el b/dvc/lisp/xmtn-sync.el index 3ef95b7..784f19e 100644 --- a/dvc/lisp/xmtn-sync.el +++ b/dvc/lisp/xmtn-sync.el @@ -562,6 +562,7 @@ Return non-nil if anything parsed." >>>>>>> MERGE-SOURCE ;;;###autoload +<<<<<<< TREE (defun xmtn-sync-sync (local-db remote-host remote-db) "Sync LOCAL-DB with REMOTE-HOST REMOTE-DB, display sent and received branches. Remote-db should include branch pattern in URI syntax." @@ -587,6 +588,11 @@ Remote-db should include branch pattern in URI syntax." "sync" (concat remote-host remote-db)) ;; command, args ))) ======= +======= +(defun xmtn-sync-sync (local-db scheme remote-host remote-db) + "Sync LOCAL-DB with using SCHEME to connect to REMOTE-HOST REMOTE-DB, display sent and received branches. +Remote-db should include branch pattern in URI syntax. Uses `xmtn-sync-executable' to run sync." +>>>>>>> MERGE-SOURCE (interactive "flocal db: \nMscheme: \nMremote-host: \nMremote-db: ") (pop-to-buffer (get-buffer-create "*xmtn-sync*"))