Example #1
0
    def create_graph_node(self, cvs_item_to_changeset_id):
        time_range = TimeRange()

        pred_ids = set()
        succ_ids = set()

        if self.prev_id is not None:
            pred_ids.add(self.prev_id)

        if self.next_id is not None:
            succ_ids.add(self.next_id)

        for cvs_item in self.iter_cvs_items():
            time_range.add(cvs_item.timestamp)

            for pred_id in cvs_item.get_symbol_pred_ids():
                changeset_id = cvs_item_to_changeset_id.get(pred_id)
                if changeset_id is not None:
                    pred_ids.add(changeset_id)

            for succ_id in cvs_item.get_symbol_succ_ids():
                changeset_id = cvs_item_to_changeset_id.get(succ_id)
                if changeset_id is not None:
                    succ_ids.add(changeset_id)

        return ChangesetGraphNode(self, time_range, pred_ids, succ_ids)
Example #2
0
    def create_graph_node(self, cvs_item_to_changeset_id):
        pred_ids = set()
        succ_ids = set()

        for cvs_item in self.iter_cvs_items():
            for pred_id in cvs_item.get_pred_ids():
                changeset_id = cvs_item_to_changeset_id.get(pred_id)
                if changeset_id is not None:
                    pred_ids.add(changeset_id)

            for succ_id in cvs_item.get_succ_ids():
                changeset_id = cvs_item_to_changeset_id.get(succ_id)
                if changeset_id is not None:
                    succ_ids.add(changeset_id)

        return ChangesetGraphNode(self, TimeRange(), pred_ids, succ_ids)