/// <summary> /// Open the Tag gui. /// </summary> /// <param name="repository"> /// The <see cref="Repository"/> to synchronize. /// </param> /// <param name="command"> /// Any extra options to the tag method, or <c>null</c> for default options. /// </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.PyQT"/> client type. /// </remarks> public static void TagGui(this Repository repository, TagGuiCommand command = null) { if (repository == null) throw new ArgumentNullException("repository"); command = command ?? new TagGuiCommand(); repository.Execute(command); }
/// <summary> /// Open the Tag gui. /// </summary> /// <param name="repository"> /// The <see cref="Repository"/> to synchronize. /// </param> /// <param name="revision"> /// The <see cref="RevSpec"/> of the revision to tag. /// </param> /// <param name="name"> /// The name of the tag. /// </param> /// <param name="command"> /// Any extra options to the tag 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="revision"/> is <c>null</c>.</para> /// <para>- or -</para> /// <para><paramref name="name"/> is <c>null</c> or empty.</para> /// </exception> /// <exception cref="ArgumentException"> /// <para><see cref="TagGuiCommand.Revision"/> cannot be set before calling this method.</para> /// <para>- or -</para> /// <para><see cref="TagGuiCommand.Name"/> cannot be set before calling this method.</para> /// </exception> /// <remarks> /// This command is only available for the <see cref="GuiClientType.PyQT"/> client type. /// </remarks> public static void TagGui(this Repository repository, RevSpec revision, string name, TagGuiCommand command = null) { if (repository == null) throw new ArgumentNullException("repository"); if (revision == null) throw new ArgumentNullException("revision"); if (StringEx.IsNullOrWhiteSpace(name)) throw new ArgumentNullException("name"); if (command != null && command.Revision != null) throw new ArgumentException("TagGuiCommand.Revision cannot be set before calling this method", "command"); if (command != null && !StringEx.IsNullOrWhiteSpace(command.Name)) throw new ArgumentException("TagGuiCommand.Name cannot be set before calling this method", "command"); command = (command ?? new TagGuiCommand()) .WithRevision(revision) .WithName(name); repository.Execute(command); }