Sequence contains no elements error while browsing repository

Alex's Avatar


07 Aug, 2013 01:18 PM

I've created project, repository and pushed existing repository into it. Everything is ok. Then I've created another one project, repository and pushed existing repository of the other project into it (either just 1 changeset or several hundreds in different experiments). Now I can't access source and branches of the repository in web panel, this URLs throws error:
But everything is ok with commmits and tags pages.
Repository is fully operable via hg commands - I can clone it and push more changesets

Error message and stacktrace:
Source Error:
 An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
[InvalidOperationException: Sequence contains no elements]
   System.Linq.Enumerable.First(IEnumerable`1 source) +498
   HgLab.Areas.Project.Controllers.<>c__DisplayClass20.<GetMainlineLatestChangeset>b__1d(String branchName) in c:\Projects\hglab\src\HgLab\Areas\Project\Controllers\RepositoryController.cs:193
   HgLab.Areas.Project.Controllers.RepositoryController.GetMainlineLatestChangeset(Repository repository, HgRepository hgRepository) in c:\Projects\hglab\src\HgLab\Areas\Project\Controllers\RepositoryController.cs:199
   HgLab.Areas.Project.Controllers.RepositoryController.Files(Repository repository, String changeset, String path) in c:\Projects\hglab\src\HgLab\Areas\Project\Controllers\RepositoryController.cs:72
   lambda_method(Closure , ControllerBase , Object[] ) +236
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +248


  1. Support Staff 1 Posted by Anton Gogolev on 07 Aug, 2013 03:13 PM

    Anton Gogolev's Avatar


    What does hg branches command show for the repository you cannot browse in HgLab?

  2. 2 Posted by Alex Omgovitski... on 08 Aug, 2013 08:31 AM

    Alex Omgovitskij's Avatar
  3. Support Staff 3 Posted by Anton Gogolev on 08 Aug, 2013 01:04 PM

    Anton Gogolev's Avatar


    That's a subtle one. HgLab expects that any given repository will always contain branch default, which is not the case in your situation.

    I'll be fixing this in an upcoming release. For now you can either commit something to branch default or change the value of MainlineBranch column in Repository table of HgLab database to /EventQ.

  4. 4 Posted by Alex on 09 Aug, 2013 08:24 AM

    Alex's Avatar

    I'll add a default branch for now.

  5. 5 Posted by Alex on 09 Aug, 2013 08:27 AM

    Alex's Avatar

    Or change MainlineBranch - i think it's better way :)
    This repository was initially cloned from SVN with default branch name explicitly specified.

  6. Support Staff 6 Posted by Anton Gogolev on 09 Aug, 2013 08:31 AM

    Anton Gogolev's Avatar


    Either will do. That's already fixed and will be available in the upcoming

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

19 Mar, 2021 06:13 PM
01 Mar, 2021 02:51 PM
01 Jan, 2021 02:19 AM
28 Aug, 2020 08:34 AM
23 Jun, 2020 08:29 AM


19 Dec, 2019 06:58 AM
21 Aug, 2019 09:07 AM
30 Jul, 2019 08:59 PM
31 May, 2019 02:29 PM
26 Nov, 2018 01:47 PM
16 Nov, 2018 07:51 PM