changeset 4693:3f484688c702

mercurial.el: change default log range to tip:0 If the tip revision is smaller than hg-rev-completion-limit (defaults to 100), "hg log -r tip:-100" fails. Since performance does not differ between "hg log -l 50 -r tip:0" and "hg log -l 50 -r tip:-100" even on large repository, default range can be changed from "tip:-100" to "tip:0" without any drawbacks.
author NIIMI Satoshi <sa2c@sa2c.net>
date Tue, 22 May 2007 08:05:16 +0900
parents c135c6cddbec
children 6bf58c9400e2
files contrib/mercurial.el
diffstat 1 files changed, 6 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/mercurial.el	Sat Jun 23 22:25:11 2007 -0500
+++ b/contrib/mercurial.el	Tue May 22 08:05:16 2007 +0900
@@ -1083,20 +1083,19 @@
   "Display the revision history of PATH.
 History is displayed between REV1 and REV2.
 Number of displayed changesets is limited to LOG-LIMIT.
-REV1 defaults to the tip, while
-REV2 defaults to `hg-rev-completion-limit' changes from the tip revision.
+REV1 defaults to the tip, while REV2 defaults to 0.
 LOG-LIMIT defaults to `hg-log-limit'.
 With a prefix argument, prompt for each parameter."
   (interactive (list (hg-read-file-name " to log")
                      (hg-read-rev " to start with"
                                   "tip")
                      (hg-read-rev " to end with"
-                                  (format "%d" (- hg-rev-completion-limit)))
+				  "0")
                      (hg-read-number "Output limited to: "
                                      hg-log-limit)))
   (let ((a-path (hg-abbrev-file-name path))
-        (r1 (or rev1 (format "-%d" hg-rev-completion-limit)))
-        (r2 (or rev2 rev1 "tip"))
+        (r1 (or rev1 "tip"))
+        (r2 (or rev2 "0"))
         (limit (format "%d" (or log-limit hg-log-limit))))
     (hg-view-output ((if (equal r1 r2)
                          (format "Mercurial: Log of rev %s of %s" rev1 a-path)
@@ -1117,15 +1116,14 @@
   "Display the revision history of the repository containing PATH.
 History is displayed between REV1 and REV2.
 Number of displayed changesets is limited to LOG-LIMIT,
-REV1 defaults to the tip, while
-REV2 defaults to `hg-rev-completion-limit' changes from the tip revision.
+REV1 defaults to the tip, while REV2 defaults to 0.
 LOG-LIMIT defaults to `hg-log-limit'.
 With a prefix argument, prompt for each parameter."
   (interactive (list (hg-read-file-name " to log")
                      (hg-read-rev " to start with"
                                   "tip")
                      (hg-read-rev " to end with" 
-                                  (format "%d" (- hg-rev-completion-limit)))
+				  "0")
                      (hg-read-number "Output limited to: "
                                      hg-log-limit)))
   (hg-log (hg-root path) rev1 rev2 log-limit))