# HG changeset patch # User drewp # Date 1523942329 25200 # Node ID 3d478b05f9b17744289970c8505f5660108a7d67 # Parent 5da3a85b59e45d80641ba7dcb5d34b79b15ef341 add setToGraph Ignore-this: f1e1b6f7604ac19f73cb7622b6aa80fc darcs-hash:866a32aab2e7cffe8781886342602c90b3a87cf1 diff -r 5da3a85b59e4 -r 3d478b05f9b1 lib/patchablegraph.py --- a/lib/patchablegraph.py Mon Apr 16 22:16:15 2018 -0700 +++ b/lib/patchablegraph.py Mon Apr 16 22:18:49 2018 -0700 @@ -107,6 +107,9 @@ self._observers.remove(onPatch) except ValueError: pass + + def setToGraph(self, newGraph): + self.patch(Patch.fromDiff(self._graph, newGraph)) class CycloneGraphHandler(PrettyErrorHandler, cyclone.web.RequestHandler):