<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Get: Date and time, read/write vs. read only</title><link>http://blogs.msdn.com/b/buckh/archive/2007/07/13/get-date-and-time-read-write-vs-read-only.aspx</link><description>Periodically we get the following questions about get. Is there any way to have get set the date and time on a retrieved file to be the last modified date and time from the version control repository rather than the time when it was downloaded? Is there</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Get: Date and time, read/write vs. read only</title><link>http://blogs.msdn.com/b/buckh/archive/2007/07/13/get-date-and-time-read-write-vs-read-only.aspx#10167482</link><pubDate>Mon, 23 May 2011 20:17:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10167482</guid><dc:creator>Buck Hodges</dc:creator><description>&lt;p&gt;Edward, these are on our list for hopefully being in the next release. &amp;nbsp;Stay tuned to see how it turns out.&lt;/p&gt;
&lt;p&gt;Buck&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10167482" width="1" height="1"&gt;</description></item><item><title>re: Get: Date and time, read/write vs. read only</title><link>http://blogs.msdn.com/b/buckh/archive/2007/07/13/get-date-and-time-read-write-vs-read-only.aspx#10167478</link><pubDate>Mon, 23 May 2011 20:08:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10167478</guid><dc:creator>Edward Williams</dc:creator><description>&lt;p&gt;Hello Buck,&lt;/p&gt;
&lt;p&gt;Has this functionality (initial post) &amp;nbsp;been added to TFS 2010? If not, what is the next release that it is considered to be added to?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10167478" width="1" height="1"&gt;</description></item><item><title>re: Get: Date and time, read/write vs. read only</title><link>http://blogs.msdn.com/b/buckh/archive/2007/07/13/get-date-and-time-read-write-vs-read-only.aspx#10046542</link><pubDate>Thu, 05 Aug 2010 13:52:57 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10046542</guid><dc:creator>wewilder</dc:creator><description>&lt;p&gt;In addition the summary properites are also wiped out! &amp;nbsp; I know it may seem strange, but we have users who actually use these summary fields. &amp;nbsp;I&amp;#39;m just hoping this doesn&amp;#39;t end up being a show-stopper for moving forward with implementing TFS in some of our application areas.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10046542" width="1" height="1"&gt;</description></item><item><title>re: Get: Date and time, read/write vs. read only</title><link>http://blogs.msdn.com/b/buckh/archive/2007/07/13/get-date-and-time-read-write-vs-read-only.aspx#10046118</link><pubDate>Wed, 04 Aug 2010 19:50:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10046118</guid><dc:creator>wewilder</dc:creator><description>&lt;p&gt;Thanks John. &amp;nbsp; We package the entire application for deployment every time. &amp;nbsp;If a modified date hasn&amp;#39;t changed since our last build and deploy, we don&amp;#39;t want it to change for the current one either. &amp;nbsp; &amp;nbsp; Checking modified dates, especially when there is an issue, &amp;nbsp;has been a common practice at my company for many years. &amp;nbsp; The source control tool(s) we are moving from to TFS didn&amp;#39;t mess with the dates. &amp;nbsp; Depending on how well it works for us, we may very well incorporate John&amp;#39;s code into our build process, but it would be much better to have that option built into TFS. &amp;nbsp; &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10046118" width="1" height="1"&gt;</description></item><item><title>re: Get: Date and time, read/write vs. read only</title><link>http://blogs.msdn.com/b/buckh/archive/2007/07/13/get-date-and-time-read-write-vs-read-only.aspx#10046057</link><pubDate>Wed, 04 Aug 2010 17:41:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10046057</guid><dc:creator>John Hardin</dc:creator><description>&lt;p&gt;OP et. al.:&lt;/p&gt;
&lt;p&gt;(1) Copy this to a file named &amp;quot;Fix_File_Dates_From_TFS.ps1&amp;quot;:&lt;/p&gt;
&lt;p&gt;Get-TfsChildItem |&lt;/p&gt;
&lt;p&gt; &amp;nbsp;?{$_.ItemType -eq &amp;quot;File&amp;quot;} |&lt;/p&gt;
&lt;p&gt; &amp;nbsp;%{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;if (test-path (Split-Path $_.ServerItem -Leaf)) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;$file = Get-Item (Split-Path $_.ServerItem -Leaf);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;if ($file.IsReadOnly) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$file.IsReadOnly = $false;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$file.LastWriteTime = $_.CheckinDate&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$file.IsReadOnly = $true;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt; &amp;nbsp; }&lt;/p&gt;
&lt;p&gt; }&lt;/p&gt;
&lt;p&gt;(2) Install the TFS Power Tools&lt;/p&gt;
&lt;p&gt;(3) Run &amp;quot;Get Latest Version&amp;quot;&lt;/p&gt;
&lt;p&gt;(4) Open a TFS Powertools PowerShell console&lt;/p&gt;
&lt;p&gt;(5) For each directory affected by the GET, change to that directory and run the above .ps1 script&lt;/p&gt;
&lt;p&gt;Buck:&lt;/p&gt;
&lt;p&gt;Incremental rebuilds should rebuild a file if the source file has been changed more recently than the compiled output was generated. How will setting the file date to the last commit date on GET of &amp;nbsp;files that are not checked out break this? I would suggest that setting the file date on GET to the current date could instead lead to _unnecessary_ rebuilds.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10046057" width="1" height="1"&gt;</description></item><item><title>re: Get: Date and time, read/write vs. read only</title><link>http://blogs.msdn.com/b/buckh/archive/2007/07/13/get-date-and-time-read-write-vs-read-only.aspx#10030121</link><pubDate>Fri, 25 Jun 2010 13:28:38 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10030121</guid><dc:creator>Buck Hodges</dc:creator><description>&lt;p&gt;John, thanks for your feedback. &amp;nbsp;We have it on the backlog for consideration for the next release. &amp;nbsp;The reason that you would not want to use this for incremental builds is that whether or not a binary should be rebuilt is based on the date of the output file (e.g., dll) compared to the dates on the input source files.&lt;/p&gt;
&lt;p&gt;Buck&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10030121" width="1" height="1"&gt;</description></item><item><title>re: Get: Date and time, read/write vs. read only</title><link>http://blogs.msdn.com/b/buckh/archive/2007/07/13/get-date-and-time-read-write-vs-read-only.aspx#10028612</link><pubDate>Tue, 22 Jun 2010 17:37:30 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10028612</guid><dc:creator>John Hardin</dc:creator><description>&lt;p&gt;I&amp;#39;d like to vote for having GET set the file date to the last commit date in the repo. This is IMO a miss compared to just about any other revision control system available.&lt;/p&gt;
&lt;p&gt;Saying this will break incremental builds is spurious. The only way that would occur is if you did a GET _while_ you&amp;#39;re doing an incremental build, and if you&amp;#39;re doing that your build environment is broken.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10028612" width="1" height="1"&gt;</description></item><item><title>re: Get: Date and time, read/write vs. read only</title><link>http://blogs.msdn.com/b/buckh/archive/2007/07/13/get-date-and-time-read-write-vs-read-only.aspx#9870705</link><pubDate>Sat, 15 Aug 2009 03:55:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9870705</guid><dc:creator>John Moreno</dc:creator><description>&lt;p&gt;I've seen two different Connect &amp;quot;bug reports/suggestions&amp;quot; for this, as well as quite a number of post complaining about it/asking how to do it.&lt;/p&gt;
&lt;p&gt;I know it's been a while since this was written, but if this comment goes through, count it as another vote for adding it sometime soon.&lt;/p&gt;
&lt;p&gt;As for why we need it: other than the obvious (wanting to know which files were worked on recently), it's critical for resolving differences between different branches of old projects that get migrated into TFS from VSS.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9870705" width="1" height="1"&gt;</description></item><item><title>re: Get: Date and time, read/write vs. read only</title><link>http://blogs.msdn.com/b/buckh/archive/2007/07/13/get-date-and-time-read-write-vs-read-only.aspx#5225226</link><pubDate>Mon, 01 Oct 2007 19:46:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5225226</guid><dc:creator>Buck Hodges</dc:creator><description>&lt;p&gt;Burton, yes, setting the date and time to the checked in time is a problem for any incremental build (i.e., any build where you don't delete all of the binaries first). &amp;nbsp;As soon as your binaries end up with dates that are later than the source files, the build won't work correctly. &amp;nbsp;That would easily happen with builds that take a long time.&lt;/p&gt;
&lt;p&gt;The correct way to do incremental builds in team build in TFS 2008 is to set the IncrementalBuild property in your tfsbuild.proj file. &amp;nbsp;This will result in the binaries not being deleted before the build and only the newly changed source files will be downloaded (all of the others will have their original date/time stamps).&lt;/p&gt;
&lt;p&gt;The server doesn't currently send the check in time to the client during a get. &amp;nbsp;Without doing that, a get that set the time and date to the check in time and date can't be done efficiently.&lt;/p&gt;
&lt;p&gt;Buck&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5225226" width="1" height="1"&gt;</description></item><item><title>re: Get: Date and time, read/write vs. read only</title><link>http://blogs.msdn.com/b/buckh/archive/2007/07/13/get-date-and-time-read-write-vs-read-only.aspx#5224283</link><pubDate>Mon, 01 Oct 2007 18:03:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5224283</guid><dc:creator>burton</dc:creator><description>&lt;p&gt;so buck, are you saying that setting the file date of source files to the check-in/modified date might cause builds not to occur that should?&lt;/p&gt;
&lt;p&gt;in my opinion, setting the file date to the check-in date is critical for supporting any Team Build that would use incremental build. &amp;nbsp;setting the file date to the download date makes the build unmovable (which is bad!) &amp;nbsp;in my opinion, movability is one of the primary benefits of having a build in the first place.&lt;/p&gt;
&lt;p&gt;on another blog/forum, someone mentioned that this would require server changes. &amp;nbsp;why would this be the case? &amp;nbsp;wouldn't the client set the file date in the workspace?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5224283" width="1" height="1"&gt;</description></item></channel></rss>