Exemplo n.º 1
0
        public void ReloadReleaseExternals()
        {
            ReleaseExternals.Clear();
            if (!String.IsNullOrEmpty(Release))
            {
                SharpSvn.SvnExternalItem[] extItems;
                Exter.ReadExternals(
                    dBase.svnClient,
                    GetReleaseUrl(Release),
                    out extItems
                    );

                foreach (var i in extItems)
                {
                    var r = i.Reference;

                    // strip the unimportant beginning of the link, show just the link/branch type and revision number
                    //var removableStart = $"^/{dBase.ShrSegm}/{Module}/{i.Target}/";
                    var removableStart = Exter.StripStdSvnLayoutFromUrl(i.Reference) + "/";
                    if (r.StartsWith(removableStart))
                    {
                        r = r.Substring(removableStart.Length);
                    }


                    var s = "";
                    if (i.Revision.RevisionType == SharpSvn.SvnRevisionType.Number)
                    {
                        s = $"{i.Target} => {r}@{i.Revision.Revision}";
                    }
                    else
                    {
                        s = $"{i.Target} => {r}";
                    }

                    ReleaseExternals.Add(s);
                }
            }
        }
Exemplo n.º 2
0
        public void ReloadInstallExternals()
        {
            InstallExternals.Clear();
            if (!String.IsNullOrEmpty(Release))
            {
                SharpSvn.SvnExternalItem[] extItems;
                Exter.ReadExternals(
                    dBase.svnClient,
                    GetInstallUrl(Install),
                    out extItems
                    );

                foreach (var i in extItems)
                {
                    var r = i.Reference;

                    // strip the unimportant beginning of the reference, show just the linked release name
                    var removableStart = $"^/{dBase.RelSegm}/{i.Target}/";
                    if (r.StartsWith(removableStart))
                    {
                        r = r.Substring(removableStart.Length);
                    }

                    var s = "";
                    if (i.Revision.RevisionType == SharpSvn.SvnRevisionType.Number)
                    {
                        s = $"{i.Target} => {r}@{i.Revision.Revision}";
                    }
                    else
                    {
                        s = $"{i.Target} => {r}";
                    }

                    InstallExternals.Add(s);
                }
            }
        }