https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292008-06-29T08:50:54ZRedmineRedmine - Feature #1536: Using libsvnhttps://www.redmine.org/issues/1536?journal_id=36122008-06-29T08:50:54ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>The main reason why it's not used in Redmine is that there's no binaries available for windows.<br />I don't know if this lib has all the necessary functionalities to be used in Redmine, can you point to the documentation of this API please ?</p> Redmine - Feature #1536: Using libsvnhttps://www.redmine.org/issues/1536?journal_id=36952008-07-03T09:52:41ZPierre Paysant-Le Roux
<ul></ul><p>There is no documentation specific to the ruby bindings. <a href="http://svn.collab.net/svn-doxygen" class="external">Here</a> is the documentation of the subversion API. I think that the lib has more than all the necessary functionalities the be used in Redmine. I am not convinced that maintaining a Windows compatibility for a server software like Redmine is crucial.</p>
<p>However, it's also possible to have an adapter based on libsvn for Unices and an adapter that uses command line calls for Windows or non libsvn users. I can try to implement this adapter to show if there is a real benefit (memory footprint, cpu or io usage, code simplicity).</p>
<p>Moreover, no ruby bindings exists for all api (Mercurial for example).</p> Redmine - Feature #1536: Using libsvnhttps://www.redmine.org/issues/1536?journal_id=37422008-07-05T09:51:57ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>For sure, it would be faster.<br />Having an alternate adapter that uses libsvn would be nice indeed.</p> Redmine - Feature #1536: Using libsvnhttps://www.redmine.org/issues/1536?journal_id=89462009-05-03T17:34:01ZPierre Paysant-Le Roux
<ul><li><strong>File</strong> <a href="/attachments/1979">patch_libsvn</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/1979/patch_libsvn">patch_libsvn</a> added</li><li><strong>% Done</strong> changed from <i>0</i> to <i>90</i></li></ul><p>I finally succeed in implementing a subversion adapter based on libsvn. I wrote some non regression tests (should be completed). The adapter pass functional and unit tests of the adapter based on svn command line. At the moment, I made no benchmarking. I will write something like parsing a repository with 1000 changesets to see if there is some speed improvement.</p> Redmine - Feature #1536: Using libsvnhttps://www.redmine.org/issues/1536?journal_id=98072009-06-17T11:46:36ZPierre Paysant-Le Roux
<ul></ul><p>A simple benchmark : calling <code>Adapter#revisions</code> method on a local repository with 1000 simple changesets :<br /><pre>
user system total real
libsvn 0.150000 0.020000 0.170000 ( 0.230447)
svn command 8.150000 0.480000 8.750000 ( 8.987669)
</pre></p> Redmine - Feature #1536: Using libsvnhttps://www.redmine.org/issues/1536?journal_id=98092009-06-17T12:38:43ZJens Goldhammer
<ul></ul><p>+10! Great. Please integrate it into trunk</p> Redmine - Feature #1536: Using libsvnhttps://www.redmine.org/issues/1536?journal_id=98782009-06-23T20:54:53ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>Looks great! I just found a small bug in the diff view, it seems you need to swap identifier_to and identifier_from in SubversionLibsvnAdapter#diff.</p>
<p>But I think we shouldn't introduce a new Repository class (eg. SubversionLibsvn) since this is not a new kind of repository, but just an other way to read a Subversion repository. I think your patch could be released as a plugin that overides the default adapter. Existing repositories will use this new adapter as well.</p> Redmine - Feature #1536: Using libsvnhttps://www.redmine.org/issues/1536?journal_id=103772009-07-28T12:06:26ZPierre Paysant-Le Roux
<ul></ul><p>Jean-Philippe Lang wrote:</p>
<blockquote>
<p>I think your patch could be released as a plugin that overides the default adapter. Existing repositories will use this new adapter as well.</p>
</blockquote>
<p>Because plugins are loaded first, it's hard to override methods with a plugin. Do you have an idea on how to implement that ?</p> Redmine - Feature #1536: Using libsvnhttps://www.redmine.org/issues/1536?journal_id=104222009-07-31T00:12:00ZEric Davis
<ul></ul><p>Pierre Paysant-Le Roux wrote:</p>
<blockquote>
<p>Because plugins are loaded first, it's hard to override methods with a plugin. Do you have an idea on how to implement that ?</p>
</blockquote>
<p>You can have the plugin load the required files it needs to override. For example:</p>
<pre><code class="ruby syntaxhl"><span class="n">require_dependency</span> <span class="s1">'subversion_adapter'</span> <span class="c1"># Might need to use redmine/scm/adapaters/subversion_adapter</span>
<span class="k">module</span> <span class="nn">Redmine</span>
<span class="k">module</span> <span class="nn">Scm</span>
<span class="k">module</span> <span class="nn">Adapters</span>
<span class="k">class</span> <span class="nc">SubversionAdapter</span> <span class="o"><</span> <span class="no">AbstractAdapter</span>
<span class="c1"># Override code here.</span>
<span class="k">end</span>
<span class="k">end</span>
<span class="k">end</span>
<span class="k">end</span>
</code></pre>
<p>You can also use the module include pattern if you don't want to reopen the <code>SubversionAdapter</code> class.</p> Redmine - Feature #1536: Using libsvnhttps://www.redmine.org/issues/1536?journal_id=105792009-08-17T15:56:39ZPierre Paysant-Le Roux
<ul></ul><p>I created a plugin. It is available on github :<br /><a class="external" href="http://github.com/pplr/redmine-libsvn/tree/master">http://github.com/pplr/redmine-libsvn/tree/master</a></p>
<p>Suggestions and beta testers are welcome !</p> Redmine - Feature #1536: Using libsvnhttps://www.redmine.org/issues/1536?journal_id=131302009-12-20T11:28:04ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>I've just tested your plugin and found that <code>#properties</code> uses infinite depth, which is wrong and horribly slow (13s on Redmine repository root).<br />Here is a fix:</p>
<pre>
--- subversion_libsvn_adapter.rb Sun Dec 20 12:31:16 2009
+++ subversion_libsvn_adapter_fix.rb Sun Dec 20 12:28:55 2009
@@ -100,7 +100,7 @@
def properties(path, identifier=nil)
identifier = (identifier and identifier.to_i > 0) ? identifier.to_i : "HE
AD"
properties = {}
- ctx.proplist(target(path), identifier) do |path, prop_hash|
+ ctx.proplist(target(path), identifier, nil, false) do |path, prop_hash|
properties.merge!(prop_hash)
end
properties
</pre>
<p>Apart from that, it's really faster than the current implementation.</p> Redmine - Feature #1536: Using libsvnhttps://www.redmine.org/issues/1536?journal_id=135822010-01-14T18:25:46ZPierre Paysant-Le Roux
<ul></ul><p>Thanks for feedback. I pushed a bugfix for #properties.</p> Redmine - Feature #1536: Using libsvnhttps://www.redmine.org/issues/1536?journal_id=135832010-01-14T18:26:02ZPierre Paysant-Le Roux
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li></ul> Redmine - Feature #1536: Using libsvnhttps://www.redmine.org/issues/1536?journal_id=329272011-10-18T20:13:22ZMischa The Evil
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>New</i></li></ul><p>Resolved is used for merging-purposes.</p> Redmine - Feature #1536: Using libsvnhttps://www.redmine.org/issues/1536?journal_id=329282011-10-18T20:15:40ZMischa The Evil
<ul><li><strong>Target version</strong> set to <i>Unplanned backlogs</i></li></ul> Redmine - Feature #1536: Using libsvnhttps://www.redmine.org/issues/1536?journal_id=355312012-01-24T19:48:39ZRafi Greenberg
<ul></ul><p>I would like to see libsvn work for the stable/trunk versions of Redmine. Somewhere along the line the pplr plugin <a class="external" href="http://github.com/pplr/redmine-libsvn/tree/master">http://github.com/pplr/redmine-libsvn/tree/master</a> broke. <br />I wish this would be part of the official build! Anyone else agree?</p> Redmine - Feature #1536: Using libsvnhttps://www.redmine.org/issues/1536?journal_id=378142012-05-02T01:58:08ZBruno Medeiros
<ul></ul><p>I agree.</p> Redmine - Feature #1536: Using libsvnhttps://www.redmine.org/issues/1536?journal_id=388052012-06-07T17:09:51ZRafi Greenberg
<ul></ul><p>Anyone interested in porting this to Redmine 2.0.x?</p> Redmine - Feature #1536: Using libsvnhttps://www.redmine.org/issues/1536?journal_id=395702012-07-11T07:10:28ZKi Won Kim
<ul></ul><p>+1</p> Redmine - Feature #1536: Using libsvnhttps://www.redmine.org/issues/1536?journal_id=432062012-12-04T18:32:39ZWilliam Baum
<ul></ul><p>Jean-Philippe Lang wrote:</p>
<blockquote>
<p>The main reason why it's not used in Redmine is that there's no binaries available for windows.</p>
</blockquote>
<p>I've actually been running the libsvn plugin on Windows for years with win32svn binaries available in the win32svn project on sourceforge: <a class="external" href="http://sourceforge.net/projects/win32svn/">http://sourceforge.net/projects/win32svn/</a> And yes, it's dramatically faster.</p>
<p>So if the lack of Windows binaries was the primary obstacle, can we get libsvn into the core now?</p> Redmine - Feature #1536: Using libsvnhttps://www.redmine.org/issues/1536?journal_id=556822014-04-03T10:39:27ZSen Haerens
<ul></ul><p>I updated the init.rb for Redmine 2.x and the plugin seems to work fine with Redmine 2.5.1.</p>
<p><a class="external" href="https://github.com/SenH/redmine-libsvn">https://github.com/SenH/redmine-libsvn</a></p>