/// <returns>false if handling the scc provider is disabled for this Rcs type</returns> private static bool RegisterMercurialScc(out Guid packageGuid, out Guid sccProviderGuid, out SccProvider provider) { ThreadHelper.ThrowIfNotOnUIThread(); MercurialSccProvider mercurialProvider = GetMercurialSccProvider(); if (mercurialProvider == MercurialSccProvider.Default) { mercurialProvider = GetDefaultMercurialSccProvider(); } if (mercurialProvider == MercurialSccProvider.Disabled) { packageGuid = new Guid(); sccProviderGuid = new Guid(); provider = SccProvider.Unknown; return(false); } switch (mercurialProvider) { case MercurialSccProvider.HgSccPackage: { packageGuid = GetSccInstalledPackageId(HgSccPackagePackageIds); sccProviderGuid = new Guid(HgSccPackageSccProviderId); provider = SccProvider.HgSccPackage; return(true); } case MercurialSccProvider.VisualHG: { packageGuid = GetSccInstalledPackageId(VisualHGPackageIds); sccProviderGuid = new Guid(VisualHGSccProviderId); provider = SccProvider.VisualHG; return(true); } case MercurialSccProvider.VSHG: { packageGuid = GetSccInstalledPackageId(VSHGPackageIds); sccProviderGuid = new Guid(VSHGProviderId); provider = SccProvider.VSHG; return(true); } default: throw new Exception(); } }
public static void SetMercurialSccProvider(MercurialSccProvider provider) { _SettingsStore.CreateCollection(SccAutoSwitcherCollection); if (provider == MercurialSccProvider.Default) { _SettingsStore.DeleteProperty(SccAutoSwitcherCollection, MercurialProviderProperty); } else { _SettingsStore.SetString(SccAutoSwitcherCollection, MercurialProviderProperty, provider.ToString()); } if (provider == MercurialSccProvider.Disabled) { return; } if (_CurrentSolutionRcsType == RcsType.Mercurial) { RegisterPrimarySourceControlProvider(RcsType.Mercurial); } }
public static void SetMercurialSccProvider(MercurialSccProvider provider) { _SettingsStore.CreateCollection(SccAutoSwitcherCollection); if (provider == MercurialSccProvider.Default) _SettingsStore.DeleteProperty(SccAutoSwitcherCollection, MercurialProviderProperty); else _SettingsStore.SetString(SccAutoSwitcherCollection, MercurialProviderProperty, provider.ToString()); if (provider == MercurialSccProvider.Disabled) return; if (_CurrentSolutionRcsType == RcsType.Mercurial) RegisterPrimarySourceControlProvider(RcsType.Mercurial); }