]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/vc/vc-bzr.el (vc-bzr-print-log): Tweak LIMIT = 1 case.
authorGlenn Morris <rgm@gnu.org>
Thu, 25 Apr 2013 00:53:18 +0000 (20:53 -0400)
committerGlenn Morris <rgm@gnu.org>
Thu, 25 Apr 2013 00:53:18 +0000 (20:53 -0400)
lisp/ChangeLog
lisp/vc/vc-bzr.el

index 23af08f872ff1d2ca3aaff1e6d702914e99af3c4..d6d96545165dca80084f816b0e80321be8dccfed 100644 (file)
@@ -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
index 06942ad283c397c28e0e8a4535f38153becf1bcd..4a08403c93e41752fab5cc43c975baedc59e11e9 100644 (file)
@@ -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