/// <summary> /// Attempt to resolve conflicts in a .rej file. /// </summary> /// <param name="repository"> /// The <see cref="Repository"/> to resolve conflicts in. /// </param> /// <param name="command"> /// The options to the mpatch method. /// </param> /// <exception cref="ArgumentNullException"> /// <para><paramref name="repository"/> is <c>null</c>.</para> /// </exception> /// <remarks> /// This command is only available for the <see cref="GuiClientType.PyGTK"/> client type. /// </remarks> public static void MPatchGui(this Repository repository, MPatchGuiCommand command) { if (repository == null) throw new ArgumentNullException("repository"); command = command ?? new MPatchGuiCommand(); repository.Execute(command); }
/// <summary> /// Attempt to resolve conflicts in a .rej file. /// </summary> /// <param name="repository"> /// The <see cref="Repository"/> to resolve conflicts in. /// </param> /// <param name="file"> /// The file to resolve conflicts in. /// </param> /// <param name="command"> /// Any extra options to the mpatch method, or <c>null</c> for default options. /// </param> /// <exception cref="ArgumentNullException"> /// <para><paramref name="repository"/> is <c>null</c>.</para> /// <para>- or -</para> /// <para><paramref name="file"/> is <c>null</c> or empty.</para> /// </exception> /// <exception cref="ArgumentException"> /// <para><see cref="MPatchGuiCommand.File"/> cannot be set before calling this method.</para> /// </exception> public static void MPatchGui(this Repository repository, string file, MPatchGuiCommand command = null) { if (repository == null) throw new ArgumentNullException("repository"); if (StringEx.IsNullOrWhiteSpace(file)) throw new ArgumentNullException("file"); if (command != null && !StringEx.IsNullOrWhiteSpace(command.File)) throw new ArgumentException("MPatchGuiCommand.File cannot be set before calling this method", "command"); command = (command ?? new MPatchGuiCommand()) .WithFile(file); repository.Execute(command); }