Subgit - stop the properties synchronization

538 views Asked by At

I'm using subgit for two-way sync of an SVN and a Gitlab repo, through intermediate repository (like explained in official docs for connecting to Github. That's a part of a very slow transition process from current SVN to Git.

I don't know if my issue is related to this specific case, but I noticed that SubGit is also synchronizing the properties set on the root folder - those properties being some lock timestamps set up by Subgit itself (like subgit:lock 2018-02-12T17:00:24.067). Those properties are completely irrelevant and not needed as far as SVN side developers are concerned.

The properties are only moved from Git side to SVN. When coming from SVN, there's nothing extraordinary coming in.

Is there a way of preventing SubGit from doing that? I do already use the sync-filtering in the config file, but only for some specific files. How would I do the same for the properties?

Note: For those interested, my scenario was a bit specific: SVN repo is behind VPN, while Gitlab is on a live server, which doesn't have the access to that VPN.

The sync was done through local machine (which had the VPN access) as a proxy.
And it all needed to keep accepting the commits from both SVN and Git(lab) side.

1

There are 1 answers

4
Dmitry Pavlenko On BEST ANSWER

This subgit:lock (and similar to it) is used to handle the case when 2 users commit to SVN and Git at the same time. In earlier versions SubGit just sent a command that would remove this property (even if it is not set) and that "hack" solved the situation.

Since Subversion 1.9 this stopped working and Subversion started to ignore removal of non-existing properties. So SubGit started to set subgit:lock to an unique string every time. Unfortunately this resulted into merge conflicts (SGT-1215) and at the moment of writing these lines it sets a property with an unique name but with subgit:lock prefix every time.

As it's difficult to distinguish between 1.8 and 1.9 Subverion server versions, SubGit has this behaviour for SVN 1.8+ verisons but for versions up to 1.7 it still has its old behaviour: removing a non-existing property. Also it has its old behaviour for file:/// protocol access as it doesn't depend on Subversion software version.

At the moment there's no option to turn this new behaviour off, but if this really hurts you, I think we could implement such an option, create an issue in SubGit issue tracker then.

Without subgit:lock property nothing would change significantly if you push 1 commit at a time. But if you push, say, commit A and B at the same time and at the same moment someone commits revision C to SVN, there will be higher probability of ending with C,A,B or A,C,B revisions in the SVN repository as result. So, nothing really serious.

I'm one of SubGit developers.