/// <summary> /// Rebase changesets. /// </summary> /// <param name="repository"> /// The <see cref="Repository"/> to rebase changesets in. /// </param> /// <param name="command"> /// The options to the rebase method. /// </param> /// <exception cref="ArgumentNullException"> /// <para><paramref name="repository"/> is <c>null</c>.</para> /// <para>- or -</para> /// <para><paramref name="command"/> is <c>null</c>.</para> /// </exception> /// <remarks> /// This command is only available for the <see cref="GuiClientType.PyQT"/> client type. /// </remarks> public static void RebaseGui(this Repository repository, RebaseGuiCommand command = null) { if (repository == null) throw new ArgumentNullException("repository"); if (command == null) throw new ArgumentNullException("command"); repository.Execute(command); }
/// <summary> /// Rebase changesets. /// </summary> /// <param name="repository"> /// The <see cref="Repository"/> to rebase changesets in. /// </param> /// <param name="sourceRevision"> /// The source revision to rebase. This changeset, and all its descendants, will be rebased. /// </param> /// <param name="destinationRevision"> /// The Destination revision to rebase. This changeset will be the parent of the changesets after the rebase. /// </param> /// <param name="command"> /// Any extra options to the rebase 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="sourceRevision"/> is <c>null</c>.</para> /// <para>- or -</para> /// <para><paramref name="destinationRevision"/> is <c>null</c>.</para> /// </exception> /// <exception cref="ArgumentException"> /// <para><see cref="RebaseGuiCommand.SourceRevision"/> cannot be set before calling this method.</para> /// <para>- or -</para> /// <para><see cref="RebaseGuiCommand.DestinationRevision"/> 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 RebaseGui(this Repository repository, RevSpec sourceRevision, RevSpec destinationRevision, RebaseGuiCommand command = null) { if (repository == null) throw new ArgumentNullException("repository"); if (sourceRevision == null) throw new ArgumentNullException("sourceRevision"); if (destinationRevision == null) throw new ArgumentNullException("destinationRevision"); if (command != null && command.SourceRevision != null) throw new ArgumentException("RebaseGuiCommand.SourceRevision cannot be set before calling this method", "command"); if (command != null && command.DestinationRevision != null) throw new ArgumentException("RebaseGuiCommand.DestinationRevision cannot be set before calling this method", "command"); command = (command ?? new RebaseGuiCommand()) .WithSourceRevision(sourceRevision) .WithDestinationRevision(destinationRevision); repository.Execute(command); }