Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

        def get_project_chain(head_project, base_project, ccm):
    # Do it from head to base
    baseline = ccm_cache.get_object(head_project, ccm)
    chain = [baseline.get_object_name()]
    while baseline.get_object_name() != base_project:
        if baseline.predecessors:
            predecessor = ccm_cache.get_object(baseline.predecessors[0], ccm)
        if baseline.baseline_predecessor:
            baseline = ccm_cache.get_object(baseline.baseline_predecessor[0], ccm)

        if baseline:
            chain.append(baseline.get_object_name())
        elif predecessor:
            chain.append(predecessor.get_object_name())
            baseline = predecessor
        else:
            break
    # reverse the list to get the base first
    chain.reverse()
    return chain
        


src/p/y/PySynergy-HEAD/populate_ccm_cache.py   PySynergy(Download)
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
from CCMHistory import get_project_chain
from SynergySession import SynergySession
from SynergySessions import SynergySessions
    projects = []
    for head in heads:
        projects.extend(get_project_chain(head, base_project, ccm))
 
    # Got all the project chains - now get all the objects