PageRenderTime 38ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

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