Randomly Intermittent Thoughts

    Thoughts I have pondered, but may not be wholely original…

    Browsing Posts in Windows

    Recently, I was upgrading a set of files in a svn working copy directory. I received the upgraded files from a third party. I used a merge tool to synchronize and merge the files, deleting files that were no longer needed. But this just deleted them from the working copy; not the svn repository. I could do a 'svn status' and "see" that files were missing, but there didn't seem to be a way for me to tell svn to delete them.

    A quick Google Search pointed me to SNIPPLR.

    The batch file created by troy, helped enormously!
    I modified it a bit to fit my system. See below.

    1. @echo off
    2. rem :: This script deletes files from svn that are missing in the specified working copy.
    3. set SVN=<location_of_svn_executable>\bin\svn.exe
    4.  
    5. if "%1"=="" (
    6.     echo usage: %0 workingCopy
    7.     exit /b
    8. )
    9.  
    10. for /f "usebackq tokens=1*" %%a in (`%SVN% status %1`) do (
    11.     if "%%a"=="!" (
    12.         echo svn delete "%%b"
    13.         %SVN% delete "%%b"
    14.     )
    15. )

    Edit: Fixed a problem with the actual svn delete command. It wasn't wrapped in %s so it was actually calling a SVN executable in my path. I recently had to replace a hard drive so when I went to run this batch file, svn wasn't in this new system's path and failed.

    This is a bit different from my last post about Process Explorer. Process Explorer is so powerful that I accidentally killed a different process than I wanted. This wasn't through some fancy schmancy search with regular expressions and kill accident. I just highlighted a process and clicked the Process Explorer Red X.

    I then proceeded to click 'Yes' on the simple dialog: pe_are_you_sure_want_to_kill_xxxx.PNG.

    Notice the blackened out word at the end of the Dialog's text? Well that is essentially what my brain did when I read that dialog.

    So, long story short I killed the wrong process. Nothing seemed to break for a few hours. Then when I went to debug a couple of things, I wasn't able to connect to a service that was supposed to be running. I restarted somethings on my end, then remembered, "Oh yeah, I killed a random process earlier." I restarted the killed service and lo and behold everything started working again.

    Lesson learned here kids: Don't kill random processes and then wonder why stuff breaks!

    Process Explorer is part of the Microsoft Sysinternals set of utilities.

    Well, I just found another reason to love Process Explorer here: How To Identify What Programs Started svchost.exe in Windows.

    This article describes how to use the command line and/or Process Explorer to find out what the hell svchost.exe is doing.

    Open a command prompt and enter:

    tasklist /svc /FI "IMAGENAME eq svchost.exe"

    The above command will list all the svchost.exe processes and display the programs (DLL's) that have been started by svchost.exe.

    Process Explorer is part of the Microsoft Sysinternals set of utilities.

    Hopefully, this will become a series of posts. We'll see!