mergin/utils.py
def conflicted_copy_file_name(path, user, version):
    """
    Generates a file name for the conflict copy file in the following form
    <filename> (conflicted copy, <username> v<version>).gpkg. Example:
    * data (conflicted copy, martin v5).gpkg

    :param path: name of the file
    :type path: str
    :param user: name of the user
    :type user: str
    :param version: version of the mergin project
    :type version: str
    :returns: new file name
    :rtype: str
    """
    if not path:
        return ''

    head, tail = os.path.split(os.path.normpath(path))
    ext = ''.join(Path(tail).suffixes)
    file_name = tail.replace(ext, '')
    return os.path.join(head, file_name) + f" (conflicted copy, {user} v{version}){ext}"

    Generates a file name for the conflict copy file in the following form
    <filename> (conflicted copy, <username> v<version>).gpkg. Example:
    * data (conflicted copy, martin v5).gpkg

    :param path: name of the file
    :type path: str
    :param user: name of the user
    :type user: str
    :param version: version of the mergin project
    :type version: str
    :returns: new file name
    :rtype: str
    
Generates a file name for the conflict copy file in the following form
 (conflicted copy,  v).gpkg. Example:
data (conflicted copy, martin v5).gpkg
Generates a file name for the conflict copy file in the following form ( conflicted copy v ) . gpkg . Example : data ( conflicted copy martin v5 ) . gpkg
def conflicted_copy_file_name(path, user, version):
    if not path:
        return ''
    head, tail = os.path.split(os.path.normpath(path))
    ext = ''.join(Path(tail).suffixes)
    file_name = tail.replace(ext, '')
    return os.path.join(head, file_name) + f" (conflicted copy, {user} v{version}){ext}"
def conflicted_copy_file_name ( path , user , version ) : if not path : return '' head , tail = os . path . split ( os . path . normpath ( path ) ) ext = '' . join ( Path ( tail ) . suffixes ) file_name = tail . replace ( ext , '' ) return os . path . join ( head , file_name ) + f" (conflicted copy, {user} v{version}){ext}"
Generates a file name for the conflict copy file in the following form
<filename> (conflicted copy, <username> v<version>).gpkg.
Generates a file name for the conflict copy file in the following form <filename > ( conflicted copy <username > v<version > ) . gpkg .
"""
    Generates a file name for the conflict copy file in the following form
    <filename> (conflicted copy, <username> v<version>).gpkg. Example:
    * data (conflicted copy, martin v5).gpkg

    :param path: name of the file
    :type path: str
    :param user: name of the user
    :type user: str
    :param version: version of the mergin project
    :type version: str
    :returns: new file name
    :rtype: str
    """
new file name
new file name
str
path
name of the file
name of the file
user
name of the user
name of the user
version
version of the mergin project
version of the mergin project