Patchwork [3,of,4,evolve-ext-V3] evolve: add new method _evolvestatedelete

login
register
mail settings
Submitter Shusen LIU
Date Dec. 18, 2015, 1 p.m.
Message ID <ac88e87192bbe50481bd.1450443648@dev1221.lla1.facebook.com>
Download mbox | patch
Permalink /patch/12148/
State Superseded
Delegated to: Pierre-Yves David
Headers show

Comments

Shusen LIU - Dec. 18, 2015, 1 p.m.
# HG changeset patch
# User Shusen LIU <liushusen@fb.com>
# Date 1450308319 28800
#      Wed Dec 16 15:25:19 2015 -0800
# Node ID ac88e87192bbe50481bdef3a1aa01d4036987326
# Parent  849220773eb179b2ffd6eb6e04f0267f6815311d
evolve: add new method _evolvestatedelete

This patch introduces a new method _evolvestatedelete to delete vfs file 'evolvestate'.
This enable us to delete state data after when it's no longer needed, and allows us to support a continued keywork to implement evolve state.

Patch

diff --git a/hgext/evolve.py b/hgext/evolve.py
--- a/hgext/evolve.py
+++ b/hgext/evolve.py
@@ -3692,3 +3692,6 @@ 
     return { 'orig': orig,
              'dest': dest,
              'commitmsg': commitmsg, }
+
+def _evolvestatedelete(repo):
+    util.unlinkpath(repo.join('evolvestate'), ignoremissing=True)