##// END OF EJS Templates
merge emacs changes.
Vadim Gelfer -
r2457:8e1004c6 merge default
parent child Browse files
Show More
@@ -713,7 +713,8 b' code by typing `M-x find-library mercuri'
713 (insert (documentation 'hg-mode))
713 (insert (documentation 'hg-mode))
714 (goto-char pos)
714 (goto-char pos)
715 (end-of-line 1)
715 (end-of-line 1)
716 (delete-region pos (point)))))
716 (delete-region pos (point)))
717 (cd (hg-root))))
717
718
718 (defun hg-add (path)
719 (defun hg-add (path)
719 "Add PATH to the Mercurial repository on the next commit.
720 "Add PATH to the Mercurial repository on the next commit.
@@ -722,7 +723,11 b' With a prefix argument, prompt for the p'
722 (let ((buf (current-buffer))
723 (let ((buf (current-buffer))
723 (update (equal buffer-file-name path)))
724 (update (equal buffer-file-name path)))
724 (hg-view-output (hg-output-buffer-name)
725 (hg-view-output (hg-output-buffer-name)
725 (apply 'call-process (hg-binary) nil t nil (list "add" path)))
726 (apply 'call-process (hg-binary) nil t nil (list "add" path))
727 ;; "hg add" shows pathes relative NOT TO ROOT BUT TO REPOSITORY
728 (replace-regexp " \\.\\.." " " nil 0 (buffer-size))
729 (goto-char 0)
730 (cd (hg-root path)))
726 (when update
731 (when update
727 (with-current-buffer buf
732 (with-current-buffer buf
728 (hg-mode-line)))))
733 (hg-mode-line)))))
@@ -891,7 +896,8 b' Key bindings'
891 (search-forward hg-commit-message-start)
896 (search-forward hg-commit-message-start)
892 (add-text-properties (match-beginning 0) (match-end 0)
897 (add-text-properties (match-beginning 0) (match-end 0)
893 '(read-only t)))
898 '(read-only t)))
894 (hg-commit-mode))))))
899 (hg-commit-mode)
900 (cd root))))))
895
901
896 (defun hg-diff (path &optional rev1 rev2)
902 (defun hg-diff (path &optional rev1 rev2)
897 "Show the differences between REV1 and REV2 of PATH.
903 "Show the differences between REV1 and REV2 of PATH.
@@ -929,7 +935,8 b' With a prefix argument, prompt for all o'
929 (call-process (hg-binary) nil t nil "diff" "-r" rev1 "-r" rev2 path)))
935 (call-process (hg-binary) nil t nil "diff" "-r" rev1 "-r" rev2 path)))
930 (diff-mode)
936 (diff-mode)
931 (setq diff (not (= (point-min) (point-max))))
937 (setq diff (not (= (point-min) (point-max))))
932 (font-lock-fontify-buffer))
938 (font-lock-fontify-buffer)
939 (cd (hg-root path)))
933 diff))
940 diff))
934
941
935 (defun hg-diff-repo (path &optional rev1 rev2)
942 (defun hg-diff-repo (path &optional rev1 rev2)
@@ -954,7 +961,11 b' With a prefix argument, prompt for the p'
954 (let ((buf (current-buffer))
961 (let ((buf (current-buffer))
955 (update (equal buffer-file-name path)))
962 (update (equal buffer-file-name path)))
956 (hg-view-output (hg-output-buffer-name)
963 (hg-view-output (hg-output-buffer-name)
957 (apply 'call-process (hg-binary) nil t nil (list "forget" path)))
964 (apply 'call-process (hg-binary) nil t nil (list "forget" path))
965 ;; "hg forget" shows pathes relative NOT TO ROOT BUT TO REPOSITORY
966 (replace-regexp " \\.\\.." " " nil 0 (buffer-size))
967 (goto-char 0)
968 (cd (hg-root path)))
958 (when update
969 (when update
959 (with-current-buffer buf
970 (with-current-buffer buf
960 (hg-mode-line)))))
971 (hg-mode-line)))))
@@ -968,7 +979,8 b' With a prefix argument, prompt for the p'
968 (or repo hg-incoming-repository))))
979 (or repo hg-incoming-repository))))
969 (call-process (hg-binary) nil t nil "incoming"
980 (call-process (hg-binary) nil t nil "incoming"
970 (or repo hg-incoming-repository))
981 (or repo hg-incoming-repository))
971 (hg-log-mode)))
982 (hg-log-mode)
983 (cd (hg-root))))
972
984
973 (defun hg-init ()
985 (defun hg-init ()
974 (interactive)
986 (interactive)
@@ -1012,7 +1024,8 b' With a prefix argument, prompt for each '
1012 (if (> (length path) (length (hg-root path)))
1024 (if (> (length path) (length (hg-root path)))
1013 (cons path nil)
1025 (cons path nil)
1014 nil)))
1026 nil)))
1015 (hg-log-mode))))
1027 (hg-log-mode)
1028 (cd (hg-root path)))))
1016
1029
1017 (defun hg-log-repo (path &optional rev1 rev2 log-limit)
1030 (defun hg-log-repo (path &optional rev1 rev2 log-limit)
1018 "Display the revision history of the repository containing PATH.
1031 "Display the revision history of the repository containing PATH.
@@ -1041,7 +1054,8 b' With a prefix argument, prompt for each '
1041 (or repo hg-outgoing-repository))))
1054 (or repo hg-outgoing-repository))))
1042 (call-process (hg-binary) nil t nil "outgoing"
1055 (call-process (hg-binary) nil t nil "outgoing"
1043 (or repo hg-outgoing-repository))
1056 (or repo hg-outgoing-repository))
1044 (hg-log-mode)))
1057 (hg-log-mode)
1058 (cd (hg-root))))
1045
1059
1046 (defun hg-pull (&optional repo)
1060 (defun hg-pull (&optional repo)
1047 "Pull changes from repository REPO.
1061 "Pull changes from repository REPO.
@@ -1052,7 +1066,8 b' This does not update the working directo'
1052 (hg-abbrev-file-name
1066 (hg-abbrev-file-name
1053 (or repo hg-incoming-repository))))
1067 (or repo hg-incoming-repository))))
1054 (call-process (hg-binary) nil t nil "pull"
1068 (call-process (hg-binary) nil t nil "pull"
1055 (or repo hg-incoming-repository))))
1069 (or repo hg-incoming-repository))
1070 (cd (hg-root))))
1056
1071
1057 (defun hg-push (&optional repo)
1072 (defun hg-push (&optional repo)
1058 "Push changes to repository REPO."
1073 "Push changes to repository REPO."
@@ -1062,7 +1077,8 b' This does not update the working directo'
1062 (hg-abbrev-file-name
1077 (hg-abbrev-file-name
1063 (or repo hg-outgoing-repository))))
1078 (or repo hg-outgoing-repository))))
1064 (call-process (hg-binary) nil t nil "push"
1079 (call-process (hg-binary) nil t nil "push"
1065 (or repo hg-outgoing-repository))))
1080 (or repo hg-outgoing-repository))
1081 (cd (hg-root))))
1066
1082
1067 (defun hg-revert-buffer-internal ()
1083 (defun hg-revert-buffer-internal ()
1068 (let ((ctx (hg-buffer-context)))
1084 (let ((ctx (hg-buffer-context)))
@@ -1134,7 +1150,8 b' Names are displayed relative to the repo'
1134 "*"))
1150 "*"))
1135 (hg-abbrev-file-name root)))
1151 (hg-abbrev-file-name root)))
1136 (apply 'call-process (hg-binary) nil t nil
1152 (apply 'call-process (hg-binary) nil t nil
1137 (list "--cwd" root "status" path)))))
1153 (list "--cwd" root "status" path))
1154 (cd (hg-root path)))))
1138
1155
1139 (defun hg-undo ()
1156 (defun hg-undo ()
1140 (interactive)
1157 (interactive)
General Comments 0
You need to be logged in to leave comments. Login now