/Mercurial.Net/Versions/MercurialVersion16.cs
C# | 32 lines | 16 code | 2 blank | 14 comment | 1 complexity | 0325fbc6c8ab262660a6ae49a6a13ec0 MD5 | raw file
Possible License(s): BSD-3-Clause, GPL-2.0
- using System.Collections.Generic;
- using System.Globalization;
-
- namespace Mercurial.Versions
- {
- /// <summary>
- /// This <see cref="MercurialVersionBase"/> implements version-specific methods for
- /// Mercurial 1.6.
- /// </summary>
- [MercurialVersion("1.6")]
- public class MercurialVersion16 : MercurialVersionPre18
- {
- /// <summary>
- /// This method produces a collection of options and arguments to pass on the command line
- /// to specify the merge tool.
- /// </summary>
- /// <param name="tool">
- /// The merge tool to generate options and arguments for.
- /// </param>
- /// <returns>
- /// A collection of options and arguments to pass on the command line.
- /// </returns>
- public override IEnumerable<string> MergeToolOption(string tool)
- {
- if (StringEx.IsNullOrWhiteSpace(tool))
- yield break;
-
- yield return "--config";
- yield return string.Format(CultureInfo.InvariantCulture, "ui.merge={0}", StringEx.EncapsulateInQuotesIfWhitespace(tool));
- }
- }
- }