[synchronicity-commits] SF.net SVN: synchronicity:[1549] trunk/Create Synchronicity
Easy, fast, and lightweight backup and synchronization app for Windows
Brought to you by:
createsoftware
From: <cre...@us...> - 2011-12-15 17:40:01
|
Revision: 1549 http://synchronicity.svn.sourceforge.net/synchronicity/?rev=1549&view=rev Author: createsoftware Date: 2011-12-15 17:39:55 +0000 (Thu, 15 Dec 2011) Log Message: ----------- Implement, fix, or remove a number of TODOs/LATERs. Run post-sync script even if the backup was canceled or failed. Modified Paths: -------------- trunk/Create Synchronicity/Interface/SettingsForm.vb trunk/Create Synchronicity/Interface/SynchronizeForm.vb trunk/Create Synchronicity/Main.vb trunk/Create Synchronicity/Profile settings.vb trunk/Create Synchronicity/Revision.vb Modified: trunk/Create Synchronicity/Interface/SettingsForm.vb =================================================================== --- trunk/Create Synchronicity/Interface/SettingsForm.vb 2011-12-15 15:33:24 UTC (rev 1548) +++ trunk/Create Synchronicity/Interface/SettingsForm.vb 2011-12-15 17:39:55 UTC (rev 1549) @@ -523,10 +523,10 @@ ToTextBox.Text = Cleanup(ToTextBox.Text) End Sub - Private Shared Function GetString(ByRef Table As Dictionary(Of String, Boolean)) As String 'LATER: Refactor + Private Shared Function GetString(ByRef Table As Dictionary(Of String, Boolean)) As String Dim ListString As New System.Text.StringBuilder For Each Node As String In Table.Keys - ListString.Append(Node).Append(";") 'Must end with a ";" + ListString.Append(Node).Append(";") 'Must end with a ';', since '' means that no directories were selected, while ';' means that the root directory was selected, with no subfolders included. See LoadSubFoldersList() Next Return ListString.ToString End Function Modified: trunk/Create Synchronicity/Interface/SynchronizeForm.vb =================================================================== --- trunk/Create Synchronicity/Interface/SynchronizeForm.vb 2011-12-15 15:33:24 UTC (rev 1548) +++ trunk/Create Synchronicity/Interface/SynchronizeForm.vb 2011-12-15 17:39:55 UTC (rev 1549) @@ -381,22 +381,15 @@ PreviewList.Refresh() PreviewList.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent) - If Not Status.Cancel Then 'LATER: Show something even if the sync was canceled - Interaction.ShowBalloonTip(Translation.TranslateFormat("\SYNCED_W_ERRORS", Handler.ProfileName), Handler.LogPath) - End If + If Not Status.Cancel Then Interaction.ShowBalloonTip(Translation.TranslateFormat("\SYNCED_W_ERRORS", Handler.ProfileName), Handler.LogPath) Else - 'LATER: Add ballon to say the sync was cancelled. If Not Status.Cancel Then Interaction.ShowBalloonTip(Translation.TranslateFormat("\SYNCED_OK", Handler.ProfileName), Handler.LogPath) End If Log.SaveAndDispose(LeftRootPath, RightRootPath, Status) + If Not (Status.Failed Or Status.Cancel) Then Handler.SetLastRun() 'Required to implement catching up - ' Set last run only if the profile hasn't failed, and has synced completely. - ' Checking for Status.Cancel allows to resync if eg. computer was stopped during sync. - If Not (Status.Failed Or Status.Cancel) Then - Handler.SetLastRun() - RunPostSync() - End If + RunPostSync() If (CommandLine.Quiet And Not Me.Visible) Or CommandLine.NoStop Then Me.Close() @@ -876,7 +869,6 @@ ' Check the filename Try Select Case Handler.GetSetting(Of Integer)(ProfileSetting.Restrictions) - 'LATER: Add an option to allow for simultaneous inclusion and exclusion (useful because of regex patterns) Case 1 Return MatchesPattern(GetFileOrFolderName(FullPath), IncludedPatterns) Case 2 @@ -1021,7 +1013,7 @@ Check_HardwareFATTimes() End Sub - 'LATER: This could be a useful function for NAS drives known to round NTFS timestamps, but currently only DLink does, and they do it incorrectly (there's a bug in their drivers) + 'Note: This could be a useful function for NAS drives known to round NTFS timestamps, but currently only DLink does, and they do it incorrectly (there's a bug in their drivers) Private Shared Function RoundToSecond(ByVal NTFSTime As Date) As Date Return (New Date(NTFSTime.Year, NTFSTime.Month, NTFSTime.Day, NTFSTime.Hour, NTFSTime.Minute, NTFSTime.Second).AddSeconds(If(NTFSTime.Millisecond > 500, 1, 0))) End Function Modified: trunk/Create Synchronicity/Main.vb =================================================================== --- trunk/Create Synchronicity/Main.vb 2011-12-15 15:33:24 UTC (rev 1548) +++ trunk/Create Synchronicity/Main.vb 2011-12-15 17:39:55 UTC (rev 1549) @@ -352,7 +352,6 @@ '<catchup> Dim LastRun As Date = Handler.GetLastRun() - 'LATER: Customizable time span? If Handler.GetSetting(Of Boolean)(ProfileSetting.CatchUpSync, False) And LastRun <> ScheduleInfo.DATE_NEVER And (NewEntry.NextRun - LastRun) > (Handler.Scheduler.GetInterval() + OneDay) Then ProgramConfig.LogAppEvent("Scheduler: Profile " & Name & " was last executed on " & LastRun.ToString & ", marked for catching up.") NewEntry.NextRun = ScheduleInfo.DATE_CATCHUP Modified: trunk/Create Synchronicity/Profile settings.vb =================================================================== --- trunk/Create Synchronicity/Profile settings.vb 2011-12-15 15:33:24 UTC (rev 1548) +++ trunk/Create Synchronicity/Profile settings.vb 2011-12-15 17:39:55 UTC (rev 1549) @@ -244,7 +244,7 @@ End Sub Sub SetSetting(Of T)(ByVal SettingName As String, ByVal Value As T) - Configuration(SettingName) = Value.ToString 'LATER: There might be a problem here, when serializing dates (locale-dependent problems). + Configuration(SettingName) = Value.ToString 'Dates are serialized in a locale-dependent way. End Sub Sub CopySetting(Of T)(ByVal Key As String, ByRef Value As T, ByVal Load As Boolean) @@ -284,7 +284,9 @@ Sub LoadSubFoldersList(ByVal ConfigLine As String, ByRef Subfolders As Dictionary(Of String, Boolean)) Subfolders.Clear() Dim ConfigCheckedFoldersList As New List(Of String)(If(Configuration.ContainsKey(ConfigLine), Configuration(ConfigLine), "").Split(";"c)) - ConfigCheckedFoldersList.RemoveAt(ConfigCheckedFoldersList.Count - 1) 'Removes the last, empty element 'WARNING: All lists should end with a comma then. + ConfigCheckedFoldersList.RemoveAt(ConfigCheckedFoldersList.Count - 1) 'Removes the last, empty element + ' Warning: The trailing comma can't be removed when generating the configuration string. + ' Using StringSplitOptions.RemoveEmptyEntries would make no difference between ';' (root folder selected, no subfolders) and '' (nothing selected at all) For Each Dir As String In ConfigCheckedFoldersList If Not Subfolders.ContainsKey(Dir) Then Modified: trunk/Create Synchronicity/Revision.vb =================================================================== --- trunk/Create Synchronicity/Revision.vb 2011-12-15 15:33:24 UTC (rev 1548) +++ trunk/Create Synchronicity/Revision.vb 2011-12-15 17:39:55 UTC (rev 1549) @@ -1,3 +1,3 @@ Module Revision - Public Const Build As Integer = 1547 + Public Const Build As Integer = 1548 End Module This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |