New Version. Fixing issuie that updated deleted files before commiting, so you cant delete files

This commit is contained in:
2014-01-05 15:57:03 +00:00
parent 4a9da90b26
commit 568047799b
16 changed files with 83 additions and 12604 deletions
+2 -2
View File
@@ -35,7 +35,7 @@
// //
// notifyIcon // notifyIcon
// //
this.notifyIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon.Icon"))); this.notifyIcon.Icon = Properties.Resources.Icon;
this.notifyIcon.Text = "SvnSync"; this.notifyIcon.Text = "SvnSync";
this.notifyIcon.Visible = true; this.notifyIcon.Visible = true;
this.notifyIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon_MouseDoubleClick); this.notifyIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon_MouseDoubleClick);
@@ -45,7 +45,7 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(370, 262); this.ClientSize = new System.Drawing.Size(370, 262);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = Properties.Resources.Icon;
this.Name = "Form1"; this.Name = "Form1";
this.ShowInTaskbar = false; this.ShowInTaskbar = false;
this.Text = "SvnSync"; this.Text = "SvnSync";
+25 -5
View File
@@ -33,15 +33,19 @@ namespace svnsync
this.CreateFileList("Löschen", "Diese Daten sind gelöscht worden:", l, new EventHandler(deleteButton_Click)); this.CreateFileList("Löschen", "Diese Daten sind gelöscht worden:", l, new EventHandler(deleteButton_Click));
*/this.c = new CmdArgs(args); */this.c = new CmdArgs(args);
this.StartSvn(); this.StartSvn();
if (this.s != null)
{
this.notifyIcon.Text = "SvnSync: " + this.c.GetArgumentData("-d");
}
this.Init(); this.Init();
} }
private void Init() private void Init()
{ {
if (this.c.HasArgumentType("-cron")) if (this.c.HasArgumentType("-cron"))
if (this.cronJob(0)) if (this.cronJob(0, false))
{ {
this.ShowToolTip("Svn Sync", "Datensicherung Erfolgreich", ToolTipIcon.Info); this.ShowToolTip("Svn Sync", "Datensicherung Erfolgreich\n" + this.c.GetArgumentData("-d").Replace("\\\\","\\"), ToolTipIcon.Info);
System.Threading.Thread.Sleep(5000); System.Threading.Thread.Sleep(5000);
this.Close(); this.Close();
//Application.Exit(); //Application.Exit();
@@ -49,16 +53,22 @@ namespace svnsync
} }
private bool cronJob(int run) private bool cronJob(int run, bool readyToCommit)
{ {
if (s == null) if (s == null)
return this.HandleSvn(HandleSvnType.NotInit, ""); return this.HandleSvn(HandleSvnType.NotInit, "");
if (run > 10) if (run > 10)
return this.HandleSvn(HandleSvnType.ToMutchChronRuns, ""); return this.HandleSvn(HandleSvnType.ToMutchChronRuns, "");
s.Update();
if (s.IsError()) if (s.IsError())
return this.HandleSvn(HandleSvnType.UnexpectedError, s.getError()); return this.HandleSvn(HandleSvnType.UnexpectedError, s.getError());
try
{
s.CheckStatus(); s.CheckStatus();
}
catch (NotImplementedException e)
{
return this.HandleSvn(HandleSvnType.UnexpectedError, e.Message);
}
if (s.IsNotOnlyModified()) if (s.IsNotOnlyModified())
{ {
if (s.IsUncheckedFiles()) if (s.IsUncheckedFiles())
@@ -79,14 +89,24 @@ namespace svnsync
} }
if (s.IsError()) if (s.IsError())
return this.HandleSvn(HandleSvnType.UnexpectedError, s.getError()); return this.HandleSvn(HandleSvnType.UnexpectedError, s.getError());
return this.cronJob(run + 1); return this.cronJob(run + 1, true);
} }
else else
{
if (readyToCommit)
{ {
s.SetArgCheckIn(this.GetTimeStamp(DateTime.Now)); s.SetArgCheckIn(this.GetTimeStamp(DateTime.Now));
if (s.IsError()) if (s.IsError())
return this.HandleSvn(HandleSvnType.UnexpectedError, s.getError()); return this.HandleSvn(HandleSvnType.UnexpectedError, s.getError());
} }
else
{
s.Update();
if (s.IsError())
return this.HandleSvn(HandleSvnType.UnexpectedError, s.getError());
return this.cronJob(run + 1, true);
}
}
return true; return true;
} }
+2 -12574
View File
File diff suppressed because it is too large Load Diff
+9 -7
View File
@@ -1,16 +1,17 @@
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Resources;
// Allgemeine Informationen über eine Assembly werden über die folgenden // Allgemeine Informationen über eine Assembly werden über die folgenden
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die mit einer Assembly verknüpft sind. // die mit einer Assembly verknüpft sind.
[assembly: AssemblyTitle("svnsync")] [assembly: AssemblyTitle("SvnSync")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("Synct ein SVN selbstständig")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("BlubbFish")]
[assembly: AssemblyProduct("svnsync")] [assembly: AssemblyProduct("SvnSync")]
[assembly: AssemblyCopyright("Copyright © 2012")] [assembly: AssemblyCopyright("Copyright © 2012 - 2014")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
@@ -32,5 +33,6 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben: // übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyVersion("1.0.1.0")]
[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.1.0")]
[assembly: NeutralResourcesLanguageAttribute("de-DE")]
+17 -1
View File
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// Dieser Code wurde von einem Tool generiert. // Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.269 // Laufzeitversion:4.0.30319.17929
// //
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird. // der Code erneut generiert wird.
@@ -60,6 +60,19 @@ namespace svnsync.Properties {
} }
} }
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Icon ähnlich wie (Symbol).
/// </summary>
internal static System.Drawing.Icon Icon {
get {
object obj = ResourceManager.GetObject("Icon", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Icon ähnlich wie (Symbol).
/// </summary>
internal static System.Drawing.Icon Special_File { internal static System.Drawing.Icon Special_File {
get { get {
object obj = ResourceManager.GetObject("Special_File", resourceCulture); object obj = ResourceManager.GetObject("Special_File", resourceCulture);
@@ -67,6 +80,9 @@ namespace svnsync.Properties {
} }
} }
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Icon ähnlich wie (Symbol).
/// </summary>
internal static System.Drawing.Icon Special_Folder { internal static System.Drawing.Icon Special_Folder {
get { get {
object obj = ResourceManager.GetObject("Special_Folder", resourceCulture); object obj = ResourceManager.GetObject("Special_Folder", resourceCulture);
+3
View File
@@ -118,6 +118,9 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="Icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\file\Icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Special_File" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="Special_File" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\file\notag.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> <value>..\file\notag.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data> </data>
+9 -9
View File
@@ -14,8 +14,8 @@ namespace svnsync
private List<String> noversion; private List<String> noversion;
private List<String> wasdeleted; private List<String> wasdeleted;
private List<String> added; private List<String> added;
private string SvnError; private string SvnError = "";
private string SvnOutput; private string SvnOutput = "";
private List<string> isdeleted; private List<string> isdeleted;
public Svn(string dir) public Svn(string dir)
@@ -51,7 +51,7 @@ namespace svnsync
String file = line.Substring(8).Trim(new Char[] {'\r','\n',' ','\t'}); String file = line.Substring(8).Trim(new Char[] {'\r','\n',' ','\t'});
if (handles[0] == ' ') if (handles[0] == ' ')
{ {
throw new NotImplementedException(); throw new NotImplementedException("SVN Line ' '");
} }
else if (handles[0] == 'A') else if (handles[0] == 'A')
{ {
@@ -67,19 +67,19 @@ namespace svnsync
} }
else if (handles[0] == 'R') else if (handles[0] == 'R')
{ {
throw new NotImplementedException(); throw new NotImplementedException("SVN Line 'R'");
} }
else if (handles[0] == 'C') else if (handles[0] == 'C')
{ {
throw new NotImplementedException(); throw new NotImplementedException("SVN Line 'C'");
} }
else if (handles[0] == 'X') else if (handles[0] == 'X')
{ {
throw new NotImplementedException(); throw new NotImplementedException("SVN Line 'X'");
} }
else if (handles[0] == 'I') else if (handles[0] == 'I')
{ {
throw new NotImplementedException(); throw new NotImplementedException("SVN Line 'I'");
} }
else if (handles[0] == '?') else if (handles[0] == '?')
{ {
@@ -91,11 +91,11 @@ namespace svnsync
} }
else if (handles[0] == '~') else if (handles[0] == '~')
{ {
throw new NotImplementedException(); throw new NotImplementedException("SVN Line '~'");
} }
else else
{ {
throw new NotImplementedException(); throw new NotImplementedException("Unexpected Symbol!");
} }
} }
} }
Binary file not shown.
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 368 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

+9 -2
View File
@@ -9,7 +9,7 @@
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>svnsync</RootNamespace> <RootNamespace>svnsync</RootNamespace>
<AssemblyName>svnsync</AssemblyName> <AssemblyName>SvnSync</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile> <TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
@@ -25,7 +25,7 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath> <OutputPath>bin\Release\</OutputPath>
@@ -33,6 +33,10 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<ApplicationIcon>file\Icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup />
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
@@ -85,6 +89,9 @@
<ItemGroup> <ItemGroup>
<None Include="file\notag.ico" /> <None Include="file\notag.ico" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="file\Icon.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
+3
View File
@@ -5,4 +5,7 @@
<RemoteDebugEnabled>false</RemoteDebugEnabled> <RemoteDebugEnabled>false</RemoteDebugEnabled>
<StartAction>Project</StartAction> <StartAction>Project</StartAction>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<StartArguments>-d "D:\\Doc%27s\\Basteleien\\" -cron -autoadd -autodelete1</StartArguments>
</PropertyGroup>
</Project> </Project>