Show More
@@ -713,7 +713,8 b' code by typing `M-x find-library mercuri' | |||
|
713 | 713 | (insert (documentation 'hg-mode)) |
|
714 | 714 | (goto-char pos) |
|
715 | 715 | (end-of-line 1) |
|
716 |
(delete-region pos (point))) |
|
|
716 | (delete-region pos (point))) | |
|
717 | (cd (hg-root)))) | |
|
717 | 718 | |
|
718 | 719 | (defun hg-add (path) |
|
719 | 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 | 723 | (let ((buf (current-buffer)) |
|
723 | 724 | (update (equal buffer-file-name path))) |
|
724 | 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 | 731 | (when update |
|
727 | 732 | (with-current-buffer buf |
|
728 | 733 | (hg-mode-line))))) |
@@ -891,7 +896,8 b' Key bindings' | |||
|
891 | 896 | (search-forward hg-commit-message-start) |
|
892 | 897 | (add-text-properties (match-beginning 0) (match-end 0) |
|
893 | 898 | '(read-only t))) |
|
894 |
(hg-commit-mode) |
|
|
899 | (hg-commit-mode) | |
|
900 | (cd root)))))) | |
|
895 | 901 | |
|
896 | 902 | (defun hg-diff (path &optional rev1 rev2) |
|
897 | 903 | "Show the differences between REV1 and REV2 of PATH. |
@@ -929,7 +935,8 b' With a prefix argument, prompt for all o' | |||
|
929 | 935 | (call-process (hg-binary) nil t nil "diff" "-r" rev1 "-r" rev2 path))) |
|
930 | 936 | (diff-mode) |
|
931 | 937 | (setq diff (not (= (point-min) (point-max)))) |
|
932 |
(font-lock-fontify-buffer) |
|
|
938 | (font-lock-fontify-buffer) | |
|
939 | (cd (hg-root path))) | |
|
933 | 940 | diff)) |
|
934 | 941 | |
|
935 | 942 | (defun hg-diff-repo (path &optional rev1 rev2) |
@@ -954,7 +961,11 b' With a prefix argument, prompt for the p' | |||
|
954 | 961 | (let ((buf (current-buffer)) |
|
955 | 962 | (update (equal buffer-file-name path))) |
|
956 | 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 | 969 | (when update |
|
959 | 970 | (with-current-buffer buf |
|
960 | 971 | (hg-mode-line))))) |
@@ -968,7 +979,8 b' With a prefix argument, prompt for the p' | |||
|
968 | 979 | (or repo hg-incoming-repository)))) |
|
969 | 980 | (call-process (hg-binary) nil t nil "incoming" |
|
970 | 981 | (or repo hg-incoming-repository)) |
|
971 |
(hg-log-mode) |
|
|
982 | (hg-log-mode) | |
|
983 | (cd (hg-root)))) | |
|
972 | 984 | |
|
973 | 985 | (defun hg-init () |
|
974 | 986 | (interactive) |
@@ -1012,7 +1024,8 b' With a prefix argument, prompt for each ' | |||
|
1012 | 1024 | (if (> (length path) (length (hg-root path))) |
|
1013 | 1025 | (cons path nil) |
|
1014 | 1026 | nil))) |
|
1015 |
(hg-log-mode) |
|
|
1027 | (hg-log-mode) | |
|
1028 | (cd (hg-root path))))) | |
|
1016 | 1029 | |
|
1017 | 1030 | (defun hg-log-repo (path &optional rev1 rev2 log-limit) |
|
1018 | 1031 | "Display the revision history of the repository containing PATH. |
@@ -1041,7 +1054,8 b' With a prefix argument, prompt for each ' | |||
|
1041 | 1054 | (or repo hg-outgoing-repository)))) |
|
1042 | 1055 | (call-process (hg-binary) nil t nil "outgoing" |
|
1043 | 1056 | (or repo hg-outgoing-repository)) |
|
1044 |
(hg-log-mode) |
|
|
1057 | (hg-log-mode) | |
|
1058 | (cd (hg-root)))) | |
|
1045 | 1059 | |
|
1046 | 1060 | (defun hg-pull (&optional repo) |
|
1047 | 1061 | "Pull changes from repository REPO. |
@@ -1052,7 +1066,8 b' This does not update the working directo' | |||
|
1052 | 1066 | (hg-abbrev-file-name |
|
1053 | 1067 | (or repo hg-incoming-repository)))) |
|
1054 | 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 | 1072 | (defun hg-push (&optional repo) |
|
1058 | 1073 | "Push changes to repository REPO." |
@@ -1062,7 +1077,8 b' This does not update the working directo' | |||
|
1062 | 1077 | (hg-abbrev-file-name |
|
1063 | 1078 | (or repo hg-outgoing-repository)))) |
|
1064 | 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 | 1083 | (defun hg-revert-buffer-internal () |
|
1068 | 1084 | (let ((ctx (hg-buffer-context))) |
@@ -1134,7 +1150,8 b' Names are displayed relative to the repo' | |||
|
1134 | 1150 | "*")) |
|
1135 | 1151 | (hg-abbrev-file-name root))) |
|
1136 | 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 | 1156 | (defun hg-undo () |
|
1140 | 1157 | (interactive) |
General Comments 0
You need to be logged in to leave comments.
Login now