emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/hyperdrive 8ced2e72ff 6/6: Fix: (hyperdrive-write-buffer)


From: ELPA Syncer
Subject: [nongnu] elpa/hyperdrive 8ced2e72ff 6/6: Fix: (hyperdrive-write-buffer) Fix updating version history on write
Date: Wed, 20 Sep 2023 00:59:40 -0400 (EDT)

branch: elpa/hyperdrive
commit 8ced2e72ff6a5177ef7c3134144405b37ffd57c1
Author: Joseph Turner <joseph@ushin.org>
Commit: Joseph Turner <joseph@ushin.org>

    Fix: (hyperdrive-write-buffer) Fix updating version history on write
---
 hyperdrive-history.el | 5 -----
 hyperdrive.el         | 5 ++++-
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/hyperdrive-history.el b/hyperdrive-history.el
index 94727ce023..160e631a23 100644
--- a/hyperdrive-history.el
+++ b/hyperdrive-history.el
@@ -138,11 +138,6 @@ and ENTRY's version are nil."
 
 ;;;; Commands
 
-
-;; TODO: Test with deleted and recreated files
-;; TODO: Also test what happens when you write a new version of a file
-;; and attempt to load its history buffer.
-
 ;;;###autoload
 (defun hyperdrive-history (entry)
   "Display version history for current hyperdrive ENTRY.
diff --git a/hyperdrive.el b/hyperdrive.el
index e38792307c..01a40ba6b3 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -434,8 +434,11 @@ overwrite without prompting."
                       (let ((buffer-file-name (hyperdrive-entry-name entry)))
                         (set-auto-mode)))
                     (hyperdrive-mode))
-                  (hyperdrive--fill entry (plz-response-headers response))
+                  ;; NOTE: `hyperdrive-fill-latest-version' must come before
+                  ;; `hyperdrive--fill' because the latter calls
+                  ;; `hyperdrive-update-existent-version-range' internally.
                   (hyperdrive-fill-latest-version hyperdrive)
+                  (hyperdrive--fill entry (plz-response-headers response))
                   ;; PUT responses only include ETag and Last-Modified
                   ;; headers, so we need to set other entry metadata manually.
                   ;; FIXME: For large buffers, `buffer-size' returns a 
different



reply via email to

[Prev in Thread] Current Thread [Next in Thread]