Modifying gitignore to svnignore updates after initial syncronization in SubGit

236 views Asked by At

I'm running SubGit for BitBucket Server, installed as an add on within the BitBucket website.

I see the following:

Translation Settings Settings in this section could only be altered before synchronization is ran for the very first time.

Translate file attributes Translate changes in .gitattributes files to svn:eol-style and svn:mime-type Subversion properties.

Translate Ignores Translate changes in .gitignore files to svn:ignore Subversion property.

Is there really no way to stop this after I've set everything up? Some developers on my team still plan on using SVN and don't want these changes sync'd over.

I see the ignores property in this documentation: https://subgit.com/documentation/config-options.html#svn but have no idea how or where to set that, or if it is possible via the BitBucket add in.

1

There are 1 answers

12
ildar.hm On BEST ANSWER

This "Settings in this section could only be altered before synchronization is ran for the very first time" statement means that those particular settings should be set prior to the initial translation, they cannot be changed on the fly. If the mirror has already been established and now you need to change these settings -- there is no other way to do it but re-translate the repository from the very beginning.

As for the configuration settings in the document -- some of them are equivalent to the settings in the add-on UI, namely, svn.minimalRevision is present in UI as "Minimal Revision" field in "Translation Settings" section, translate.eols is present as "Translate file attributes" and translate.ignores is equivalent to "Translate Ignores" in the same section. It doesn't make sense to add these configuration settings as they already present and are being set in the UI.

However, the rest can help if you need to set an option that is not present in web UI. To set an option just add it to the mapping configuration on the "Branches Mapping" tab. By default, there is only one [svn] section and only mapping options present in the configuration, but you can add any section and any settings you need (excluding those already present in UI, of course). For example, if you need to set, say, svn.httpSpooling and translate.otherProperties, just add [translate] section and the options to the configuration:

[svn]
# Options below (trunk, branches, tags, shelves) define correspondence between Subversion
# directories and Git references. Depending on the actual Subversion project layout and whether
# all or only some of the branches have to be mirrored, these options might need to be adjusted.
#
#  Generic mapping syntax is:
#    <Subversion-Path-Pattern>:<Git-Reference-Pattern>
#
#  Subversion paths are relative to the URL defined by the svn.url option.
#
#  For more details refer to http://subgit.com/documentation pages.
trunk = trunk:refs/heads/master
branches = branches/*:refs/heads/*
tags = tags/*:refs/tags/*

httpSpooling = true

[translate]

otherProperties = true

Note, however, that some of the settings must also be set prior to the initial translation and cannot be changed on the fly after it.