<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>modified Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/modified/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/modified/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Sat, 27 Feb 2021 09:22:38 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>Syncing missing/modified files to a specific version in Perforce</title>
		<link>https://www.scmgalaxy.com/tutorials/syncing-missing-modified-files-to-a-specific-version-in-perforce/</link>
					<comments>https://www.scmgalaxy.com/tutorials/syncing-missing-modified-files-to-a-specific-version-in-perforce/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Mon, 08 Jan 2018 12:00:29 +0000</pubDate>
				<category><![CDATA[Perforce]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[Find]]></category>
		<category><![CDATA[Missing]]></category>
		<category><![CDATA[Missing/modified files]]></category>
		<category><![CDATA[modified]]></category>
		<category><![CDATA[sync]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=4543</guid>

					<description><![CDATA[<p>I think this is the 5th time I&#8217;ve had to figure this out in the past few years, so this [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/syncing-missing-modified-files-to-a-specific-version-in-perforce/">Syncing missing/modified files to a specific version in Perforce</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I think this is the 5th time I&#8217;ve had to figure this out in the past few years, so this time I&#8217;m going to preserve it here for posterity <img decoding="async" src="http://www.andrewgrant.org/wordpress/wp-includes/images/smilies/icon_smile.gif" alt=":)" /></p>
<p>The problem is usually one or more of:</p>
<ul>
<li>You have files missing from your workspace that need replaced.</li>
<li>You have locally modified (i.e. not opened for edit) files that need replaced.</li>
<li>These files are large in either size or number, and on a slow or remote server, so a complete force-sync is not an appealing option.</li>
</ul>
<p>Normally this could easily be solved with something like <em>p4 diff -sd/-se //depot/path/.. | p4 -x – sync -f</em>, which finds all the missing/outdated files and then force-syncs them.</p>
<p>The problem with this approach comes when you need the files from a specific revision or label. While you can pass in a label/revision to &#8216;p4 diff&#8217;, the sync part will always retrieve the latest version of a file. To fix this we need to save the list of files we need to a temporary location, then postfix each line with the version we want, then feed that new list back to p4 sync.</p>
<p>But there&#8217;s one final catch. If your filenames are local paths instead of Perforce paths, you cannot specify a label, only revisions. E.g. c:\temp\foo.dat@SOME_LABEL will not work, but c:\temp\foo.dat#999 will. Fortunately we can use the pseudo revision &#8216;have&#8217; for our purposes.</p>
<p><em>@echo off</em></p>
<p><em>REM Could optionally pass these as %1 and %2 from the cmd line<br />
set LABEL=@SOME_LABEL<br />
set BASE_DIR=//depot/path/…</em></p>
<p><em>del p4sync.txt</em></p>
<p><em>echo Setting &#8216;have&#8217; to %LABEL% for %BASE_DIR%<br />
REM do a nop sync that sets our &#8216;have&#8217; version to the label we want<br />
p4 sync -k %BASE_DIR%%LABEL%</em></p>
<p><em>echo Finding modified files..<br />
p4 diff -se %BASE_DIR%%LABEL% &gt; p4diff.txt</em></p>
<p><em>echo Finding missing files..<br />
p4 diff -sd %BASE_DIR%%LABEL% &gt;&gt; p4diff.txt</em></p>
<p><em>echo Building sync commands<br />
REM Append #have to each filename and put them all in a list of files to sync<br />
for /f %%i in (p4diff.txt) Do echo %%i#have&gt;&gt; p4sync.txt</em></p>
<p><em>REM Now sync everything<br />
if exist p4sync.txt (<br />
echo Syncing..<br />
p4 -x p4sync.txt sync -f<br />
)else (<br />
echo It seems no files need updated!<br />
)</em></p>
<p>Voila!</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/syncing-missing-modified-files-to-a-specific-version-in-perforce/">Syncing missing/modified files to a specific version in Perforce</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/syncing-missing-modified-files-to-a-specific-version-in-perforce/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Find and display files last modified les than 90 days ago</title>
		<link>https://www.scmgalaxy.com/tutorials/find-and-display-files-last-modified-les-than-90-days-ago/</link>
					<comments>https://www.scmgalaxy.com/tutorials/find-and-display-files-last-modified-les-than-90-days-ago/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Fri, 08 Dec 2017 05:37:56 +0000</pubDate>
				<category><![CDATA[Shell Script]]></category>
		<category><![CDATA[modified]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=2245</guid>

					<description><![CDATA[<p>rajeshkumar created the topic: Find and display files last modified les than 90 days ago Find and display files last [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/find-and-display-files-last-modified-les-than-90-days-ago/">Find and display files last modified les than 90 days ago</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>rajeshkumar created the topic: Find and display files last modified les than 90 days ago</strong><br />
Find and display files last modified les than 90 days ago. </p>
<p>find . -name &#8220;*&#8221; -mtime -3 -print</p>
<p>find everything in your home that has been modified more recently than &#8220;abc.txt&#8221;: </p>
<p>find $HOME -newer ~joeuser/lastbatch.txt<br />
Regards,<br />
Rajesh Kumar<br />
Twitt me @ <a href="http://twitter.com/RajeshKumarIn">twitter.com/RajeshKumarIn</a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/find-and-display-files-last-modified-les-than-90-days-ago/">Find and display files last modified les than 90 days ago</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/find-and-display-files-last-modified-les-than-90-days-ago/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Files modified on a certain date</title>
		<link>https://www.scmgalaxy.com/tutorials/files-modified-on-a-certain-date/</link>
					<comments>https://www.scmgalaxy.com/tutorials/files-modified-on-a-certain-date/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Fri, 08 Dec 2017 05:33:38 +0000</pubDate>
				<category><![CDATA[Shell Script]]></category>
		<category><![CDATA[modified]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=2241</guid>

					<description><![CDATA[<p>scmuser created the topic: files modified on a certain date To find all files modified on a certain date, for [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/files-modified-on-a-certain-date/">Files modified on a certain date</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>scmuser created the topic: files modified on a certain date</strong></p>
<p>To find all files modified on a certain date, for example, &#8216;2007-06-07&#8217; the final input is:</p>
<p>find . -type f -newermt 2011-04-20 ! -newermt 2011-04-21</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/files-modified-on-a-certain-date/">Files modified on a certain date</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/files-modified-on-a-certain-date/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
