Keep Local Copies Up-to-Date Automatically

A coworker sent me this today; this idea had never crossed my mind:

Not sure if you’ve already got something setup to automatically update your svn checkouts, but thought I’d mention this.  I just created a .bat file:

<span style="color: #000000;">TortoiseProc</span><span style="color: #000000;">.</span><span style="color: #000000;">exe </span><span style="color: #000000;">/</span><span style="color: #0000FF;">command</span><span style="color: #800000;">:update</span><span style="color: #000000;"> </span><span style="color: #000000;">/</span><span style="color: #0000FF;">path</span><span style="color: #000000;">:</span><span style="color: #000000;">"</span><span style="color: #000000;">C:\Code\Path\to\Proj1</span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">/</span><span style="color: #000000;">closeonend:</span><span style="color: #000000;">1</span><span style="color: #000000;">

TortoiseProc</span><span style="color: #000000;">.</span><span style="color: #000000;">exe </span><span style="color: #000000;">/</span><span style="color: #0000FF;">command</span><span style="color: #800000;">:update</span><span style="color: #000000;"> </span><span style="color: #000000;">/</span><span style="color: #0000FF;">path</span><span style="color: #000000;">:</span><span style="color: #000000;">"</span><span style="color: #000000;">C:\Code\Path\to\Proj2</span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">/</span><span style="color: #000000;">closeonend:</span><span style="color: #000000;">1</span><span style="color: #000000;">

etc</span><span style="color: #000000;">...</span><span style="color: #000000;">
</span>

Then setup a windows task to run the file everyday at 4:30am. No more out of date code!

Well, that’s cool.  Two benefits I see to this:

  1. If you happen to go for several days without checking in (not a good practice, but it happens) your chance of getting a nasty merge conflict is reduced.
  2. If you switch over to a project that you haven’t worked on for a while you don’t have to wait for a long, drawn-out update to execute before you can jump right in.

This entry was posted in General PC Usage, Programming. Bookmark the permalink.