private void btnNewRel_Click(object sender, EventArgs e) { var f = new FrmNewRel(); f.Module = ctx.Module; f.SourceReleaseName = ctx.Release; var res = f.ShowDialog(); if (res == DialogResult.OK) { string srcReleaseName = ctx.Release; string destReleaseName = f.CompleteName; if (ReleaseMaker.Copy( ctx.dBase.svnClient, ctx.GetReleaseUrl(srcReleaseName), ctx.GetReleaseUrl(destReleaseName), f.PinType, destReleaseName )) { ctx.ReloadReleases(destReleaseName); // select the newly created one ctx.ReloadReleaseExternals(); UpdateControls(); } } }
static void Test8() { var client = new SvnClient(); var baseUrl = "file:///D:/Work/svn/BIST/repo/releases/IG"; //var srcUrl = $"{baseUrl}/Head"; //var releaseName = "candidate/3.0.1"; //var destUrl = $"{baseUrl}/{releaseName}"; //var res = ReleaseMaker.Copy( client, srcUrl, destUrl, ReleaseMaker.EPinType.Branch, releaseName ); //var srcUrl = $"{baseUrl}/Head"; //var releaseName = "candidate/3.0.2"; //var destUrl = $"{baseUrl}/{releaseName}"; //var res = ReleaseMaker.Copy( client, srcUrl, destUrl, ReleaseMaker.EPinType.Peg, releaseName ); var srcUrl = $"{baseUrl}/candidate/3.0.2"; var releaseName = "candidate/3.0.3"; var destUrl = $"{baseUrl}/{releaseName}"; var res = ReleaseMaker.Copy(client, srcUrl, destUrl, Exter.EPinType.Tag, releaseName); }
static void Test9() { var ctx = Context.Instance; var cwd = System.IO.Directory.GetCurrentDirectory().Replace('\\', '/'); ctx.dBase.RepoRootUrl = $"file:///{cwd}/Data/repo"; ctx.ScanRepo(); if (!String.IsNullOrEmpty(ctx.Module) && ctx.Releases.Count > 0) { string releaseBaseUrl = ctx.dBase.GetReleaseModuleUrl(ctx.Module); string srcReleaseName = ctx.Releases[0]; string destReleaseName = "candidate/0.0.1"; ReleaseMaker.Copy( ctx.dBase.svnClient, $"{releaseBaseUrl}/{srcReleaseName}", $"{releaseBaseUrl}/{destReleaseName}", Exter.EPinType.Branch, destReleaseName ); } }