Show More
@@ -47,6 +47,7 b'' | |||
|
47 | 47 | (require 'cl) |
|
48 | 48 | (require 'diff-mode) |
|
49 | 49 | (require 'easymenu) |
|
50 | (require 'executable) | |
|
50 | 51 | (require 'vc) |
|
51 | 52 | |
|
52 | 53 | |
@@ -295,6 +296,17 b' If the command does not exit with a zero' | |||
|
295 | 296 | (car res)) |
|
296 | 297 | (cdr res)))) |
|
297 | 298 | |
|
299 | (defun hg-sync-buffers (path) | |
|
300 | "Sync buffers visiting PATH with their on-disk copies. | |
|
301 | If PATH is not being visited, but is under the repository root, sync | |
|
302 | all buffers visiting files in the repository." | |
|
303 | (let ((buf (find-buffer-visiting path))) | |
|
304 | (if buf | |
|
305 | (with-current-buffer buf | |
|
306 | (vc-buffer-sync)) | |
|
307 | (hg-do-across-repo path | |
|
308 | (vc-buffer-sync))))) | |
|
309 | ||
|
298 | 310 | (defun hg-buffer-commands (pnt) |
|
299 | 311 | "Use the properties of a character to do something sensible." |
|
300 | 312 | (interactive "d") |
@@ -732,8 +744,7 b' Key bindings' | |||
|
732 | 744 | modified-files) |
|
733 | 745 | (unless root |
|
734 | 746 | (error "Cannot commit outside a repository!")) |
|
735 | (hg-do-across-repo | |
|
736 | (vc-buffer-sync)) | |
|
747 | (hg-sync-buffers root) | |
|
737 | 748 | (setq modified-files (hg-chomp (hg-run0 "--cwd" root "status" "-arm"))) |
|
738 | 749 | (when (and (= (length modified-files) 0) |
|
739 | 750 | (not hg-commit-allow-empty-file-list)) |
@@ -789,6 +800,7 b' With a prefix argument, prompt for all o' | |||
|
789 | 800 | (and (not (eq rev2 'working-dir)) rev2)))) |
|
790 | 801 | (unless rev1 |
|
791 | 802 | (setq rev1 "-1")) |
|
803 | (hg-sync-buffers path) | |
|
792 | 804 | (let ((a-path (hg-abbrev-file-name path)) |
|
793 | 805 | diff) |
|
794 | 806 | (hg-view-output ((if (equal rev1 rev2) |
General Comments 0
You need to be logged in to leave comments.
Login now