Patchwork [3,of,4] phase: document the replace method

login
register
mail settings
Submitter Pierre-Yves David
Date June 17, 2015, 2:09 a.m.
Message ID <18cc713258b6240bc054.1434506960@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/9688/
State Accepted
Headers show

Comments

Pierre-Yves David - June 17, 2015, 2:09 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1434409584 25200
#      Mon Jun 15 16:06:24 2015 -0700
# Node ID 18cc713258b6240bc0543aa5ceb537a80a8a85e5
# Parent  2acfb673a817808b6993ae5e84466a42d4cd63b7
phase: document the replace method

This is a minor documentation update to answer a co-worker question.

Patch

diff --git a/mercurial/phases.py b/mercurial/phases.py
--- a/mercurial/phases.py
+++ b/mercurial/phases.py
@@ -169,10 +169,11 @@  class phasecache(object):
         ph._phaserevs = self._phaserevs
         ph._phasesets = self._phasesets
         return ph
 
     def replace(self, phcache):
+        """replace all values in 'self' with content of phcache"""
         for a in 'phaseroots dirty opener _phaserevs _phasesets'.split():
             setattr(self, a, getattr(phcache, a))
 
     def _getphaserevsnative(self, repo):
         repo = repo.unfiltered()