[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Changeing the commited file in a hook?

From: Juanma Barranquero <jmbarranquero_at_wke.es>
Date: 2004-04-23 10:40:11 CEST

On Thu, 22 Apr 2004 10:08:41 -0500
Ben Collins-Sussman <sussman@collab.net> wrote:

> Junama, you are correct. Can you rewrite this as a patch for the
> website FAQ? I'd love to put it into our FAQ.

Something like that?

                                                                Juanma

Index: project_faq.html
===================================================================
--- project_faq.html (revision 9468)
+++ project_faq.html (working copy)
@@ -67,4 +67,6 @@
 <li><a href="#merge-using-tags">I can't use tags to merge changes from a
     branch into the trunk like I used to with CVS, can I?</a></li>
+<li><a href="#beautifier">I want the server to run a code beautifier or
+otherwise modify data as it is commited, can I?</a></li>
 <p>
 <strong>Troubleshooting:</strong>
@@ -1089,4 +1091,25 @@
 <![CDATA[=========================================================]]>
 
+<h3><a name="beautifier">I want the server to run a code beautifier or
+otherwise modify data as it is commited, can I?</a></h3>
+
+<p>In short: no, you can't. You'll have to write a wrapper script for
+<tt>svn</tt> to beautify the source code <em>before</em> commiting (i.e.,
+before sending it to the server).</p>
+
+<p>The client program maintain copies of all versioned data, to make
+certain operations (like <tt>status</tt>, <tt>diff</tt>
+and <tt>revert</tt>) possible without contacting the server.
+Currently, Subversion does not implement a protocol that would allow
+the server to inform client programs that the data really
+commited <em>is not</em> what the client sent; any change at the
+server would wreak havoc for the client. So it's not allowed.</p>
+
+<p>As an aside: revision properties (<tt>svn:log</tt>, etc.) are not
+cached by the client, so you <em>can</em> modify them in a commit
+hook.</p>
+
+<![CDATA[=========================================================]]>
+
 <p>
 <hr>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Apr 23 10:40:38 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.