Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0.1, 1.0.2, and 1.0.3

stable shellext optimization: start overlay server only on failed remove

Unconditionally starting the server is harmless, since it checks itself, whether
another instance is already running, and exits if that's the case.

But we can spare us a process launch for the case where the pipe to the
server is working fine.

Changeset 90dfe94db0a5

Parent 90d7692271a7

by Adrian Buehlmann

Changes to one file · Browse files at 90dfe94db0a5 Showing diff from parent 90d7692271a7 Diff from another changeset...

 
856
857
858
859
860
861
862
 
 
 
 
 
863
864
865
 
856
857
858
 
 
 
 
859
860
861
862
863
864
865
866
@@ -856,10 +856,11 @@
    if (cmd == "thgstatus")   { - std::string p = dir + "\\TortoiseHgOverlayServer.exe"; - LaunchCommand(Quote(p), cwd); - - Thgstatus::remove(cwd); + if (Thgstatus::remove(cwd) != 0) + { + std::string p = dir + "\\TortoiseHgOverlayServer.exe"; + LaunchCommand(Quote(p), cwd); + }   InitStatus::check();   return;   }