Repository corrupted (non-cloneable, non-browseable) after double-push

oleksandr's Avatar


28 Aug, 2013 10:57 PM

Finally pushed that 300MB repo

Now I get the following Yellow Screen of Death:

Server Error in '/' Application.
query did not return a unique result: 2
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: NHibernate.NonUniqueResultException: query did not return a unique result: 2

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.

Stack Trace:

[NonUniqueResultException: query did not return a unique result: 2]
   NHibernate.Impl.AbstractQueryImpl.UniqueElement(IList list) +161
   NHibernate.Impl.CriteriaImpl.UniqueResult() +70
   HgLab.Core.ObjectModel.PushlogEntryItem.GetPushlogEntryItem(Repository repository, HgNodeID hgNodeID) in c:\Projects\hglab\src\HgLab.Core\ObjectModel\PushlogEntryItem.cs:24
   HgLab.Areas.Project.Controllers.RepositoryController.Files(Repository repository, String changeset, String path) in c:\Projects\hglab\src\HgLab\Areas\Project\Controllers\RepositoryController.cs:84
   lambda_method(Closure , ControllerBase , Object[] ) +236
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +248
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +39
   System.Web.Mvc.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() +120
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +637
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +307
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +688
   System.Web.Mvc.Controller.ExecuteCore() +162
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +305
   HgLab.Core.Framework.Web.HgLabControllerBase.Execute(RequestContext requestContext) in c:\Projects\hglab\src\HgLab.Core\Framework\Web\HgLabControllerBase.cs:69
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +62
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +15
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929
  1. 1 Posted by oleksandr on 28 Aug, 2013 11:06 PM

    oleksandr's Avatar

    UPDATE: workaround - removed offending rows from tables PushLogEntry and PushLogEntryItem.

    It seems you check for commits at the start of push, but not at the end, so I was able to push duplicate commits and so it complained.

  2. 2 Posted by oleksandr on 28 Aug, 2013 11:08 PM

    oleksandr's Avatar


    % hg clone --verbose -- https://hg.****.info/hg/main/server C:\dev\server_backup
    requesting all changes
    adding changesets
    adding manifests
    adding file changes
    transaction abort!
    rollback completed
    abort: invalid chunk length -1108361283
    [command returned code 255 Thu Aug 29 02:07:43 2013]
  3. 3 Posted by oleksandr on 28 Aug, 2013 11:14 PM

    oleksandr's Avatar

    hg verify says:

    2892 files, 10 changesets, 2919 total revisions
    5786 integrity errors encountered!
    (first damaged changeset appears to be 0)
  4. 4 Posted by oleksandr on 28 Aug, 2013 11:21 PM

    oleksandr's Avatar

    tried to update from the corrupted repo, receive this error:

    abort: data/doc/????? ????.docx.i@5435435434: no match found!
    (details edited, but there are definitely some encoding problems)
  5. Support Staff 5 Posted by Anton Gogolev on 29 Aug, 2013 10:11 AM

    Anton Gogolev's Avatar


    Yes, removing duplicate PushlogEntryItems does the trick. This bug is already fixed in an upcoming version.

    As for repository corruption, this is very unfortunate. I think this is somehow related to the fact that HgLab was unable to accept the push the first time and there were some leftovers not cleaned up properly. Will try to resolve this ASAP.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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