# Hg breaks on long paths

**URL:** https://www.finalbuilder.com/forums/t/hg-breaks-on-long-paths/5932
**Category:** Bugs
**Created:** [September 29, 2014, 6:31am UTC](https://www.finalbuilder.com/forums/t/hg-breaks-on-long-paths/5932 "2014-09-29T06:31:31Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![catenalogic](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/catenalogic/32/116_2.png) [@catenalogic](https://www.finalbuilder.com/forums/u/catenalogic)
#### Post date: [September 29, 2014, 6:31am UTC](https://www.finalbuilder.com/forums/t/hg-breaks-on-long-paths/5932/1 "2014-09-29T06:31:31Z")

</div>

While initially syncing from server to agent, we always get this error:  
  
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 “archive -r a097b5e4cf89b575eba3c5ec52e1d318195c7834 --subrepos -R F:\Repos\9541699a F:\Ws\13587\Source\MyProject --config ui.username=Continua --noninteractive” on agent failed with return code 255 and error output: "abort: The filename or extension is too long: ‘F:\Ws\13587\Source\MyProject\src/Design/MyProject.Website/Content/scripts/libs/formbuilder/node\_modules/karma-phantomjs-launcher/node\_modules/phantomjs/node\_modules/request/node\_modules/bl/node\_modules/readable-stream/node\_modules/core-util-is’ " Stack Trace: at Continua.Shared.Utils.Mercurial.Run(ProcessArguments args, String workingDir, Func`2 checkResult, Boolean runRecoverIfRequired, Boolean allowTermination) at Continua.Shared.Utils.Mercurial.Archive(String repository, String destination, String revision, String includes, IEnumerable`1 excludes) at Continua.Modules.Builds.Agent.FileSync.AgentRepositoryCache.\<\>c\_\_DisplayClasse.b\_\_c() at Continua.Shared.Utils.ReadWriteLockList`1.WithReadLock(TId id, CancellationTokenSource cancelTokenSource, Action action) at Continua.Modules.Builds.Agent.FileSync.AgentRepositoryCache.Export(String dest, String revision, String includes, IEnumerable`1 excludes, Boolean listFiles) at Continua.Modules.Builds.Agent.AgentRepositoryHelper.CopySourceToWorkspace(String filePattern, IEnumerable`1 excludes, String relativeDestination, AgentWorkspaceSyncContext wsCtx, Boolean logRepoFiles) at Continua.Modules.Builds.Agent.AgentBuildHelper.SyncSourceFromServer(IEnumerable`1 rules, AgentWorkspaceSyncContext workspaceCtx) at Continua.Modules.Builds.Agent.AgentBuildHelper.InitialiseWorkspaceOnAgent(AgentCallbackProxy proxy, TransportContextDTO source, Guid callId) .  
  
  
For a possible solution, see&nbsp;[http://stackoverflow.com/questions/10753991/mercurial-commit-files-with-more-than-255-characters-path-length-windows](http://stackoverflow.com/questions/10753991/mercurial-commit-files-with-more-than-255-characters-path-length-windows)

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [September 30, 2014, 12:27pm UTC](https://www.finalbuilder.com/forums/t/hg-breaks-on-long-paths/5932/2 "2014-09-30T12:27:22Z")

</div>

Hi Geert   
  
 We’ve looked at this extension before, all it does it provide one new command to clean a repo, it doesn’t enabled long path support for hg.

---

<div class="post-metadata">

### Author: ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)
#### Post date: [February 15, 2015, 11:51am UTC](https://www.finalbuilder.com/forums/t/hg-breaks-on-long-paths/5932/3 "2015-02-15T11:51:16Z")

</div>

Hi,  
  
We have implemented long file path support as part of version 1.6 which will be released as a beta very soon
