Index: /trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java	(revision 13946)
+++ /trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserDialogManager.java	(revision 13947)
@@ -64,4 +64,6 @@
     private final Predicate<PrimitiveId> notNewPredicate = p -> !p.isNew();
 
+    private static final List<HistoryHook> hooks = new ArrayList<>();
+
     protected HistoryBrowserDialogManager() {
         dialogs = new HashMap<>();
@@ -194,8 +196,29 @@
 
     /**
+     * Adds a new {@code HistoryHook}.
+     * @param hook hook to add
+     * @return <tt>true</tt> (as specified by {@link Collection#add})
+     * @since 13947
+     */
+    public static boolean addHistoryHook(HistoryHook hook) {
+        return hooks.add(Objects.requireNonNull(hook));
+    }
+
+    /**
+     * Removes an existing {@code HistoryHook}.
+     * @param hook hook to remove
+     * @return <tt>true</tt> if this list contained the specified element
+     * @since 13947
+     */
+    public static boolean removeHistoryHook(HistoryHook hook) {
+        return hooks.remove(Objects.requireNonNull(hook));
+    }
+
+    /**
      * Show history dialog(s) for the given primitive(s).
      * @param primitives The primitive(s) for which history will be displayed
      */
     public void showHistory(final Collection<? extends PrimitiveId> primitives) {
+        hooks.forEach(h -> h.modifyRequestedIds(primitives));
         final Collection<? extends PrimitiveId> notNewPrimitives = SubclassFilteredCollection.filter(primitives, notNewPredicate);
         if (notNewPrimitives.isEmpty()) {
Index: /trunk/src/org/openstreetmap/josm/gui/history/HistoryHook.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/history/HistoryHook.java	(revision 13947)
+++ /trunk/src/org/openstreetmap/josm/gui/history/HistoryHook.java	(revision 13947)
@@ -0,0 +1,25 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.history;
+
+import java.util.Collection;
+
+import org.openstreetmap.josm.data.osm.PrimitiveId;
+
+/**
+ * Change, or block, history requests.
+ *
+ * The HistoryHook may modify the requested primitive ids silently, it may display a
+ * warning message to the user or prevent the request altogether.
+ * @since 13947
+ */
+public interface HistoryHook {
+
+    /**
+     * Modify the requested primitive ids before history request.
+     * The request is cancelled if the collection is cleared.
+     * Default implementation is to do no changes.
+     * @param ids The current ids to change
+     */
+    default void modifyRequestedIds(Collection<? extends PrimitiveId> ids) {
+    }
+}
