summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2013-04-24 20:53:18 -0400
committerGlenn Morris <rgm@gnu.org>2013-04-24 20:53:18 -0400
commit1c141dad8705e27c311a1c86436131c47f49dcc9 (patch)
tree25ba25a65521abaceaeaac3e9a51b4a179354031 /lisp
parentf0a9703029ab031e08d9b94482a0cfc4dad2d8a8 (diff)
downloademacs-1c141dad8705e27c311a1c86436131c47f49dcc9.tar.gz
* lisp/vc/vc-bzr.el (vc-bzr-print-log): Tweak LIMIT = 1 case.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/vc/vc-bzr.el20
2 files changed, 22 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 23af08f872f..d6d96545165 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2013-04-25 Glenn Morris <rgm@gnu.org>
+
+ * vc/vc-bzr.el (vc-bzr-print-log): Tweak LIMIT = 1 case.
+
2013-04-24 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/opascal.el (opascal-set-token-property): Rename from
diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el
index 06942ad283c..4a08403c93e 100644
--- a/lisp/vc/vc-bzr.el
+++ b/lisp/vc/vc-bzr.el
@@ -710,12 +710,28 @@ If LIMIT is non-nil, show no more than this many entries."
(apply 'vc-bzr-command "log" buffer 'async files
(append
(when shortlog '("--line"))
- (when start-revision (list (format "-r..%s" start-revision)))
+ ;; The extra complications here when start-revision and limit
+ ;; are set are due to bzr log's --forward argument, which
+ ;; could be enabled via an alias in bazaar.conf.
+ ;; Svn, for example, does not have this problem, because
+ ;; it doesn't have --forward. Instead, you can use
+ ;; svn --log -r HEAD:0 or -r 0:HEAD as you prefer.
+ ;; Bzr, however, insists in -r X..Y that X come before Y.
+ (if start-revision
+ (list (format
+ (if (and limit (= limit 1))
+ ;; This means we don't have to use --no-aliases.
+ ;; Is -c any different to -r in this case?
+ "-r%s"
+ "-r..%s") start-revision)))
(when limit (list "-l" (format "%s" limit)))
- ;; This is to remove --forward, if it has been added by an alias.
;; There is no sensible way to combine --limit and --forward,
;; and it breaks the meaning of START-REVISION as the
;; _newest_ revision. See bug#14168.
+ ;; Eg bzr log --forward -r ..100 --limit 50 prints
+ ;; revisions 1-50 rather than 50-100. There
+ ;; seems no way in general to get bzr to print revisions
+ ;; 50-100 in --forward order in that case.
;; FIXME There may be other alias stuff we want to keep.
;; Is there a way to just suppress --forward?
;; As of 2013/4 the only caller uses limit = 1, so it does