https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292007-05-23T11:47:00ZRedmineRedmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=7982007-05-23T11:47:00ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>I'm currently working on Mercurial support. It's almost finished<br />and should be available soon.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=7972007-06-12T14:15:00ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>Basic support for CVS and Mercurial SCMs is added in rev 559.</p>
<p>Browsing, changesets fetching and diff viewing are implemented.<br />Only tested with local repositories.<br />Thanks to Ralph Vater for CVS specific code.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=7962007-06-24T13:32:00ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>Darcs support added in rev 573.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=7952007-07-13T22:49:00ZPatrick Aljord
<ul></ul><p>please add support for git too.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=7942007-10-10T12:28:00ZÉtienne Savard
<ul></ul><p>4) Perforce</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=7932007-12-03T17:14:00ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>Bazaar adpater added in <a class="changeset" title="Added Bazaar adapter. Fixed 'quick jump to a revision' form on the revisions list." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/950">r950</a></p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=7922007-12-15T06:01:00Zchris mcharg
<ul></ul><p>+1 for git</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=7912008-01-06T04:00:00ZWill Leinweber
<ul></ul><p>I would also really like to see git.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=14072008-02-21T10:21:13ZThomas Lecavelier
<ul></ul><p>Git support is experimental, as in <a class="issue tracker-3 status-5 priority-4 priority-default closed" title="Patch: Git support for r1104 (Closed)" href="https://www.redmine.org/issues/259">#259</a>.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=22952008-04-12T21:12:50ZKarim Trott
<ul></ul><p>I would like to see perforce support as well (of course its not open source..)</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=39232008-07-15T22:18:59ZWassim Hafez
<ul></ul><p>Perforce support is a key factor being considered by our organization while evaluating collaboration tools, are there any plans for supporting Perforce?</p>
<p>Also, in general, what's involved in developing integration between redmine and SCM/third-party tools?</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=39282008-07-16T09:51:15ZThomas Lecavelier
<ul></ul><p>Wassim Hafez wrote:</p>
<blockquote>
<p>Also, in general, what's involved in developing integration between redmine and SCM/third-party tools?</p>
</blockquote>
Two solution to get Redmine talking with a non-free (as free beer) SCM:
<ol>
<li>people with legal licence write and maintain the adapter and their tests (quite easy)</li>
<li>people offer a legal licence to jplang or an contributor, so he can write and maintain the adapter</li>
</ol>
<p>So, you can contact your lobby :)</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=39292008-07-16T12:32:28ZOllivier Robert
<ul></ul><p>Speaking for perforce which I used for 5 years before moving to Arch then Hg, anyone can obtain a free license for free software usage. The main problem I had during the last two years is that the license is granted for one year and can be renewed but the process got more complicated (I had to send the GPL & BSD licenses by fax!) so I finally gave up. But it is doable.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=46132008-09-03T21:02:02ZVianney Lecroart
<ul></ul><p>I have a +2 for perforce her. 2 game companies wanted to use redmine, but without perforce, it s a no go for them.</p>
<blockquote>
Two solution to get Redmine talking with a non-free (as free beer) SCM:
<ol>
<li>people with legal licence write and maintain the adapter and their tests (quite easy)</li>
<li>people offer a legal licence to jplang or an contributor, so he can write and maintain the adapter</li>
</ol>
</blockquote>
<p>jplang or anybody can play with perforce for free. Of course, it's not opensource and it's evil but lot of companies use it, google, microsoft...</p>
<p>For the licence:</p>
<p>"Perforce Licensing<br />You can download and use any Perforce software product free. All Perforce software you download is fully functional, with the exception of the Perforce Server, which allows only two users and five client workspaces when used without a license."</p>
<p>"Free Licensing for Open Source Development<br />Organizations developing software that is licensed or otherwise distributed exclusively under an Open Source license may be eligible to obtain Perforce licenses gratis. This includes upgrades but not support."</p>
<p>So I think it's not a problem to have a perforce licence to test and maintain perforce adapter.</p>
<p>If I knew more ror and p4, i could do it, but it's not the case :'(</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=46502008-09-07T18:15:17ZKarim Trott
<ul></ul><p>As Perforce and P4Ruby has been released on rubyforge, does this raise the probalitiy for Perforce SCM support?</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=59062008-12-03T17:22:48ZKarl Pietrzak
<ul></ul><p>Karim Trott wrote:</p>
<blockquote>
<p>As Perforce and P4Ruby has been released on rubyforge, does this raise the probalitiy for Perforce SCM support?</p>
</blockquote>
<p>I think I'd be interested in writing Perforce support, as I have a running installation and we're exploring using Redmine.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=59242008-12-04T20:31:26ZKarim Trott
<ul></ul><p>Karl Pietrzak wrote:</p>
<blockquote>
<p>Karim Trott wrote:</p>
<blockquote>
<p>As Perforce and P4Ruby has been released on rubyforge, does this raise the probalitiy for Perforce SCM support?</p>
</blockquote>
<p>I think I'd be interested in writing Perforce support, as I have a running installation and we're exploring using Redmine.</p>
</blockquote>
<p>This sounds good Karl, looking forward on this adapter, tell me when you need additional help.. I'll try to support when I can..</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=61612008-12-16T05:27:57ZJeff Rorison
<ul><li><strong>File</strong> <a href="/attachments/1290">redmine-scm-p4-0.8.0_RC1.zip</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/1290/redmine-scm-p4-0.8.0_RC1.zip">redmine-scm-p4-0.8.0_RC1.zip</a> added</li></ul><p>So, I ran into this by accident. Guess I should have been more diligent in searching for it.</p>
<p>I am a Ruby/Rails/Redmine greenie. I have built a Perforce SCM provider for Redmine. I am providing this as a zip as the quickest way to help out. I have never used the svn/cvs patch methods and am loathe to hold or mess it up.</p>
<p>I used the 8.0_RC1 version to base off of.<br />Not a whole lot of requirements P4Ruby is really it.</p>
<p>Mileage may vary for specific cases, but for the things I needed it worked just fine.<br />I am sure there a million ways to make this better, and hopefully I fit it into the model well enough.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=65332009-01-08T09:47:38ZKarim Trott
<ul></ul><p>Hi Jeff,</p>
<p>have you checked compatibility with the release 0.8.0 of redmine?</p>
<p>regards,</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=65352009-01-08T11:58:49ZKarim Trott
<ul></ul><p>I did check myself, there are no further changes, so you can take this for release 0.8.0 as well...</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=66562009-01-13T06:28:28ZJeff Rorison
<ul><li><strong>File</strong> <a href="/attachments/1396">perforce_scm_adapter.diff</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/1396/perforce_scm_adapter.diff">perforce_scm_adapter.diff</a> added</li></ul><p>Ok, hopefully created a diff for the Perforce adapter that follows the project standards.<br />Created against 0.8.0 (stable). No changes at this time.</p>
<p>One quick note on the depot path. It should be entered <strong>without</strong> the <br />everything ('/...') file spec notation.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=68042009-01-21T18:11:57ZKarl Pietrzak
<ul></ul><p>Karim Trott wrote:</p>
<blockquote>
<p>Karl Pietrzak wrote:</p>
<blockquote>
<p>Karim Trott wrote:</p>
<blockquote>
<p>As Perforce and P4Ruby has been released on rubyforge, does this raise the probalitiy for Perforce SCM support?</p>
</blockquote>
<p>I think I'd be interested in writing Perforce support, as I have a running installation and we're exploring using Redmine.</p>
</blockquote>
<p>This sounds good Karl, looking forward on this adapter, tell me when you need additional help.. I'll try to support when I can..</p>
</blockquote>
<p>Looks like Jeff Rorison beat us to it :) I'm not gonna give his patch a try real soon. Thanks so much, Jeff!</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=69642009-01-28T16:27:34ZSven Engelhardt
<ul></ul><p>the perforce patch works for me with an external repository except for the files all have 0 byte size (and wont view nor download)</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=69722009-01-28T20:25:18ZKarl Pietrzak
<ul></ul><p>Sven Engelhardt wrote:</p>
<blockquote>
<p>the perforce patch works for me with an external repository except for the files all have 0 byte size (and wont view nor download)</p>
</blockquote>
<p>Very interesting, Sven... I haven't given it a try yet, but luckily I don't think I have any 0 byte files in our p4 repo.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=69732009-01-28T21:23:23ZKarim Trott
<ul></ul><p>hmm,</p>
<p>a confirugation problem? may be the usage of the different SCMs should be bette documented.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=70172009-01-30T22:57:37ZJeff Rorison
<ul></ul><p>Not sure about the 0 byte files. Never saw that even when messing the whole thing up real bad. ;-)</p>
<p>I did forget something on view & download (same thing really), when doing some different user scenario tests.</p>
<p>It's a small change here on the diff:<br /> redmine/lib/redmine/scm/adapters/perforce_adapter.rb#314<br /> - #p4.user = <a class="user active" href="https://www.redmine.org/users/16261">kurumi kurogi</a><br /> + p4.user = <a class="user active" href="https://www.redmine.org/users/16261">kurumi kurogi</a></p>
The user scenarios I was testing were:
<ul>
<li>User at the repo level (current implementation)</li>
<li>or User defined by Redmine login (sorta like <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: LDAP - authenticate as user (Closed)" href="https://www.redmine.org/issues/1913">#1913</a>, pwd is an issue in my ldap case)</li>
<li>or Custom fields on the user to define P4 user/pwd (need some learning on my part here)</li>
</ul>
<p>I am cramped for time to work on this for a couple of weeks, apologies for no updated diff.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=78212009-03-05T09:14:09ZAndrew Levshoff
<ul></ul><p>Guys, is there any plans about including provided by <em>Jeff Rorison</em> patch for supporting <strong>Perforce</strong> SCM into official Redmine source? If "yes", could you please update <strong>Target version</strong> of this issue (and may be <strong>Category</strong> to "SCM")? If "no"... its a pity, but looks like this issue could be closed, because support for all other requested SCM already implemented (as far as I can see here in comments).</p>
<p>Anyway despite the fact that supporting Perforce SCM out of the box could be <strong>REALLY</strong> awesome, thanks for supporting so many other SCM!</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=78332009-03-05T22:17:49ZEric Davis
<ul><li><strong>Category</strong> set to <i>SCM</i></li></ul><p>Andrew Levshoff wrote:</p>
<blockquote>
<p>Guys, is there any plans about including provided by <em>Jeff Rorison</em> patch for supporting <strong>Perforce</strong> SCM into official Redmine source?</p>
</blockquote>
<p>The patch is missing tests so it's not ready for inclusion into the core. If someone could update the patch with some unit tests, we could see about including it.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=81332009-03-18T21:52:25ZWade Brainerd
<ul><li><strong>File</strong> <a href="/attachments/1713">perforce_adapter.rb</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/1713/perforce_adapter.rb">perforce_adapter.rb</a> added</li></ul><p>I fixed a bunch of bugs in this plugin for our local use. All the changes are in perforce_adapter.rb so I'm just attaching that file.</p>
<ul>
<li>Fix diff with a specific revision and no path. Required initiating a connection before calling 'p4 changes', p4 variable was undefined.</li>
<li>Fix diff with a specific revision and a path. Was comparing files against #head, now compares against previous revision.</li>
<li>Fix 'cat'. Login name was commented out as per earlier post.</li>
<li>Clean up and fix bugs in entry_name, relative_path and fix_url.</li>
</ul>
<p>With these changes, everything appears to work fine with my depot.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=86532009-04-16T04:15:54ZRyan Mensching
<ul></ul><p>I have everything working including the new adapter attached above. I have one small issue at the moment attaching to perforce servers that need passwords. Any one else tried it with passwords and have issues? Is there a way to debug the password field it is trying to pass to p4?</p>
<p>As was mentioned above perforce support is crucial for game developers so having this fully functional is a must.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=86602009-04-16T11:32:41ZAndrew Levshoff
<ul></ul><p>Wade Brainerd wrote:</p>
<blockquote>
<p>I fixed a bunch of bugs in this plugin for our local use. All the changes are in perforce_adapter.rb so I'm just attaching that file.</p>
<ul>
<li>Fix diff with a specific revision and no path. Required initiating a connection before calling 'p4 changes', p4 variable was undefined.</li>
<li>Fix diff with a specific revision and a path. Was comparing files against #head, now compares against previous revision.</li>
<li>Fix 'cat'. Login name was commented out as per earlier post.</li>
<li>Clean up and fix bugs in entry_name, relative_path and fix_url.</li>
</ul>
<p>With these changes, everything appears to work fine with my depot.</p>
</blockquote>
<p><em>Wade Brainerd</em> and <em>Jeff Rorison</em>, guys, if you are so gentle to write code for this awesome Perforce SCM provider, would you be so kind to add some tests to your code and make us, mortal beings, happy to use that provider in official release? :)</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=86622009-04-16T13:18:48ZGeorge Gensure
<ul></ul><p>Unified diff output from the original perforce_adapter.rb was coming down without any line breaks. Had to add a new line to each push into the diff array:</p>
<pre>
~294: # look for file identifier..if found replace date/time with change#
~295: diff << (line.gsub(/\d{4}\/\d{2}\/\d{2}\s+\d{2}:\d{2}:\d{2}/, "#{change}") + "\n")
</pre> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=86682009-04-16T17:02:54ZRyan Mensching
<ul></ul><p>Ryan Mensching wrote:</p>
<blockquote>
<p>I have everything working including the new adapter attached above. I have one small issue at the moment attaching to perforce servers that need passwords. Any one else tried it with passwords and have issues? Is there a way to debug the password field it is trying to pass to p4?</p>
<p>As was mentioned above perforce support is crucial for game developers so having this fully functional is a must.</p>
</blockquote>
<p>The problem seems to be only with the p4 servers using our external AD authentication trigger. Standard p4 passwords or no password works fine. Will have to spend some time to figure out what is happening with the p4api/p4ruby on this. The loading of the changelist revs is pretty slow for servers that have 1000s of changes so some tweaking of the commands is needed I think.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=87252009-04-20T14:31:27ZGeorge Gensure
<ul></ul><p>Requests for the Perforce scm_info lastrev are sorely disappointed when a branch is specified that does not exist. (Caused a significant problem for me when using Repository.fetch_changesets on a regular basis). I added this after line 48 in lib/redmine/scm/adapters/perforce_adapter.rb to compensate:</p>
<code>
<pre>
return Info.new({:root_url => url, :lastrev => Revision.new({:identifier => -1, :time => nil, :author => nil})}) if h.nil?
</pre><br /></code> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=87272009-04-20T14:38:49ZGeorge Gensure
<ul></ul><p>Ryan Mensching wrote:</p>
<blockquote>
<p>The problem seems to be only with the p4 servers using our external AD authentication trigger. Standard p4 passwords or no password works fine. Will have to spend some time to figure out what is happening with the p4api/p4ruby on this. The loading of the changelist revs is pretty slow for servers that have 1000s of changes so some tweaking of the commands is needed I think.</p>
</blockquote>
<p>Perforce being the exception rather than the rule here for returning large result sets (like p4 changes //...), I've gone ahead and modified my copy of the app/models/repository/perforce.rb to skip the '200 at a time loading' behavior, and just import a project's /... all in one p4.run_changes. Its quite speedy, and I highly recommend it over the incremental loading.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=87332009-04-20T20:01:39ZRyan Mensching
<ul></ul><p>George Gensure wrote:</p>
<blockquote>
<p>Requests for the Perforce scm_info lastrev are sorely disappointed when a branch is specified that does not exist. (Caused a significant problem for me when using Repository.fetch_changesets on a regular basis). I added this after line 48 in lib/redmine/scm/adapters/perforce_adapter.rb to compensate:</p>
<code>
> [...]
> </code>
</blockquote>
<p>Interesting, can you give diff view of your change?</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=87342009-04-20T20:03:03ZRyan Mensching
<ul></ul><p>George Gensure wrote:</p>
<blockquote>
<p>Ryan Mensching wrote:</p>
<blockquote>
<p>The problem seems to be only with the p4 servers using our external AD authentication trigger. Standard p4 passwords or no password works fine. Will have to spend some time to figure out what is happening with the p4api/p4ruby on this. The loading of the changelist revs is pretty slow for servers that have 1000s of changes so some tweaking of the commands is needed I think.</p>
</blockquote>
<p>Perforce being the exception rather than the rule here for returning large result sets (like p4 changes //...), I've gone ahead and modified my copy of the app/models/repository/perforce.rb to skip the '200 at a time loading' behavior, and just import a project's /... all in one p4.run_changes. Its quite speedy, and I highly recommend it over the incremental loading.</p>
</blockquote>
<p>Did you just remove the -m max flag from all the p4 changes commands?</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=87352009-04-20T20:04:58ZRyan Mensching
<ul></ul><p>Ryan Mensching wrote:</p>
<blockquote>
<p>The problem seems to be only with the p4 servers using our external AD authentication trigger. Standard p4 passwords or no password works fine. Will have to spend some time to figure out what is happening with the p4api/p4ruby on this. The loading of the changelist revs is pretty slow for servers that have 1000s of changes so some tweaking of the commands is needed I think.</p>
</blockquote>
<p>I fixed this issue by adding a p4.run_login after every p4.connect in lib/redmine/scm/adapters/perforce_adapter.rb.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=87362009-04-20T20:20:35ZGeorge Gensure
<ul></ul><p>Ryan Mensching wrote:</p>
<blockquote>
<p>Interesting, can you give diff view of your change?</p>
</blockquote>
<p>Diffed against the latest version attached to this issue:</p>
<pre>
--- perforce_adapter.rb.orig 2009-04-20 16:24:15.949960000 -0400
+++ perforce_adapter.rb 2009-04-20 16:26:10.950650000 -0400
@@ -46,6 +46,7 @@
# get latest change for the depot spec
h = p4.run_changes("-m 1 -s submitted", "#{path}...").shift
+ return Info.new({:root_url => url, :lastrev => Revision.new({:identifier => -1, :time => nil, :author => nil})}) if h.nil?
change = P4Change.new( h )
info = Info.new({:root_url => url,
</pre> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=87372009-04-20T20:29:48ZGeorge Gensure
<ul><li><strong>File</strong> <a href="/attachments/1913">perforce_bulk_load.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/1913/perforce_bulk_load.patch">perforce_bulk_load.patch</a> added</li></ul><p>Ryan Mensching wrote:</p>
<blockquote>
<p>Did you just remove the -m max flag from all the p4 changes commands?</p>
</blockquote>
<p>Nope. Modified the repository/perforce.rb loader. Diff is attached (hope this doesn't clutter up this issue too much).</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=95732009-06-04T12:45:30ZAlex Kates
<ul></ul><p>I installed all the files listed above. My Redmine GUI is updated with Perforce functionality. However, the Repository page is a blank table. The headings (Name, Size, Revision, Age, Author, Comment) are listed across the top, but it seem that the link to my depot is non-existant. I am sure I entered the settings correctly. Is this issue documented with anyone else? Can any provide input to this?</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=96882009-06-10T15:59:52ZAlex Kates
<ul></ul><p>Disregard my last post. Everything is working as intended.</p>
<p>I was getting the following error while opening specific depot files:<br /><em>The entry or revision was not found in the repository.</em></p>
<p>The redmine/log/<environment>.log file will show the following error:<br />Processing RepositoriesController#browse (for #### at 2009-06-09 13:38:32) [GET]<br />Session ID:##########################<br />Parameters: {"action"=>"browse", "id"=>"pit", "controller"=>"repositories", "path"=>["VSPluginSolution"]}<br />Error creating entries: undefined method `filesize' for #<P4Revision:0xb6a5f788>_</p>
<strong><ins>To fix this:</ins></strong>
<ol>
<li>Open redmine/root/app/controllers/repositories_controller.rb</li>
<li>Find "filesize" </li>
<li>Delete it from the hash</li>
</ol>
<p>The method "filesize" does not exist, and is only used once inside this hash. Removing this fixed my repository view.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=97632009-06-14T10:38:17ZRoman Starkov
<ul><li><strong>File</strong> <a href="/attachments/2189">redmine-perforce-v2-r2786.zip</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/2189/redmine-perforce-v2-r2786.zip">redmine-perforce-v2-r2786.zip</a> added</li></ul><p>I've fixed a few bugs in the Perforce plugin:</p>
<ul>
<li>From/to revisions were swapped, causing incorrect sets of changes to be retrieved</li>
<li>The p4 changes command attempted to guess the maximum number of revisions to get. Replaced with a command that directly retrieves only the required revisions.</li>
<li>Old/new versions were swapped in the full changelist diff view.</li>
<li>Added logger.debug to verify operation</li>
</ul>
<p>Looking at the log output, the initial retrieval of all the changelists can be further sped up, however I have no plans to work on this at the moment. The zip file contains a diff against <a class="changeset" title="Fixes drop-down list selected value (#3472)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/2786">r2786</a>, another one against the earlier version of this plugin (all the other diffs taken together), and all the changed files. These files also work (for me) in 0.8 stable.</p>
<p>Enjoy!</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=131762009-12-22T09:10:26ZRobert Schneider
<ul></ul><p>What is the current state about Perforce integration? I'm just evaluating Redmine and I'd like to know about this. Is redmine-perforce-v2-r2786.zip the final solution? If so, what are the steps to get this installed? If not, will there be any development regarding Perforce?</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=131812009-12-22T10:19:57ZRoman Starkov
<ul></ul><p>To install, make sure you have a backup, and then extract all the files from the "files" directory inside redmine-perforce-v2-r2786.zip directly into your installation.</p>
<p>I suspect there isn't much interest in Perforce support because Redmine is targeted at open-source projects, which never use Perforce.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=131942009-12-23T08:42:42ZJihyuk Im
<ul></ul><p>I just installed redmine-perforce-v2-r2786.zip with Bitnami Redmine Stack 0.8.4.<br />this is my solution to install this.</p>
<ol>
<li>install p4ruby
<ul>
<li>first time, i omitted this. but i got simple error(http 401 error and no warning about p4 module)</li>
<li>because i should install that in local intranet, it took some time to get it properly. </li>
<li>(finally i installed p4ruby on another machine and copied installed p4.rb p4.so directly)</li>
</ul>
</li>
<li>copy files in 'redmine-perforce-v2-r2786.zip' to appropriate location</li>
<li>rake db:migrate_plugins RAILS_ENV=production</li>
<li>restart bitnami stack</li>
<li>it works!</li>
</ol>
<p>thanks</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=137032010-01-20T08:17:45ZRobert Schneider
<ul></ul><p>Now it runs on my Windows machine.</p>
<p>Maybe this helps someone: p4ruby can be easily installed with 'gem install p4ruby'. However, I've got a problem that I have solved with a double click on the p4ruby18.exe. I guess 'gem install p4ruby' must be called with administrator rights, what I haven't done and which was the problem that I have encountered.</p>
<p>As it seems the Perforce integration works well (with the exception that Jobs are not supported). So why not include it into the Redmine code base?</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=139232010-02-01T09:34:18ZRobert Schneider
<ul></ul><p>Will the patch work with 0.9.1 as well?</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=140812010-02-07T21:04:23ZRobert Schneider
<ul></ul><p>I have sent Perforce a feature request for this. They logged this. But this could take a while until they release anything.</p>
<p>Would be interesting to know if you (Redmine) accept any development from them. I mean, code that would become part of Redmine. Or would you prefer a plug-in? Or something different?</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=140822010-02-07T21:22:35ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li></ul><p>To be honest, they are a very few chances that Perforce support gets added to the core as I have no way to maintain it.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=141252010-02-09T02:22:34ZEric Davis
<ul></ul><p>Jean-Philippe Lang wrote:</p>
<blockquote>
<p>To be honest, they are a very few chances that Perforce support gets added to the core as I have no way to maintain it.</p>
</blockquote>
<p>What about if we change how the SCMs work and let Perforce or anyone else create a plugin to add support? The current SCM adapters follow a pretty standard internal API.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=141362010-02-09T08:15:44ZRobert Schneider
<ul></ul><p>Eric Davis wrote:</p>
<blockquote>
<p>What about if we change how the SCMs work and let Perforce or anyone else create a plugin to add support? The current SCM adapters follow a pretty standard internal API.</p>
</blockquote>
<p>Yes, that's what I thought as well. Does the architecture allow transforming the existing integrations into plug-ins? I guess this is the right place for such things.</p>
<p>I hope you consider this. I think it would be a good idea!</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=160902010-04-22T15:30:53ZMichael Vance
<ul></ul><p>I have a Perforce module we've been using for some time, it includes a unit test suite that is self bootstrapping from a serialized depot and some other things. It was built from the ground up around the svn module's model of using the command line but I'm rewriting it now to use the p4ruby module. I'm hoping to find the time to package it up in the near future. It runs against head.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=162402010-04-28T14:36:46ZMichael Vance
<ul></ul><p>Rewrite done.</p>
<p><a class="external" href="http://www.infinite-monkeys.org/michael/redmine/">http://www.infinite-monkeys.org/michael/redmine/</a></p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=188532010-07-30T15:28:31ZMartin Lillepuu
<ul><li><strong>Status</strong> changed from <i>Closed</i> to <i>Reopened</i></li></ul><p>Michael Vance wrote:</p>
<blockquote>
<p>Rewrite done.</p>
<p><a class="external" href="http://www.infinite-monkeys.org/michael/redmine/">http://www.infinite-monkeys.org/michael/redmine/</a></p>
</blockquote>
<p>works fine with latest perforce (testing with 2-user free version) and redmine 1.0.0<br />only snag I hit so far was 500 error when I entered depot name incorrectly in repository config and then tried to browse repository</p>
<p>I wish perforce support would be included in next redmine version so there would be no need for separate patching.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=262012011-03-10T20:25:06ZMatthew Grund
<ul></ul><p>I'm a Redmine newbie - I'm having difficulty installing this plugin.</p>
<p>The closest I've found to install directions is <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: List Issues export to pdf error (Closed)" href="https://www.redmine.org/issues/46">#46</a> above:</p>
<p>I thought I'd add some commentary, in the hope that someone can clarify for us noobs.</p>
<blockquote>
<p>I just installed redmine-perforce-v2-r2786.zip with Bitnami Redmine Stack 0.8.4.<br />this is my solution to install this.</p>
<p>1. install p4ruby</p>
</blockquote>
<p>This was not simple. There's a p4ruby installer that gets 2 packages from the perforce ftp site. In my case, I needed to fetch those files by hand...</p>
<p>"ftp://ftp.perforce.com/perforce/r10.2/bin.linux26x86/p4api.tgz" <br />"ftp://ftp.perforce.com/perforce/r10.2/bin.tools/p4ruby.tgz"</p>
<p>Drop them into "p4ruby/work/distfiles/", then cd to "p4ruby/" and then</p>
<p>"sudo ruby ./install.rb --local"</p>
<blockquote>
<p>2. copy files in 'redmine-perforce-v2-r2786.zip' to appropriate location</p>
</blockquote>
<p>this is not at all clear to me. As near as I can guess, "appropriate location" is<br />"/var/www/redmine/vendor/perforce" which I had to create first. Is this right?</p>
<blockquote>
<p>3. rake db:migrate_plugins RAILS_ENV=production</p>
</blockquote>
<p>How does one know if this actually loaded the perforce plugin?</p>
<blockquote>
<p>4. restart bitnami stack</p>
<p>it works!</p>
</blockquote>
<p>How does one know if it's working? I can't see any plugins from the admin/plugins page.</p>
<p>In any case - I don't think I have installed it correctly yet, because I don't see Perforce as an SCM choice.</p>
<p>Any help is appreciated.</p>
<p>-Matt</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=262122011-03-11T07:15:40ZRobert Schneider
<ul></ul><p><a class="user active" href="https://www.redmine.org/users/31680">Matthew Zhang</a> Grund:</p>
<p>You can see that I've told Perforce about Redmine (1 year ago posting).</p>
<p>Perforce offers now an own tool that realizes the binding. I haven't tried it and cannot tell you how smooth it works. But perhaps you would like to try it and tell us a bit about it? Have a look: <a class="external" href="http://www.perforce.com/perforce/products/p4dtg.html">http://www.perforce.com/perforce/products/p4dtg.html</a></p>
<p>I have used this tool with Bugzilla already and it worked so far. I'm not sure how much this tool contains, but I'm afraid that there is only the mapping between Redmine issues and Perforce jobs and that it has nothing to do with browsing the repository and such things. This might be complicated since there must be also further things considered, such as user access policies.</p>
<p>But give it a try!</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=266042011-03-18T13:55:52ZMatthew Grund
<ul></ul><p>Robert Schneider wrote:</p>
<blockquote>
<p><a class="user active" href="https://www.redmine.org/users/31680">Matthew Zhang</a> Grund:</p>
<p>You can see that I've told Perforce about Redmine (1 year ago posting).</p>
<p>Perforce offers now an own tool that realizes the binding. I haven't tried it and cannot tell you how smooth it works. But perhaps you would like to try it and tell us a bit about it? Have a look: <a class="external" href="http://www.perforce.com/perforce/products/p4dtg.html">http://www.perforce.com/perforce/products/p4dtg.html</a></p>
<p>I have used this tool with Bugzilla already and it worked so far. I'm not sure how much this tool contains, but I'm afraid that there is only the mapping between Redmine issues and Perforce jobs and that it has nothing to do with browsing the repository and such things. This might be complicated since there must be also further things considered, such as user access policies.</p>
<p>But give it a try!</p>
</blockquote>
<p>Thanks for the tip. I just unpacked p4dtg. From the notes it looks like I'd need to add a dedicated user for the gateway. That's not an acceptable cost for me.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=266162011-03-18T21:02:37ZMatthew Grund
<ul></ul><p>Installation update:</p>
<p>I was attempting to patch Redmine <a class="changeset" title="scm: mercurial: replace urllib.unquote to urllib.unquote_plus in helper (#4455)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/4934">r4934</a> with the r2786.zip file above. <br />I should have never expected this to work.</p>
<p>I have successfully merged the code from the supplied zip file into my tree, by hand, and now have a working Perforce capable Redmine!</p>
<p>Many thanks to all who helped.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=282002011-04-20T20:42:38ZLiz Lam
<ul></ul><blockquote>
<p>Thanks for the tip. I just unpacked p4dtg. From the notes it looks like I'd need to add a dedicated user for the gateway. That's not an acceptable cost for me.</p>
</blockquote>
<p><a class="user active" href="https://www.redmine.org/users/31680">Matthew Zhang</a> Grund:<br />Just an FYI, you can request a background user from Perforce which is free for any licensed server.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=294852011-06-02T13:50:59Zzacky azoulay
<ul></ul><p>Hi,</p>
<p>Is there an update for r2786.zip (p4 repository) to work with redmine 1.2.0</p>
<p>I try to merge <a class="changeset" title="Fixes drop-down list selected value (#3472)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/2786">r2786</a> with redmine 1.2.0 and stack in the project repository setting ( the create is disabled after fill all the requerment)</p>
<p>Regards Zacky</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=309792011-07-22T06:38:36ZMarkus Schlichting
<ul></ul><p>Hi, <br />are there any news on Perforce support for redmine?</p>
<p>cheers<br /> Markus</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=337812011-11-15T18:28:33ZGurvan Le Dromaguet
<ul></ul><p>I had a try today with the patch <a class="changeset" title="Fixes drop-down list selected value (#3472)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/2786">r2786</a> and redmine 1.2.1<br />No luck and I don't really understand the mechanism.<br />it says :<br />"Scm command is not available. Please check settings on the administration panel."</p>
<p>I defined a confiugaration file with:<br />grep perforce config/configuration.yml<br /> scm_perforce_command: "/opt/apps/perforce/p4-2011.1/p4" <br />still the same.<br />Are there redmine changes that would get this patch to no more working ?<br />I don"t find anything useful in the log either.<br />Did anyone (Zacky?) installed the patch with redmine 1.2 ?</p>
<p>Regards</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=339592011-11-21T14:24:52ZGurvan Le Dromaguet
<ul></ul><p>Gurvan Le Dromaguet wrote:</p>
<blockquote>
<p>I had a try today with the patch <a class="changeset" title="Fixes drop-down list selected value (#3472)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/2786">r2786</a> and redmine 1.2.1<br />...</p>
</blockquote>
<p>ok, this patch is really too old and I as knwon almost nothing of ruby/ruby on rails dev, I am loosing my time trying to have it working.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=433662012-12-12T17:59:54ZTerry Suereth
<ul><li><strong>File</strong> <a href="/attachments/8599">redmine_perforce_patch.diff</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/8599/redmine_perforce_patch.diff">redmine_perforce_patch.diff</a> added</li><li><strong>File</strong> <a href="/attachments/8600">app-models-repository-perforce.rb</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/8600/app-models-repository-perforce.rb">app-models-repository-perforce.rb</a> added</li><li><strong>File</strong> <a href="/attachments/8601">lib-redmine-scm-adapters-perforce_adapter.rb</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/8601/lib-redmine-scm-adapters-perforce_adapter.rb">lib-redmine-scm-adapters-perforce_adapter.rb</a> added</li></ul><p>In case anyone is still interested in this -- I adapted Michael Vance's first patches (circa 2010) for Perforce SCM support in Redmine 1.4.4. Attached is the full diff, plus the <code>app/models/repository/perforce.rb</code> and <code>lib/redmine/scm/adapters/perforce_adapter.rb</code> files in particular.</p>
<p>Some notes about the patch:</p>
<ul>
<li>This uses the 'p4' command-line client - freely downloadable from the Perforce website for your specific architecture - rather than any language-specific API, which isn't super-efficient but keeps integration simple.</li>
</ul>
<ul>
<li>Per <code>config/settings.yml</code>, the default location of the 'p4' binary is <code>/root/p4</code> -- you may want to change this.</li>
</ul>
<ul>
<li>In addition to adding Perforce SCM support, this patch adjusts the text post pattern-matching (for issue updates, commit comments, etc.) so that users may use the 'c' or 'cl' prefixes in the same way as 'r' (as a "revision" is called a "changelist" in Perforce parlance).</li>
</ul>
<ul>
<li>There are no automated tests, and parts of this implementation could certainly be improved; use at your own risk, YMMV, etc.</li>
</ul> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=435822012-12-21T09:06:18ZGurvan Le Dromaguet
<ul></ul><p>Terry Suereth wrote:</p>
<blockquote>
<p>In case anyone is still interested in this ...</p>
</blockquote>
<p>there is :)<br />Applied to 2.2 with little changes, I was able to import all repository infos, but diff don't work. I also can't see the changes attached to issues (how does this work ???). I will try to understand better the mechanisms I think. Nice Holiday homework :)<br />Will submit a 2.2 patch if anyone interested.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=442952013-01-14T13:23:12ZAnonymous
<ul></ul><p>Gurvan Le Dromaguet wrote:</p>
<blockquote>
<p>Will submit a 2.2 patch if anyone interested.</p>
</blockquote>
<p>I'm very interested in a 2.2 patch.</p>
<p>What are your experiences regarding the stability of the patch? Is it useful for productive environments?</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=443012013-01-14T14:17:55ZGurvan Le Dromaguet
<ul><li><strong>File</strong> <a href="/attachments/8813">redmine22_perforce_patch_v0.5</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/8813/redmine22_perforce_patch_v0.5">redmine22_perforce_patch_v0.5</a> added</li></ul><p>Here my patch for Redmine 2.2.1. Don't forget to add "scm_perforce_command" in your configuration file to indicate the p4 binary path.</p>
<p>Unfortunately I found no time to go further in the usage, so I still can't tell if it is really functional & useful in a prod context.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=445902013-01-16T17:38:37ZAnonymous
<ul></ul><p>Thank you for providing your 2.2.1 patch. I adapted it a little bit to fit to the 2.1.2 line numbers.</p>
<p>But I have a small problem:<br />Whenever I add a Perforce repository to a project, the P4PORT will not be saved. When I try to view the added repository, I get a 500 internal error and Redmine's logfile shows a problem with an empty @root_url member variable in the perforce_adapter. However, the root_url column in the repositories table is a blank string (not NULL) for the added repository.</p>
<p>Do I have to migrate my database? <code>rake db:migrate</code> didn't do anything. Do I have to add any columns manually?</p>
<p>Here is the relevant part from Redmine's logfile:</p>
<pre>
Started GET "/projects/elevator/repository" for 192.168.5.243 at Wed Jan 16 18:34:45 +0100 2013
Processing by RepositoriesController#show as HTML
Parameters: {"id"=>"elevator"}
Current user: cruediger (id=18)
Executing Perforce fetch_changesets
Completed 500 Internal Server Error in 7ms
NoMethodError (private method `gsub' called for nil:NilClass):
lib/redmine/scm/adapters/abstract_adapter.rb:73:in `shell_quote'
lib/redmine/scm/adapters/abstract_adapter.rb:186:in `shell_quote'
lib/redmine/scm/adapters/perforce_adapter.rb:419:in `credentials_string'
lib/redmine/scm/adapters/perforce_adapter.rb:70:in `info'
lib/redmine/scm/adapters/abstract_adapter.rb:191:in `retrieve_root_url'
lib/redmine/scm/adapters/abstract_adapter.rb:83:in `initialize'
app/models/repository.rb:97:in `new'
app/models/repository.rb:97:in `scm'
app/models/repository/perforce.rb:51:in `fetch_changesets'
app/controllers/repositories_controller.rb:114:in `show'
</pre> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=445912013-01-16T18:01:04ZGurvan Le Dromaguet
<ul></ul><blockquote>
<p>But I have a small problem:</p>
</blockquote>
<p>Strange, I could save the P4PORT successfully with no db upgrade. that's not normal.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=458532013-02-18T15:34:45ZGurvan Le Dromaguet
<ul></ul><p>Small update: I installed new version and had a fresh config of the repository that lead to same error as Christoph states above in <a class="external" href="http://www.redmine.org/issues/339#note-69">http://www.redmine.org/issues/339#note-69</a> . the P4PORT is not stored either. I am trying to debug.<br />[UPDATE] added directly in the db the value: <br />mysql> update repositories set root_url="perforce:1666" where 1;<br />then no more the error.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=505892013-07-16T15:57:14ZGeorge Gensure
<ul></ul><p>The issue with root_url was its definition as a protected attribute. I've put in a safe_attributes call for the field and made it conditional with the spirit of the disabling of the form element for a new_record or when the field is already blank. Also html_safed the helper string for repository path, and with that, it works for 2.3.</p>
<p>One thing I don't really understand is the switch away from P4Ruby - the commandline access is abysmally slow, and the api for P4Ruby so closely matches the cmdline, that it doesn't make any sense not to prefer the library.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=505902013-07-16T15:58:25ZGeorge Gensure
<ul><li><strong>File</strong> <a href="/attachments/10074">2.3-perforce.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/10074/2.3-perforce.patch">2.3-perforce.patch</a> added</li></ul><p>Attached patch from previous update.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=772162017-03-10T12:20:20ZCristiano Cesario
<ul></ul><p>+1 for Git</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=772452017-03-12T15:30:45ZToshi MARUYAMA
<ul></ul><p>Cristiano Cesario wrote:</p>
<blockquote>
<p>+1 for Git</p>
</blockquote>
<p>Git is supported by Redmine core.</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=772462017-03-12T15:36:43ZToshi MARUYAMA
<ul><li><strong>Subject</strong> changed from <i>additional SCM support</i> to <i>perforce SCM support</i></li><li><strong>Description</strong> updated (<a title="View differences" href="/journals/77246/diff?detail_id=60503">diff</a>)</li></ul> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=896932019-01-31T11:45:16ZAnonymous
<ul></ul><p>+1 and bump! :)</p> Redmine - Feature #339: perforce SCM supporthttps://www.redmine.org/issues/339?journal_id=1066822022-05-13T17:52:43Zfloyd Lee
<ul><li><strong>File</strong> <a href="/attachments/29199">5.0-perforce.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/29199/5.0-perforce.patch">5.0-perforce.patch</a> added</li></ul><p>Attached patch for redmine 5.0x</p>