Functions/Repair-HgDirState.ps1


function Repair-HgDirState
{
    <#
    .SYNOPSIS
    Rebuilds/repairs Mercurial's dirstate file.
 
    .DESCRIPTION
    Use this command when Mercurial's dirstate file gets corrupted. This problems manifests itself when Mercurial thinks it is tracking files it shouldn't be.
    #>

    [CmdletBinding()]
    param(
    )

    Set-StrictMode -Version 'Latest'

    hg debugrebuildstate

    hg status
}