Does SubGit synchronize the execute permission of files bidirectionally?

Hello TMate

We are using starter lisence.
Does SubGit synchronize the execute permission of files bidirectionally? As far as I’ve tested, execute permission synced from svn to git*, but not in the opposite direction.
* In SVN, changed the svn:executable property of a file from null to “*” and commit. Then, in git, the file mode of the file was changed from 644 to 755.

Kind Regards

Hiroyuki Aikawa

Hello Hiroyuki Aikawa,

thank you for your interest in our products!

Yes, SubGit is designed to synchronise the execute permission bidirectionally. If it does not work this way, then probably something is not right and should be investigated. The first thing that comes to my mind is that SubGit may have problems setting properties on the SVN side; this can also lead to situation when SubGit is unable to set correct author for an SVN revision. If that’s also the case, then the solution is to enable pre-rev-prop hook in the SVN repository. It can be as simple as this:

exit 0;

the main point here is that it must be present, enabled, and finish successfully. It’s a limitation introduced by SVN, that’s why the change is needed on the SVN side.
If, on the other hand, authors and other properties are translated correctly, then the permissions are to be investigated, please collect SubGit logs from the affected repository to analyse.

Hello Ildar khusainov,

Thank you for your prompt reply.
There was a log that seems to match your guess.

  • {bare repository name}.git/subgit/daemon.0.log
[2022-03-24 18:15:32.276][daemon][18] Committed revision 272560
[2022-03-24 18:15:33.120][daemon][18] Unable to set svn:date property for revision 272560, fix/create pre-revprop-change hook to enable revision properties modification

Currently pre-rev-prop hook seems to only allow svn:log changes. If the svn administrator allows to change the hook, I will try it.

When I enabled pre-rev-prop hook in SVN, the log “Unable to set svn:date property for revision {n}” was no longer output. However, even if I added a file mode = 755 in git side, the executable attribute was not enabled in SVN side as in the past.
Here is the related daemon log.

[2022-03-28 16:18:12.872][daemon][18] Commit task: CommitTask[info=SvnCommitInfo{commitMessage='add (executable is enabled.)
', commitAuthor='{commit author name}', commitDate=Mon Mar 28 16:17:52 JST 2022}, commands=ReferenceCommand{branch=<branch 'refs/heads/master'>, referenceModification=<from 0fcb8e60e477cdbcf069c2249121482836c0048e to b35776d2a063dda15cba6f66c99b452e651a4795>, treeModification=<from 0fcb8e60e477cdbcf069c2249121482836c0048e to b35776d2a063dda15cba6f66c99b452e651a4795>, branchModification=<MODIFICATION>}, ]
[2022-03-28 16:18:26.249][daemon][18] "targetRevision" -1
[2022-03-28 16:18:26.249][daemon][18] "openRoot" 272760
[2022-03-28 16:18:28.134][daemon][18] "addFile" "" null -1
[2022-03-28 16:18:28.727][daemon][18] "changeFileProperty" "" "svn:eol-style" LF
[2022-03-28 16:18:28.727][daemon][18] "applyTextDelta" "" null
[2022-03-28 16:18:28.727][daemon][18] "textDeltaChunk" ""
[2022-03-28 16:18:28.727][daemon][18] "textDeltaEnd" ""
[2022-03-28 16:18:28.727][daemon][18] "closeFile" "" "f5c1a61c8aa08598d6f7ac1c3a30b2ee"
[2022-03-28 16:18:29.149][daemon][18] "closeDir"
[2022-03-28 16:18:35.720][daemon][18] "closeEdit"
[2022-03-28 16:18:37.767][daemon][18] Committed revision 272841
[2022-03-28 16:18:45.426][daemon][18] Resolved unsynced commit b35776d2a063dda15cba6f66c99b452e651a4795 initially referred by refs/heads/master and now stored at refs/subgit/unsynced/heads/master/1: Unsynced changes (commit 'b35776d2a063dda15cba6f66c99b452e651a4795') have been translated to revision 272841

Could you tell me if there is another solution?

Hello Hiroyuki,

may I ask you to share more details on that, namely, what exactly have you changed on the Git side and what do you see now on the SVN side, and also could you please share the full SubGit logs (pre- and post-receive hook logs and daemon log) from the affected repository?