コード例 #1
0
        public MrrGitAutomergeDialog(MrrGitAutomergeUtil automergeUtil, string workDir, string mergeToBranch)
        {
            this.Title   = "Mrr GIT Automerge";
            this.Caad    = new CommitAndAutomergeDialog(automergeUtil, workDir, mergeToBranch);
            this.Content = this.Caad;
            this.Width   = 900 + 20;
            this.Height  = 410 + 40;
            this.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;

            this.HasMaximizeButton = true;
            this.HasMinimizeButton = true;
        }
コード例 #2
0
        public CommitAndAutomergeDialog(MrrGitAutomergeUtil automergeUtil, string workDir, string mergeToBranch)
        {
            if (null == automergeUtil)
            {
                throw new ArgumentNullException(nameof(automergeUtil));
            }
            if (string.IsNullOrEmpty(workDir))
            {
                throw new ArgumentNullException(nameof(workDir));
            }

            this.WorkDir           = workDir;
            this.Model.MergeBranch = mergeToBranch;
            this.Mrr = automergeUtil;

            InitializeComponent();
            this.DataContext = this.Model;
        }
コード例 #3
0
        static void Main(string[] args)
        {
            //string workDir = Path.GetDirectoryName(typeof(Program).Assembly.Location);
            string workDir = @"..\..\..\..\..\wt";

            ILogger             logger = new ConsoleLogger();
            MrrGitAutomergeUtil mrr    = new MrrGitAutomergeUtil(logger);

            //var msgs = mrr.GetLastTenMessages(workDir);
            //var stat = mrr.GetRepoStatus(workDir);
            //bool bCommited = mrr.CommitWorkToGit(workDir, "test msg", "README.md,src/MrrGitAutomerge.Core/Models/,src/MrrGitAutomerge.Runner/Program.cs".Split(',').ToList());
            CommitAndAutomergeDialog caad = new CommitAndAutomergeDialog(mrr, workDir, "master");
            Window wnd = new Window
            {
                Title   = "wnd",
                Content = caad,
                Width   = 600 + 20,
                Height  = 210 + 40
            };

            wnd.ShowDialog();
        }
コード例 #4
0
 public static void Initialize(Package package)
 {
     StatLogger = new ExtensionLogger();
     Mrr        = new MrrGitAutomergeUtil(StatLogger);
     Instance   = new MrrGitAutomergeCommand(package);
 }