From patchwork Fri Dec 18 12:01:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [1,of,4,evolve-ext] evolve: add new method _evolvestatewrite From: Shusen LIU X-Patchwork-Id: 12144 Message-Id: <8e8491c49ddeca5f70de.1450440078@dev1221.lla1.facebook.com> To: Date: Fri, 18 Dec 2015 04:01:18 -0800 # HG changeset patch # User Shusen LIU # Date 1450307795 28800 # Wed Dec 16 15:16:35 2015 -0800 # Node ID 8e8491c49ddeca5f70de118b03ec74003d17c7ce # Parent 0ce293362d9b8536cc0cd01568b168352be948a6 evolve: add new method _evolvestatewrite This patch introduces a new method _evolvestatewrite to write data into vfs file 'evolvestate'. This enable us to persist state data, and allows us to support a continued keywork to implement evolve state. diff --git a/hgext/evolve.py b/hgext/evolve.py --- a/hgext/evolve.py +++ b/hgext/evolve.py @@ -3682,3 +3682,7 @@ repo._bookmarks[book] = dest.node() if oldbookmarks or destbookmarks: repo._bookmarks.recordchange(tr) + +def _evolvestatewrite(repo, data): + repo.vfs.write('evolvestate', + '|'.join([data['orig'], data['dest'], data['commitmsg']]))