From 2dd56efa6314bf63e08dd8dedfefbe3c009b710d Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Mon, 20 Oct 2014 16:11:06 +0100 Subject: [PATCH 1/6] Test 3 --- test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test b/test index d8263ee9..e440e5c8 100644 --- a/test +++ b/test @@ -1 +1 @@ -2 \ No newline at end of file +3 \ No newline at end of file From 91423c9c978f632b83b2c23e49116dd507ee1cde Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Mon, 20 Oct 2014 17:45:17 +0100 Subject: [PATCH 2/6] ignored build files. --- .gitignore | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.gitignore b/.gitignore index 4ede8306..05179290 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,22 @@ #doxygen /doc/doxygen /doc/doxygen.cfg +/build +/ext/cryptopp562 +/ext/gmock-1.6.0 +/ext/gtest-1.6.0 +/lib +/src/gui/ui_SetupWizardBase.h +/src/gui/Makefile +/src/gui/Makefile.Debug +/src/gui/Makefile.Release +/src/gui/object_script.synergy.Debug +/src/gui/object_script.synergy.Release +/src/gui/ui_AboutDialogBase.h +/src/gui/ui_ActionDialogBase.h +/src/gui/ui_HotkeyDialogBase.h +/src/gui/ui_MainWindowBase.h +/src/gui/ui_ScreenSettingsDialogBase.h +/src/gui/ui_ServerConfigDialogBase.h +/src/gui/ui_SettingsDialogBase.h +/src/gui/tmp From ec3a9c3f1f30fd8d75ca171d1f17deae6e0b8063 Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Mon, 20 Oct 2014 17:46:11 +0100 Subject: [PATCH 3/6] added getGitRevision function to get current git revision. --- ext/toolchain/commands1.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/ext/toolchain/commands1.py b/ext/toolchain/commands1.py index ef492f2b..d245c55b 100644 --- a/ext/toolchain/commands1.py +++ b/ext/toolchain/commands1.py @@ -941,6 +941,24 @@ class InternalCommands: print self.find_revision() def find_revision(self): + return self.getGitRevision() + + def getGitRevision(self): + if sys.version_info < (2, 4): + raise Exception("Python 2.4 or greater required.") + else: + p = subprocess.Popen( + ["git", "log", "--pretty=format:%h", "-n", "1"], + stdout=subprocess.PIPE, stderr=subprocess.PIPE) + + stdout, stderr = p.communicate() + + if p.returncode != 0: + raise Exception('Could not get revision - git info failed with code: ' + str(p.returncode)) + + return stdout + + def find_revision_svn(self): if sys.version_info < (2, 4): stdout = commands.getoutput('svn info') else: @@ -1403,7 +1421,7 @@ class InternalCommands: def dist_name_rev(self, type): # find the version number (we're puting the rev in after this) pattern = '(.*\d+\.\d+\.\d+)(.*)' - replace = '\g<1>-r' + self.find_revision() + '\g<2>' + replace = '\g<1>-' + self.find_revision() + '\g<2>' return re.sub(pattern, replace, self.dist_name(type)) def dist_usage(self): From 3b3cec4040468f705712b10de06ff927dfb0216c Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Mon, 20 Oct 2014 19:06:25 +0100 Subject: [PATCH 4/6] changed svn export to git export --- ext/toolchain/commands1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/toolchain/commands1.py b/ext/toolchain/commands1.py index d245c55b..6b18fcf0 100644 --- a/ext/toolchain/commands1.py +++ b/ext/toolchain/commands1.py @@ -1192,7 +1192,7 @@ class InternalCommands: shutil.rmtree(exportPath) print 'Exporting repository to: ' + exportPath - err = os.system('svn export . ' + exportPath) + err = os.system('git archive master | tar -x -C ' + exportPath) if err != 0: raise Exception('Repository export failed: ' + str(err)) From 8b4a3a8b920b2c7850c8a1657ef23559b29825f6 Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Mon, 20 Oct 2014 19:26:57 +0100 Subject: [PATCH 5/6] created dist src export path --- ext/toolchain/commands1.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/toolchain/commands1.py b/ext/toolchain/commands1.py index 6b18fcf0..0540bcb4 100644 --- a/ext/toolchain/commands1.py +++ b/ext/toolchain/commands1.py @@ -1192,6 +1192,7 @@ class InternalCommands: shutil.rmtree(exportPath) print 'Exporting repository to: ' + exportPath + os.mkdir(exportPath) err = os.system('git archive master | tar -x -C ' + exportPath) if err != 0: raise Exception('Repository export failed: ' + str(err)) From 504e41966e37aeeeb83d1e461d60b0441ee346f3 Mon Sep 17 00:00:00 2001 From: Xinyu Hou Date: Tue, 21 Oct 2014 15:48:04 +0100 Subject: [PATCH 6/6] Carbon loop not ready within 5 sec #4002 Port fix from enterprise. --- src/lib/platform/OSXScreen.cpp | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/src/lib/platform/OSXScreen.cpp b/src/lib/platform/OSXScreen.cpp index cf58aaa2..47e5af8e 100644 --- a/src/lib/platform/OSXScreen.cpp +++ b/src/lib/platform/OSXScreen.cpp @@ -62,6 +62,10 @@ enum { kSynergyMouseScrollAxisY = 'saxy' }; +enum { + kCarbonLoopWaitTimeout = 10 +}; + // TODO: upgrade deprecated function usage in these functions. void setZeroSuppressionInterval(); void avoidSupression(); @@ -1693,17 +1697,24 @@ COSXScreen::watchSystemPowerThread(void*) // setting m_pmThreadReady to true otherwise the parent thread will // block waiting for it. if (m_pmRootPort == 0) { + LOG((CLOG_WARN "failed to init watchSystemPowerThread")); return; } LOG((CLOG_DEBUG "started watchSystemPowerThread")); - + + LOG((CLOG_DEBUG "waiting for event loop")); m_events->waitForReady(); #if defined(MAC_OS_X_VERSION_10_7) { CLock lockCarbon(m_carbonLoopMutex); if (*m_carbonLoopReady == false) { + + // we signalling carbon loop ready before starting + // unless we know how to do it within the loop + LOG((CLOG_DEBUG "signalling carbon loop ready")); + *m_carbonLoopReady = true; m_carbonLoopReady->signal(); } @@ -1713,6 +1724,7 @@ COSXScreen::watchSystemPowerThread(void*) // start the run loop LOG((CLOG_DEBUG "starting carbon loop")); CFRunLoopRun(); + LOG((CLOG_DEBUG "carbon loop has stopped")); // cleanup if (notificationPortRef) { @@ -2126,14 +2138,26 @@ void COSXScreen::waitForCarbonLoop() const { #if defined(MAC_OS_X_VERSION_10_7) - double timeout = ARCH->time() + 10; + if (*m_carbonLoopReady) { + LOG((CLOG_DEBUG "carbon loop already ready")); + return; + } + CLock lock(m_carbonLoopMutex); + + LOG((CLOG_DEBUG "waiting for carbon loop")); + + double timeout = ARCH->time() + kCarbonLoopWaitTimeout; while (!m_carbonLoopReady->wait()) { if(ARCH->time() > timeout) { - throw std::runtime_error("carbon loop is not ready within 5 sec"); + LOG((CLOG_DEBUG "carbon loop not ready, waiting again")); + timeout = ARCH->time() + kCarbonLoopWaitTimeout; } } + + LOG((CLOG_DEBUG "carbon loop ready")); #endif + } #pragma GCC diagnostic ignored "-Wdeprecated-declarations"