mergin/merginproject.py
def apply_diffs(self, basefile, diffs):
        """
        Helper function to update content of geodiff file using list of diffs.
        Input file will be overwritten (make sure to create backup if needed).

        :param basefile: abs path to file to be updated
        :type basefile: str
        :param diffs: list of abs paths to geodiff changeset files
        :type diffs: list[str]
        :returns: error message if diffs were not successfully applied or None
        :rtype: str
        """
        error = None
        if not self.is_versioned_file(basefile):
            return error

        for index, diff in enumerate(diffs):
            try:
                self.geodiff.apply_changeset(basefile, diff)
            except (pygeodiff.GeoDiffLibError, pygeodiff.GeoDiffLibConflictError) as e:
                self.log.warning("failed to apply changeset " + diff + " to " + basefile)
                error = str(e)
                break
        return error

        Helper function to update content of geodiff file using list of diffs.
        Input file will be overwritten (make sure to create backup if needed).

        :param basefile: abs path to file to be updated
        :type basefile: str
        :param diffs: list of abs paths to geodiff changeset files
        :type diffs: list[str]
        :returns: error message if diffs were not successfully applied or None
        :rtype: str
        
Helper function to update content of geodiff file using list of diffs.
Input file will be overwritten (make sure to create backup if needed).
Helper function to update content of geodiff file using list of diffs . Input file will be overwritten ( make sure to create backup if needed ) .
def apply_diffs(self, basefile, diffs):
        error = None
        if not self.is_versioned_file(basefile):
            return error
        for index, diff in enumerate(diffs):
            try:
                self.geodiff.apply_changeset(basefile, diff)
            except (pygeodiff.GeoDiffLibError, pygeodiff.GeoDiffLibConflictError) as e:
                self.log.warning("failed to apply changeset " + diff + " to " + basefile)
                error = str(e)
                break
        return error
def apply_diffs ( self , basefile , diffs ) : error = None if not self . is_versioned_file ( basefile ) : return error for index , diff in enumerate ( diffs ) : try : self . geodiff . apply_changeset ( basefile , diff ) except ( pygeodiff . GeoDiffLibError , pygeodiff . GeoDiffLibConflictError ) as e : self . log . warning ( "failed to apply changeset " + diff + " to " + basefile ) error = str ( e ) break return error
Helper function to update content of geodiff file using list of diffs.
Helper function to update content of geodiff file using list of diffs .
"""
        Helper function to update content of geodiff file using list of diffs.
        Input file will be overwritten (make sure to create backup if needed).

        :param basefile: abs path to file to be updated
        :type basefile: str
        :param diffs: list of abs paths to geodiff changeset files
        :type diffs: list[str]
        :returns: error message if diffs were not successfully applied or None
        :rtype: str
        """
error message if diffs were not successfully applied or None
error message if diffs were not successfully applied or None
str
self
basefile
abs path to file to be updated
abs path to file to be updated
diffs
list of abs paths to geodiff changeset files
list of abs paths to geodiff changeset files