Show More
@@ -712,7 +712,8 b' code by typing `M-x find-library mercuri' | |||
|
712 | 712 | (let ((pos (point))) |
|
713 | 713 | (insert (documentation 'hg-mode)) |
|
714 | 714 | (goto-char pos) |
|
715 |
(kill-line)) |
|
|
715 | (kill-line)) | |
|
716 | (cd (hg-root)))) | |
|
716 | 717 | |
|
717 | 718 | (defun hg-add (path) |
|
718 | 719 | "Add PATH to the Mercurial repository on the next commit. |
@@ -721,7 +722,11 b' With a prefix argument, prompt for the p' | |||
|
721 | 722 | (let ((buf (current-buffer)) |
|
722 | 723 | (update (equal buffer-file-name path))) |
|
723 | 724 | (hg-view-output (hg-output-buffer-name) |
|
724 |
(apply 'call-process (hg-binary) nil t nil (list "add" path)) |
|
|
725 | (apply 'call-process (hg-binary) nil t nil (list "add" path)) | |
|
726 | ;; "hg add" shows pathes relative NOT TO ROOT BUT TO REPOSITORY | |
|
727 | (replace-regexp " \\.\\.." " " nil 0 (buffer-size)) | |
|
728 | (goto-char 0) | |
|
729 | (cd (hg-root path))) | |
|
725 | 730 | (when update |
|
726 | 731 | (with-current-buffer buf |
|
727 | 732 | (hg-mode-line))))) |
@@ -890,7 +895,8 b' Key bindings' | |||
|
890 | 895 | (search-forward hg-commit-message-start) |
|
891 | 896 | (add-text-properties (match-beginning 0) (match-end 0) |
|
892 | 897 | '(read-only t))) |
|
893 |
(hg-commit-mode) |
|
|
898 | (hg-commit-mode) | |
|
899 | (cd root)))))) | |
|
894 | 900 | |
|
895 | 901 | (defun hg-diff (path &optional rev1 rev2) |
|
896 | 902 | "Show the differences between REV1 and REV2 of PATH. |
@@ -919,7 +925,8 b' With a prefix argument, prompt for all o' | |||
|
919 | 925 | (call-process (hg-binary) nil t nil "diff" "-r" r1 path)) |
|
920 | 926 | (diff-mode) |
|
921 | 927 | (setq diff (not (= (point-min) (point-max)))) |
|
922 |
(font-lock-fontify-buffer) |
|
|
928 | (font-lock-fontify-buffer) | |
|
929 | (cd (hg-root path))) | |
|
923 | 930 | diff)) |
|
924 | 931 | |
|
925 | 932 | (defun hg-diff-repo () |
@@ -936,7 +943,11 b' With a prefix argument, prompt for the p' | |||
|
936 | 943 | (let ((buf (current-buffer)) |
|
937 | 944 | (update (equal buffer-file-name path))) |
|
938 | 945 | (hg-view-output (hg-output-buffer-name) |
|
939 |
(apply 'call-process (hg-binary) nil t nil (list "forget" path)) |
|
|
946 | (apply 'call-process (hg-binary) nil t nil (list "forget" path)) | |
|
947 | ;; "hg forget" shows pathes relative NOT TO ROOT BUT TO REPOSITORY | |
|
948 | (replace-regexp " \\.\\.." " " nil 0 (buffer-size)) | |
|
949 | (goto-char 0) | |
|
950 | (cd (hg-root path))) | |
|
940 | 951 | (when update |
|
941 | 952 | (with-current-buffer buf |
|
942 | 953 | (hg-mode-line))))) |
@@ -950,7 +961,8 b' With a prefix argument, prompt for the p' | |||
|
950 | 961 | (or repo hg-incoming-repository)))) |
|
951 | 962 | (call-process (hg-binary) nil t nil "incoming" |
|
952 | 963 | (or repo hg-incoming-repository)) |
|
953 |
(hg-log-mode) |
|
|
964 | (hg-log-mode) | |
|
965 | (cd (hg-root)))) | |
|
954 | 966 | |
|
955 | 967 | (defun hg-init () |
|
956 | 968 | (interactive) |
@@ -994,7 +1006,8 b' With a prefix argument, prompt for each ' | |||
|
994 | 1006 | (if (> (length path) (length (hg-root path))) |
|
995 | 1007 | (cons path nil) |
|
996 | 1008 | nil))) |
|
997 |
(hg-log-mode) |
|
|
1009 | (hg-log-mode) | |
|
1010 | (cd (hg-root path))))) | |
|
998 | 1011 | |
|
999 | 1012 | (defun hg-log-repo (path &optional rev1 rev2 log-limit) |
|
1000 | 1013 | "Display the revision history of the repository containing PATH. |
@@ -1023,7 +1036,8 b' With a prefix argument, prompt for each ' | |||
|
1023 | 1036 | (or repo hg-outgoing-repository)))) |
|
1024 | 1037 | (call-process (hg-binary) nil t nil "outgoing" |
|
1025 | 1038 | (or repo hg-outgoing-repository)) |
|
1026 |
(hg-log-mode) |
|
|
1039 | (hg-log-mode) | |
|
1040 | (cd (hg-root)))) | |
|
1027 | 1041 | |
|
1028 | 1042 | (defun hg-pull (&optional repo) |
|
1029 | 1043 | "Pull changes from repository REPO. |
@@ -1034,7 +1048,8 b' This does not update the working directo' | |||
|
1034 | 1048 | (hg-abbrev-file-name |
|
1035 | 1049 | (or repo hg-incoming-repository)))) |
|
1036 | 1050 | (call-process (hg-binary) nil t nil "pull" |
|
1037 |
(or repo hg-incoming-repository)) |
|
|
1051 | (or repo hg-incoming-repository)) | |
|
1052 | (cd (hg-root)))) | |
|
1038 | 1053 | |
|
1039 | 1054 | (defun hg-push (&optional repo) |
|
1040 | 1055 | "Push changes to repository REPO." |
@@ -1044,7 +1059,8 b' This does not update the working directo' | |||
|
1044 | 1059 | (hg-abbrev-file-name |
|
1045 | 1060 | (or repo hg-outgoing-repository)))) |
|
1046 | 1061 | (call-process (hg-binary) nil t nil "push" |
|
1047 |
(or repo hg-outgoing-repository)) |
|
|
1062 | (or repo hg-outgoing-repository)) | |
|
1063 | (cd (hg-root)))) | |
|
1048 | 1064 | |
|
1049 | 1065 | (defun hg-revert-buffer-internal () |
|
1050 | 1066 | (let ((ctx (hg-buffer-context))) |
@@ -1112,7 +1128,8 b' Names are displayed relative to the repo' | |||
|
1112 | 1128 | "*")) |
|
1113 | 1129 | (hg-abbrev-file-name root))) |
|
1114 | 1130 | (apply 'call-process (hg-binary) nil t nil |
|
1115 |
(list "--cwd" root "status" path)) |
|
|
1131 | (list "--cwd" root "status" path)) | |
|
1132 | (cd (hg-root path))))) | |
|
1116 | 1133 | |
|
1117 | 1134 | (defun hg-undo () |
|
1118 | 1135 | (interactive) |
General Comments 0
You need to be logged in to leave comments.
Login now