[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ebdb dc517a1 067/350: More fixes to merging logic in eb
From: |
Eric Abrahamsen |
Subject: |
[elpa] externals/ebdb dc517a1 067/350: More fixes to merging logic in ebdb-db-load |
Date: |
Mon, 14 Aug 2017 11:46:04 -0400 (EDT) |
branch: externals/ebdb
commit dc517a13a96418ff742c48098aa8d6dff8803de5
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
More fixes to merging logic in ebdb-db-load
* ebdb.el (ebdb-db-load): Need to make sure right record ends up
getting hashed against the uuid. Also, probably a bad idea to be
let-binding the symbol 'equal.
---
ebdb.el | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/ebdb.el b/ebdb.el
index 6fcd836..dcba11e 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -2863,8 +2863,8 @@ overwrite data somewhere."
;; newly-loaded record ("rec").
(let* ((double (cadr err))
(delete-double t)
- (equal (equal (clone rec :cache nil)
- (clone double :cache nil)))
+ (recs-equal (equal (clone rec :cache nil)
+ (clone double :cache nil)))
deleter keeper)
;; If any of the double's databases are read-only, we should
@@ -2877,7 +2877,7 @@ overwrite data somewhere."
;; If the records are the same, it doesn't matter which we
;; delete, so don't change our assumption.
- (unless equal
+ (unless recs-equal
;; But if double is newer, we still need to keep it.
(unless (ebdb-record-compare rec double 'timestamp)
@@ -2889,9 +2889,12 @@ overwrite data somewhere."
;; Merge the records, either automatically or
;; interactively, depending on the value of
;; `ebdb-auto-merge-records'.
- (unless equal
+ (unless recs-equal
(setq keeper (ebdb-merge keeper deleter ebdb-auto-merge-records)))
+ ;; Make sure the right record is hashed against the duplicate uuid.
+ (ebdb-puthash (ebdb-record-uuid keeper) keeper)
+
(dolist (d (slot-value (ebdb-record-cache deleter) 'database))
;; Use low-level functions for this so we don't set the
;; database dirty.
- [elpa] externals/ebdb 49b422e 035/350: Remove mentions and bindings for ebdb-do-all-records, (continued)
- [elpa] externals/ebdb 49b422e 035/350: Remove mentions and bindings for ebdb-do-all-records, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 11fe701 047/350: Name classes now inherit from ebdb-field-user, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 784f45c 060/350: New function ebdb-prompt-for-mail, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb a712f52 050/350: Update ebdb-pgp, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 118f567 062/350: Add a "defunct" arg to ebdb-record-mail, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 90cb02a 068/350: Remove ebdb-mail-address, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb decfc94 073/350: Update company-ebdb to work, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 47ac653 066/350: Fix autoload for ebdb-org-field-tags definition, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb b2fdb42 064/350: Include record name when prompting for mail, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 41bc859 084/350: Still need to hash newly-added records, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb dc517a1 067/350: More fixes to merging logic in ebdb-db-load,
Eric Abrahamsen <=
- [elpa] externals/ebdb b9d7727 087/350: Fill out the ebdb-parse process, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb a5b00bd 074/350: Re-init mail fields after moving them to a role, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 76621c7 091/350: Clean up keymap bindings, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb e159e3a 070/350: Yet another method definition in the wrong place, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 38db90d 063/350: Improve ebdb-copy-mail-as-kill, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb f397e3d 092/350: Add missing require statement, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb ae23a9b 095/350: Fix to ebdb-parse with field-name-simple, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb 6197578 107/350: Change default separator of org tags, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb f1edaed 075/350: Prevent eieio-persistent-save from changing db file slot, Eric Abrahamsen, 2017/08/14
- [elpa] externals/ebdb c7d378b 071/350: Autoload eieio-customize-object, Eric Abrahamsen, 2017/08/14