# HG changeset patch # User NIIMI Satoshi # Date 2007-05-21 23:05:16 # Node ID 3f484688c702b09e583a1f7cd26390ad30797209 # Parent c135c6cddbece1c40419f4be5879e4b076823b58 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. diff --git a/contrib/mercurial.el b/contrib/mercurial.el --- a/contrib/mercurial.el +++ b/contrib/mercurial.el @@ -1083,20 +1083,19 @@ With a prefix argument, prompt for the p "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 @@ With a prefix argument, prompt for each "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))