PageRenderTime 15ms CodeModel.GetById 6ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/Mercurial.Net/Versions/MercurialVersion16.cs

#
C# | 32 lines | 16 code | 2 blank | 14 comment | 1 complexity | 0325fbc6c8ab262660a6ae49a6a13ec0 MD5 | raw file
 1using System.Collections.Generic;
 2using System.Globalization;
 3
 4namespace Mercurial.Versions
 5{
 6    /// <summary>
 7    /// This <see cref="MercurialVersionBase"/> implements version-specific methods for
 8    /// Mercurial 1.6.
 9    /// </summary>
10    [MercurialVersion("1.6")]
11    public class MercurialVersion16 : MercurialVersionPre18
12    {
13        /// <summary>
14        /// This method produces a collection of options and arguments to pass on the command line
15        /// to specify the merge tool.
16        /// </summary>
17        /// <param name="tool">
18        /// The merge tool to generate options and arguments for.
19        /// </param>
20        /// <returns>
21        /// A collection of options and arguments to pass on the command line.
22        /// </returns>
23        public override IEnumerable<string> MergeToolOption(string tool)
24        {
25            if (StringEx.IsNullOrWhiteSpace(tool))
26                yield break;
27
28            yield return "--config";
29            yield return string.Format(CultureInfo.InvariantCulture, "ui.merge={0}", StringEx.EncapsulateInQuotesIfWhitespace(tool));
30        }
31    }
32}