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

This commit is contained in:
BlubbFish 2014-01-05 15:57:03 +00:00
parent 4a9da90b26
commit 568047799b
16 changed files with 83 additions and 12604 deletions

View File

@ -35,7 +35,7 @@
//
// notifyIcon
//
this.notifyIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon.Icon")));
this.notifyIcon.Icon = Properties.Resources.Icon;
this.notifyIcon.Text = "SvnSync";
this.notifyIcon.Visible = true;
this.notifyIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon_MouseDoubleClick);
@ -45,7 +45,7 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
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.ShowInTaskbar = false;
this.Text = "SvnSync";

View File

@ -33,15 +33,19 @@ namespace svnsync
this.CreateFileList("Löschen", "Diese Daten sind gelöscht worden:", l, new EventHandler(deleteButton_Click));
*/this.c = new CmdArgs(args);
this.StartSvn();
if (this.s != null)
{
this.notifyIcon.Text = "SvnSync: " + this.c.GetArgumentData("-d");
}
this.Init();
}
private void Init()
{
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);
this.Close();
//Application.Exit();
@ -49,16 +53,22 @@ namespace svnsync
}
private bool cronJob(int run)
private bool cronJob(int run, bool readyToCommit)
{
if (s == null)
return this.HandleSvn(HandleSvnType.NotInit, "");
if (run > 10)
return this.HandleSvn(HandleSvnType.ToMutchChronRuns, "");
s.Update();
if (s.IsError())
return this.HandleSvn(HandleSvnType.UnexpectedError, s.getError());
s.CheckStatus();
try
{
s.CheckStatus();
}
catch (NotImplementedException e)
{
return this.HandleSvn(HandleSvnType.UnexpectedError, e.Message);
}
if (s.IsNotOnlyModified())
{
if (s.IsUncheckedFiles())
@ -79,13 +89,23 @@ namespace svnsync
}
if (s.IsError())
return this.HandleSvn(HandleSvnType.UnexpectedError, s.getError());
return this.cronJob(run + 1);
return this.cronJob(run + 1, true);
}
else
{
s.SetArgCheckIn(this.GetTimeStamp(DateTime.Now));
if (s.IsError())
return this.HandleSvn(HandleSvnType.UnexpectedError, s.getError());
if (readyToCommit)
{
s.SetArgCheckIn(this.GetTimeStamp(DateTime.Now));
if (s.IsError())
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;
}

File diff suppressed because it is too large Load Diff

View File

@ -1,16 +1,17 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Resources;
// Allgemeine Informationen über eine Assembly werden über die folgenden
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die mit einer Assembly verknüpft sind.
[assembly: AssemblyTitle("svnsync")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyTitle("SvnSync")]
[assembly: AssemblyDescription("Synct ein SVN selbstständig")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("svnsync")]
[assembly: AssemblyCopyright("Copyright © 2012")]
[assembly: AssemblyCompany("BlubbFish")]
[assembly: AssemblyProduct("SvnSync")]
[assembly: AssemblyCopyright("Copyright © 2012 - 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@ -32,5 +33,6 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.1.0")]
[assembly: AssemblyFileVersion("1.0.1.0")]
[assembly: NeutralResourcesLanguageAttribute("de-DE")]

View File

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 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
// 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 {
get {
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 {
get {
object obj = ResourceManager.GetObject("Special_Folder", resourceCulture);

View File

@ -118,6 +118,9 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<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">
<value>..\file\notag.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>

View File

@ -14,8 +14,8 @@ namespace svnsync
private List<String> noversion;
private List<String> wasdeleted;
private List<String> added;
private string SvnError;
private string SvnOutput;
private string SvnError = "";
private string SvnOutput = "";
private List<string> isdeleted;
public Svn(string dir)
@ -51,7 +51,7 @@ namespace svnsync
String file = line.Substring(8).Trim(new Char[] {'\r','\n',' ','\t'});
if (handles[0] == ' ')
{
throw new NotImplementedException();
throw new NotImplementedException("SVN Line ' '");
}
else if (handles[0] == 'A')
{
@ -67,19 +67,19 @@ namespace svnsync
}
else if (handles[0] == 'R')
{
throw new NotImplementedException();
throw new NotImplementedException("SVN Line 'R'");
}
else if (handles[0] == 'C')
{
throw new NotImplementedException();
throw new NotImplementedException("SVN Line 'C'");
}
else if (handles[0] == 'X')
{
throw new NotImplementedException();
throw new NotImplementedException("SVN Line 'X'");
}
else if (handles[0] == 'I')
{
throw new NotImplementedException();
throw new NotImplementedException("SVN Line 'I'");
}
else if (handles[0] == '?')
{
@ -91,11 +91,11 @@ namespace svnsync
}
else if (handles[0] == '~')
{
throw new NotImplementedException();
throw new NotImplementedException("SVN Line '~'");
}
else
{
throw new NotImplementedException();
throw new NotImplementedException("Unexpected Symbol!");
}
}
}

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

BIN
svnsync/file/Icon.ico Normal file

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 368 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

View File

@ -9,7 +9,7 @@
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>svnsync</RootNamespace>
<AssemblyName>svnsync</AssemblyName>
<AssemblyName>SvnSync</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
@ -25,7 +25,7 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
@ -33,6 +33,10 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>file\Icon.ico</ApplicationIcon>
</PropertyGroup>
<PropertyGroup />
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
@ -85,6 +89,9 @@
<ItemGroup>
<None Include="file\notag.ico" />
</ItemGroup>
<ItemGroup>
<None Include="file\Icon.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- 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.

View File

@ -5,4 +5,7 @@
<RemoteDebugEnabled>false</RemoteDebugEnabled>
<StartAction>Project</StartAction>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<StartArguments>-d "D:\\Doc%27s\\Basteleien\\" -cron -autoadd -autodelete1</StartArguments>
</PropertyGroup>
</Project>