<?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>Subversion &#8211; Johnny Morano&#039;s Tech Articles</title>
	<atom:link href="https://jmorano.moretrix.com/tag/subversion/feed/" rel="self" type="application/rss+xml" />
	<link>https://jmorano.moretrix.com</link>
	<description>Ramblings of an old-fashioned space cowboy</description>
	<lastBuildDate>Tue, 31 Aug 2010 14:27:00 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>

<image>
	<url>https://jmorano.moretrix.com/wp-content/uploads/2022/04/cropped-jmorano_emblem-32x32.png</url>
	<title>Subversion &#8211; Johnny Morano&#039;s Tech Articles</title>
	<link>https://jmorano.moretrix.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Recovering a deleted file in Subversion</title>
		<link>https://jmorano.moretrix.com/2010/08/recovering-a-deleted-file-in-subversion/</link>
		
		<dc:creator><![CDATA[insaniac]]></dc:creator>
		<pubDate>Tue, 31 Aug 2010 14:27:00 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Dev]]></category>
		<category><![CDATA[Subversion]]></category>
		<guid isPermaLink="false">http://jmorano.moretrix.com/?p=292</guid>

					<description><![CDATA[Many times I have been looking on the Internet to find a suitable solution for this, but in&#8230;]]></description>
										<content:encoded><![CDATA[<p>Many times I have been looking on the Internet to find a suitable solution for this, but in the end I&#8217;ve created my own solution.</p>
<p>These next steps will explain how to recover a deleted file back into the HEAD revision, in a <a title="Subversion Website" href="http://subversion.apache.org/" target="_blank">Subversion</a> repositry.</p>
<p><span id="more-292"></span><br />
The following example shows how to Subversion commands should be executed.</p>
<li>At first, a test environment is created:
<pre class="brush:bash">.oO( ~/trunk )Oo. svn mkdir test_dir
A         test_dir
.oO( ~/trunk )Oo. ls
test_dir

.oO( ~/trunk )Oo. cd test_dir/
.oO( ~/trunk/test_dir )Oo. ls
.oO( ~/trunk/test_dir )Oo. echo 'Regel 1'  &gt;&gt;file_1
.oO( ~/trunk/test_dir )Oo. svn add file_1
A         file_1
.oO( ~/trunk/test_dir )Oo. svn ci -m '-m test set up'
Adding         test_dir
Adding         test_dir/file_1
Transmitting file data .

Committed revision 14.

.oO( ~/trunk/test_dir )Oo. ls
file_1</pre>
</li>
<li>Next, a certain file will be deleted:
<pre class="brush:bash">.oO( ~/trunk/test_dir )Oo. svn delete file_1
D         file_1
.oO( ~/trunk/test_dir )Oo. svn ci -m '- deleting test file'
Deleting       test_dir/file_1

Committed revision 15.</pre>
</li>
<li>Afterwards, a few more Subversion commands are executed to have some more logging and revision numbers:
<pre class="brush:bash">.oO( ~/trunk/test_dir )Oo. echo 'Regel 1' &gt;file_2
.oO( ~/trunk/test_dir )Oo. svn add file_2
A         file_2
.oO( ~/trunk/test_dir )Oo. svn ci -m '- added second test file'
Adding         test_dir/file_2
Transmitting file data .

Committed revision 16.</pre>
</li>
<li>The <code>svn log --verbose</code> command shows which the commit messages, revision numbers and affected path names:
<pre class="brush:bash">.oO( ~/trunk/test_dir )Oo. svn log --verbose
------------------------------------------------------------------------
r16 | jmorano | 2010-08-31 15:47:21 +0200 (Tue, 31 Aug 2010) | 1 line
Changed paths:
A /trunk/test_dir/file_2

- added second test file
------------------------------------------------------------------------
r15 | jmorano | 2010-08-31 15:46:53 +0200 (Tue, 31 Aug 2010) | 1 line
Changed paths:
D /trunk/test_dir/file_1

- deleting test file
------------------------------------------------------------------------
r14 | jmorano | 2010-08-31 15:45:52 +0200 (Tue, 31 Aug 2010) | 1 line
Changed paths:
A /trunk/test_dir
A /trunk/test_dir/file_1

-m test set up</pre>
</li>
<li>Since in revision r15 the file <em>file_1</em> was deleted, one revision less will be used to recover the file, using the <code>svn update -r</code> command. Beware that the file must be first renamed to a new filename and afterwards renamed to the original filename!
<pre class="brush:bash">.oO( ~/trunk/test_dir )Oo. svn update -r14 file_1
A    file_1
Updated to revision 14.
.oO( ~/trunk/test_dir )Oo. svn rename file_1 new_file_1
A         new_file_1
D         file_1
.oO( ~/trunk/test_dir )Oo. svn status
D      file_1
A  +   new_file_1
.oO( ~/trunk/test_dir )Oo. svn ci -m '- readding'
Deleting       test_dir/file_1
Adding         test_dir/new_file_1

Committed revision 17.</pre>
</li>
<li>Check the Subversion logging:
<pre class="brush:bash">.oO( ~/trunk/test_dir )Oo. svn log new_file_1
------------------------------------------------------------------------
r17 | jmorano | 2010-08-31 15:53:46 +0200 (Tue, 31 Aug 2010) | 1 line

- readding
------------------------------------------------------------------------
r14 | jmorano | 2010-08-31 15:45:52 +0200 (Tue, 31 Aug 2010) | 1 line

-m test set up
------------------------------------------------------------------------</pre>
</li>
<li>Rename the new filename to the original filename:
<pre class="brush:bash">.oO( ~/trunk/test_dir )Oo. svn rename new_file_1 file_1
A         file_1
D         new_file_1
.oO( ~/trunk/test_dir )Oo. svn ci -m '- readding'
Adding         test_dir/file_1
Deleting       test_dir/new_file_1

Committed revision 18.</pre>
</li>
<li>Check the Subversion logging:
<pre class="brush:bash">.oO( ~/trunk/test_dir )Oo. svn log --verbose file_1
------------------------------------------------------------------------
r18 | jmorano | 2010-08-31 15:54:09 +0200 (Tue, 31 Aug 2010) | 1 line
Changed paths:
A /trunk/test_dir/file_1 (from /trunk/test_dir/new_file_1:17)
D /trunk/test_dir/new_file_1

- readding
------------------------------------------------------------------------
r17 | jmorano | 2010-08-31 15:53:46 +0200 (Tue, 31 Aug 2010) | 1 line
Changed paths:
A /trunk/test_dir/new_file_1 (from /trunk/test_dir/file_1:14)

- readding
------------------------------------------------------------------------
r14 | jmorano | 2010-08-31 15:45:52 +0200 (Tue, 31 Aug 2010) | 1 line
Changed paths:
A /trunk/test_dir
A /trunk/test_dir/file_1

-m test set up
------------------------------------------------------------------------</pre>
</li>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
