Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / tools / cr / cr / commands / prepare.py
index a9418d9..ba3956a 100644 (file)
@@ -30,7 +30,13 @@ class PrepareCommand(cr.Command):
     self.Prepare()
 
   @classmethod
+  def UpdateContext(cls):
+    for preparation in PrepareOut.Plugins():
+      preparation.UpdateContext()
+
+  @classmethod
   def Prepare(cls):
+    cls.UpdateContext()
     for preparation in PrepareOut.Plugins():
       preparation.Prepare()
 
@@ -41,6 +47,12 @@ class PrepareOut(cr.Plugin, cr.Plugin.Type):
   See PrepareCommand for details.
   """
 
+  def UpdateContext(self):
+    """Update the context if needed.
+
+    This is also used by commands that want the environment setup correctly, but
+    are not going to call Prepare directly (such as sync)."""
+
   def Prepare(self):
     """All PrepareOut plugins must override this method to do their work."""
     raise NotImplementedError('Must be overridden.')