private void UpdateHgrc(int dbVersion) { var doc = new IniDocument(Path.Combine(RepoDir, ".hg", "hgrc"), IniFileType.MercurialStyle); var mergeToolsSection = doc.Sections.GetOrCreate("merge-tools"); mergeToolsSection.Set("chorusmerge.executable", $"/usr/lib/lfmerge/{dbVersion}/chorusmerge"); doc.SaveAndThrowIfCannot(); }