Skip to content

Commit

Permalink
Merge remote-tracking branch 'pbombeiro/BuildServerIntegration' into …
Browse files Browse the repository at this point in the history
…BuildServerIntegration

* pbombeiro/BuildServerIntegration: (32 commits)
  Make settings thread safe.
  async is a keyword.
  Fix compare.
  We already know it matched so no need to check the string.
  Check for later version updates only.
  Fixed submodule status on diff tab
  Make Settings.cs changes compatible with 45600a8.
  Update checked property when menu is shown.  This allows the item to be refreshed between instances.
  Submodule GitExtensionsDoc updated
  Fix for gitextensions#1790.
  Fix key already exists bug.
  Removed SafeGet/SafeSet methods
  First step to remove SafeGet/SafeSet methods
  Fix bug where settings were not being retrieved again if file was modified.
  Make it easier for user to find settings by sorting keys.
  Clean up.
  Used two dictionaries to keep encoded values seperate from decoded values.
  Add me as a coder.
  Fix null exception error.
  Make sure dictionary is locked wherever a value is being set.
  ...
  • Loading branch information
fraga committed Apr 15, 2013
2 parents 1b2ce57 + a924e09 commit dd8a611
Show file tree
Hide file tree
Showing 22 changed files with 733 additions and 498 deletions.
8 changes: 7 additions & 1 deletion .nuget/Nuget.sh
Expand Up @@ -3,5 +3,11 @@
if [ ! -d 'packages' ]; then
mkdir packages
fi
if [ $1 = NoMono ] ; then

find ./ -name packages.config -exec .nuget/NuGet.exe install {} -o packages \;

else
find ./ -name packages.config -exec mono --runtime=v4.0.30319 .nuget/NuGet.exe install {} -o packages \;
fi

find ./ -name packages.config -exec mono --runtime=v4.0.30319 .nuget/NuGet.exe install {} -o packages \;
4 changes: 3 additions & 1 deletion GitCommands/Git/GitModule.cs
Expand Up @@ -2339,7 +2339,8 @@ private void GetCurrentSubmoduleStatus(IList<GitItemStatus> status)

private void GetSubmoduleStatus(IList<GitItemStatus> status, string from, string to)
{
foreach (var item in status)
status.ForEach(item =>
{
if (item.IsSubmodule)
{
item.SubmoduleStatus = Task.Factory.StartNew(() =>
Expand All @@ -2355,6 +2356,7 @@ private void GetSubmoduleStatus(IList<GitItemStatus> status, string from, string
return submoduleStatus;
});
}
});
}

public IList<GitItemStatus> GetTrackedChangedFiles()
Expand Down
10 changes: 10 additions & 0 deletions GitCommands/GitCommands.csproj
Expand Up @@ -99,6 +99,11 @@
<Compile Include="Patch\PatchProcessor.cs" />
<Compile Include="PathUtil.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<Compile Include="Repository\Repository.cs" />
<Compile Include="Repository\RepositoryCategory.cs" />
<Compile Include="Git\GitBlame.cs" />
Expand Down Expand Up @@ -126,11 +131,16 @@
<Compile Include="FileInfoExtensions.cs" />
<Compile Include="SynchronizedProcessReader.cs" />
<Compile Include="System.cs" />
<Compile Include="XmlSerializableDictionary.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="gitcommandkey.snk.pfx" />
<Compile Include="Repository\RecentRepoInfo.cs" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Plugins\GitUIPluginInterfaces\GitUIPluginInterfaces.csproj">
Expand Down
35 changes: 35 additions & 0 deletions GitCommands/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions GitCommands/Properties/Settings.settings
@@ -0,0 +1,9 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="GitCommands.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="IsPortable" Type="System.Boolean" Scope="Application">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>
14 changes: 7 additions & 7 deletions GitCommands/Repository/Repositories.cs
Expand Up @@ -26,7 +26,7 @@ public static Task<RepositoryHistory> LoadRepositoryHistoryAsync()
private static RepositoryHistory LoadRepositoryHistory()
{
var repositoryHistory = new RepositoryHistory();
object setting = Settings.GetValue<string>("history", null);
object setting = Settings.GetString("history", null);
if (setting == null)
{
repositoryHistory = new RepositoryHistory();
Expand All @@ -39,7 +39,7 @@ private static RepositoryHistory LoadRepositoryHistory()
AssignRepositoryHistoryFromCategories(repositoryHistory, null);

// migration from old version (move URL history to _remoteRepositoryHistory)
if (Settings.GetValue<string>("history remote", null) == null)
if (Settings.GetString("history remote", null) == null)
{
_remoteRepositoryHistory = new RepositoryHistory();
foreach (Repository repo in repositoryHistory.Repositories)
Expand Down Expand Up @@ -78,7 +78,7 @@ public static RepositoryHistory RemoteRepositoryHistory
_repositoryHistory.Wait();
if (_remoteRepositoryHistory == null)
{
object setting = Settings.GetValue<string>("history remote", null);
object setting = Settings.GetString("history remote", null);
if (setting != null)
{
_remoteRepositoryHistory = DeserializeHistoryFromXml(setting.ToString());
Expand Down Expand Up @@ -127,7 +127,7 @@ public static BindingList<RepositoryCategory> RepositoryCategories
{
if (_repositoryCategories == null)
{
object setting = Settings.GetValue<string>("repositories", null);
object setting = Settings.GetString("repositories", null);
if (setting != null)
{
_repositoryCategories = DeserializeRepositories(setting.ToString());
Expand Down Expand Up @@ -248,11 +248,11 @@ private static RepositoryHistory DeserializeHistoryFromXml(string xml)
public static void SaveSettings()
{
if (_repositoryHistory != null)
Settings.SetValue("history", Repositories.SerializeHistoryIntoXml(_repositoryHistory.Result));
Settings.SetString("history", Repositories.SerializeHistoryIntoXml(_repositoryHistory.Result));
if (_remoteRepositoryHistory != null)
Settings.SetValue("history remote", Repositories.SerializeHistoryIntoXml(_remoteRepositoryHistory));
Settings.SetString("history remote", Repositories.SerializeHistoryIntoXml(_remoteRepositoryHistory));
if (_repositoryCategories != null)
Settings.SetValue("repositories", SerializeRepositories(_repositoryCategories));
Settings.SetString("repositories", SerializeRepositories(_repositoryCategories));
}

public static void AddCategory(string title)
Expand Down

0 comments on commit dd8a611

Please sign in to comment.