Limit Repository Rules

I have a repository with the follow structure of one component:

\comp\IBObjects
\comp\IBObjects\addon
\comp\IBObjects\apps
\comp\IBObjects\build
\comp\IBObjects\docs
\comp\IBObjects\lib
\comp\IBObjects\packages
\comp\IBObjects\samples
\comp\IBObjects\source
\comp\IBObjects\tutorials\

As the build process only needs the “lib” folder, I created the following rules in “Edit State > Repository Rules” in order to copy only lib folder:

$Source$ >> Source
-$Source.Ultra$\comp\IBObjects* > Source
-$Source.Ultra$\comp\IBObjects\addon** > Source
-$Source.Ultra$\comp\IBObjects\apps** > Source
-$Source.Ultra$\comp\IBObjects\build** > Source
-$Source.Ultra$\comp\IBObjects\docs** > Source
-$Source.Ultra$\comp\IBObjects\packages** > Source
-$Source.Ultra$\comp\IBObjects\samples** > Source
-$Source.Ultra$\comp\IBObjects\source** > Source
-$Source.Ultra$\comp\IBObjects\tutorials** > Source

Everything works fine, however, as I added more rules like this, I got an exception because there are too many rules:

An error occurred while syncing files from the server to the agent. Details: Exception: ProcessException
Message: Running C:\Program Files\VSoft Technologies\ContinuaCI Agent\hg\hg.exe with arguments … failed with return code 255 and error output: "** Unknown exception encountered with possibly-broken third-party extension win32lfn
** which supports versions unknown of Mercurial.
** Please disable win32lfn and try your action again.
** If that fixes the bug please report it to the extension author.
** Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)]
** Mercurial Distributed SCM (version 4.9.1)
** Extensions loaded: win32lfn
Traceback (most recent call last):
File “hg”, line 43, in

File “sre_compile.pyc”, line 583, in compile
AssertionError: sorry, but this version only supports 100 named groups
"
Stack Trace: at Continua.Shared.Utils.Mercurial.Run(ProcessArguments args, String workingFolder, Func2 checkResult, Boolean runRecoverIfRequired, Boolean allowTermination, Nullable1 timeoutInSecs) at Continua.Shared.Utils.Mercurial.Archive(String repository, String destination, String revision, IEnumerable1 includes, IEnumerable1 excludes, Boolean listFiles) at Continua.Modules.Builds.Agent.FileSync.AgentRepositoryCache.<>c__DisplayClass20_0.b__0() at Continua.Shared.Utils.ReadWriteLockList1.WithReadLock(TId id, CancellationTokenSource cancelTokenSource, Action action) at Continua.Modules.Builds.Agent.FileSync.AgentRepositoryCache.Export(String dest, String revision, String include, IEnumerable1 excludes, Boolean listFiles) at Continua.Modules.Builds.Agent.AgentRepositoryHelper.CopySourceToWorkspace(String filePattern, IEnumerable1 excludes, String relativeDestination, AgentWorkspaceSyncContext wsCtx, Boolean logRepoFiles, TransportContextDTO transportContext) at Continua.Modules.Builds.Agent.AgentBuildHelper.SyncSourceFromServer(IEnumerable1 rules, AgentWorkspaceSyncContext workspaceCtx) at Continua.Modules.Builds.Agent.AgentBuildHelper.InitialiseWorkspaceOnAgent(IAgentCallbackProxy proxy, TransportContextDTO source, Guid callId)

Is there a way around this limitation?

Hi Rafael,

Thank you for reporting this issue. We have reproduced the error and it is due to a limitation in the Python code base.

We have worked out a way to change our code to avoid this limitation and will upload a new version once this is tested. Meanwhile, we would recommend replacing all your rules with a single include rule. e.g.

$Source.Ultra$\comp\IBObjects\lib\** > Source

This should achieve the same result.

Hi Rafael,

We have uploaded a hotfix for this issue which you can download using the following links:

1 Like

Thank you for the quick response and fix, Dave!

*The single rule isn’t possible to me, as I tried to simplify as much as possible on problem in my example.