Exemple #1
0
        /// <summary>
        /// Create the Tag depending on input parameter.
        /// </summary>
        /// <param name="revision">Commit revision to be tagged</param>
        /// <param name="inputTagName">Name of tag</param>
        /// <param name="force">Force parameter</param>
        /// <param name="operationType">The operation to perform on the tag (Lightweight, Annotate, Sign with defaul key, Sign with specific key)</param>
        /// <param name="tagMessage">Tag Message</param>
        /// <param name="keyId">Specific Key ID to be used instead of default one</param>
        /// <returns>Output string from RunGitCmd.</returns>
        public bool CreateTag(GitCreateTagArgs args, IWin32Window parentForm)
        {
            GitCreateTagCmd createTagCmd = new GitCreateTagCmd(args);

            if (args.OperationType.CanProvideMessage())
            {
                createTagCmd.TagMessageFileName = Path.Combine(_module.GetGitDirectory(), "TAGMESSAGE");
                _fileSystem.File.WriteAllText(createTagCmd.TagMessageFileName, args.TagMessage);
            }

            return(_uiCommands.StartCommandLineProcessDialog(createTagCmd, parentForm));
        }
        /// <summary>
        /// Create the Tag depending on input parameter.
        /// </summary>
        /// <returns>Output string from RunGitCmd.</returns>
        public bool CreateTag(GitCreateTagArgs args, IWin32Window parentForm)
        {
            string tagMessageFileName = null;

            if (args.Operation.CanProvideMessage())
            {
                tagMessageFileName = Path.Combine(_module.WorkingDirGitDir, "TAGMESSAGE");
                _fileSystem.File.WriteAllText(tagMessageFileName, args.TagMessage);
            }

            var createTagCmd = new GitCreateTagCmd(args, tagMessageFileName);

            return(_uiCommands.StartCommandLineProcessDialog(createTagCmd, parentForm));
        }
 public GitCreateTagCmd(GitCreateTagArgs aArgs)
 {
     Args = aArgs;
 }
 public GitCreateTagCmd(GitCreateTagArgs args, string tagMessageFileName)
 {
     Arguments          = args;
     TagMessageFileName = tagMessageFileName;
 }