Menu

#920 Incomplete mirroring in team projects

4.1
closed-fixed
None
5
2018-09-20
2018-08-23
No

The newly released version (4.1.5_1) doesn't copy all source files in projects with multiple mappings. To reproduce, download into a new folder any of the existing OmegaT l10n projects (https://github.com/OmegaT-L10N/ru.git, for instance) in 4.1.5, and then again to a new folder in 4.1.5_1. The latter will have copied only some files into <project_root>/source, though the needed files would be retrieved into their respective folders inside .repositories. The former will have copied everything.</project_root>

Discussion

  • Didier Briel

    Didier Briel - 2018-08-23

    I can reproduce it.

    I only got the folders /doc_src and /website. The folders /release and /scripts were missing, as well as the readme and Bundle.properties at the root of the /source folder.

    Didier

     

    Last edit: Didier Briel 2018-08-23
  • Didier Briel

    Didier Briel - 2018-08-23
    • assigned_to: Alex Buloichik
     
  • Kos Ivantsov

    Kos Ivantsov - 2018-08-23

    filters.xml and segmantation.conf are not retreived either if they are mapped from non-main repository, it's a regression from 4.1.5

     
  • Kos Ivantsov

    Kos Ivantsov - 2018-08-23

    in /src/org/omegat/core/data/RealProject.java this piece responsible for segmentation.conf and filters.xml was deleted:

                    // Add filters.xml and segmentation.conf
                    for (String file : new String[] {
                        '/' + config.getProjectInternalRelative() + FilterMaster.FILE_FILTERS,
                        '/' + config.getProjectInternalRelative() + SRX.CONF_SENTSEG }) {
                    remoteRepositoryProvider.copyFilesFromRepoToProject(file);
                    }
    

    (lines 344-349 in the 4.1.5 realeased src package)

    Restoring the piece gets the functionality back

     

    Last edit: Kos Ivantsov 2018-08-23
  • Kos Ivantsov

    Kos Ivantsov - 2018-08-23

    in the same file /src/org/omegat/core/data/RealProject.java in v.4.1.5_1 there's this piece that seems to be the reason for the bug:

                    remoteRepositoryProvider.copyFilesFromRepoToProject("", '/' + RemoteRepositoryProvider.REPO_SUBDIR,
                            '/' + RemoteRepositoryProvider.REPO_GIT_SUBDIR, '/' + RemoteRepositoryProvider.REPO_SVN_SUBDIR,
                            '/' + OConsts.FILE_PROJECT,
                            '/' + config.getProjectInternalRelative() + OConsts.STATUS_EXTENSION,
                            '/' + config.getWritableGlossaryFile().getUnderRoot(),
                            '/' + config.getTargetDir().getUnderRoot());
    

    (lines 344-349 in SVN/released 4.1.5_1 src package)

    In the v.4.1.5 there's this piece that seems to do the same and be actually functional:

                    remoteRepositoryProvider.switchAllToLatest();
                    for (String dir : new String[] { config.getSourceDir().getUnderRoot(),
                            config.getGlossaryDir().getUnderRoot(), config.getTmDir().getUnderRoot(),
                            config.getDictDir().getUnderRoot() }) {
                        if (dir == null || dir.contains("..")) {
                            continue;
                        }
                        // copy but skip project_save.tmx and glossary.txt
                        remoteRepositoryProvider.copyFilesFromRepoToProject(dir,
                                '/' + config.getProjectInternalRelative() + OConsts.STATUS_EXTENSION,
                                '/' + config.getWritableGlossaryFile().getUnderRoot());
                    }
    

    (lines 361-372 in the 4.1.5 src package)

    Inserting the old piece into the current version with or without removing the above non-functional piece restores the expected functionality.

     

    Last edit: Kos Ivantsov 2018-08-23
  • Alex Buloichik

    Alex Buloichik - 2018-09-18

    The problem was in excludes processing in case of file(not directory) mapping. In case of file, it name should be processed as "force include", because admin will not add file that should be excluded by some masks.
    I committed "fix_920" into git. Move it to svn, please.

     
  • Didier Briel

    Didier Briel - 2018-09-18
    • summary: Incomplete mirroring in team projects in 4.1.5_1 --> Incomplete mirroring in team projects
     
  • Didier Briel

    Didier Briel - 2018-09-18
    • status: open --> open-fixed
     
  • Didier Briel

    Didier Briel - 2018-09-18

    Fixed in SVN (/trunk, revision [r10458])

    Didier

     

    Related

    Commit: [r10458]

  • Didier Briel

    Didier Briel - 2018-09-20
    • status: open-fixed --> closed-fixed
     
  • Didier Briel

    Didier Briel - 2018-09-20

    Closed in the released version 4.1.5 update 2 of OmegaT.

    Didier

     

Log in to post a comment.

MongoDB Logo MongoDB