<div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 13, 2021 at 4:31 PM Michael Kruse <<a href="mailto:llvmdev@meinersbur.de">llvmdev@meinersbur.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">This is a good solution. Thank you. Although I wonder how well Apache<br>
can copy with that many rewrite rules.<br></blockquote><div><br></div><div>I don't know, I'll keep an eye on the load, so far so good (see below).</div><div><br></div><div>Note that:</div><div>1) The rules are loaded in the apache2 config and not in the .htaccess (I'm not sure but I'd suspect the later to may incur some cost on a per-request basis?)</div><div>2) I first match negatively match the pattern (the common case), before going through the huge amount of individual rules:</div><div><br></div><div><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)"> RewriteCond %{REQUEST_URI} !^/rL[0-9]*$</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)"> RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA]</span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)"><span style="color:rgb(6,152,154)"> # Config for SVN -> GIT url rewrite</span></span><span style="display:block;color:rgb(255,255,255);font-family:"courier new",monospace;font-size:13px;font-variant-ligatures:none;white-space:pre;background-color:rgb(34,34,34)"> Include ...../svn_url_rewrite.apache.conf</span><br class="gmail-Apple-interchange-newline" style="color:rgb(0,0,0)"></div><div><img src="cid:ii_kjw5izqm0" alt="Screen Shot 2021-01-13 at 5.01.58 PM.png" width="562" height="85"><br></div><div><br></div><div>Best,</div><div><br></div><div>-- </div><div>Mehdi</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
Michael<br>
<br>
Am Mi., 13. Jan. 2021 um 15:30 Uhr schrieb Mehdi AMINI via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>>:<br>
><br>
> I generated apache2 rewrite rules for these URLs to redirect to the monorepo equivalent:<br>
><br>
> $ git rev-list 40c47680eb2a1cb9bb7f8598c319335731bd5204 | while read commit ; do SVNREV=$(git log --format=%B -n 1 $commit | grep '^llvm-svn: [0-9]*$' | awk '{print $2 }') ; [[ ! -z "$SVNREV" ]] && echo "RewriteRule ^/rL$SVNREV /rG$commit [R=301,L]" ; done<br>
> RewriteRule ^/rL375504 /rG40c47680eb2a1cb9bb7f8598c319335731bd5204 [R=301,L]<br>
> RewriteRule ^/rL375503 /rG3ef017d0669e0dfa7e34a6e58d80c8f307db6d8c [R=301,L]<br>
> RewriteRule ^/rL375502 /rG95290827d7d01c63ac57b2cf5204215ba4ee4b06 [R=301,L]<br>
> RewriteRule ^/rL375501 /rGe4af9de36ca60483040af381edd10e716e7b077d [R=301,L]<br>
> RewriteRule ^/rL375500 /rGe5dd30f77e10b3fa3395312045c06e5e15f9620e [R=301,L]<br>
> RewriteRule ^/rL375499 /rG5b99c189b3bfc0faa157f7ca39652c0bb8c315a7 [R=301,L]<br>
> RewriteRule ^/rL375498 /rG734c74ba14be0f4421ccd9f720e5b9309248e0f7 [R=301,L]<br>
> RewriteRule ^/rL375497 /rGf2c8f3b181e1a0f1a45e6893d15317386bf73977 [R=301,L]<br>
> ...<br>
><br>
><br>
> It's in place now on phabricator.<br>
><br>
> --<br>
> Mehdi<br>
><br>
><br>
> On Wed, Jan 13, 2021 at 11:07 AM Reid Kleckner <<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>> wrote:<br>
>><br>
>> Could we copy the entire SVN repo into the Phab instance, so it can satisfy its svn queries from the local filesystem?<br>
>><br>
>> On Tue, Jan 12, 2021 at 7:57 PM Mehdi AMINI via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
>>><br>
>>> Hi,<br>
>>><br>
>>> Can you clarify why is this important or why is a feature we need to preserve? Are these URLs posted and referenced anywhere?<br>
>>><br>
>>> The whole "LLVM repo" in phabricator is disabled right now and can't be browsed really: <a href="https://reviews.llvm.org/diffusion/L/" rel="noreferrer" target="_blank">https://reviews.llvm.org/diffusion/L/</a> ; phab only provides a frontend for the repository, not an entire copy of it I believe.<br>
>>><br>
>>> Thanks,<br>
>>><br>
>>> --<br>
>>> Mehdi<br>
>>><br>
>>><br>
>>><br>
>>> On Tue, Jan 12, 2021 at 7:25 PM Mike Edwards <<a href="mailto:mike@sqlby.me" target="_blank">mike@sqlby.me</a>> wrote:<br>
>>>><br>
>>>> Hi Nathan,<br>
>>>><br>
>>>> Bummer! I had no idea Phabricator was connected to the SVN server in this way. I'll have to see if I can get a conversation going with the Phabricator maintainers and see if there is a way we can address this. Thanks for the heads up.<br>
>>>><br>
>>>> -Mike<br>
>>>><br>
>>>> On Tue, Jan 12, 2021 at 5:05 PM Nathan James <<a href="mailto:n.james93@hotmail.co.uk" target="_blank">n.james93@hotmail.co.uk</a>> wrote:<br>
>>>>><br>
>>>>> On Wed, 2020-12-09 at 15:01 -0800, Mike Edwards via llvm-dev wrote:<br>
>>>>> > Hi,<br>
>>>>> > This is just a friendly reminder of the upcoming deprecation and<br>
>>>>> > shutdown of the SVN server. As announced during the last US<br>
>>>>> > Developers Conference, way back in 2019, the SVN server would remain<br>
>>>>> > in a read-only state for 1 year. It has been more than a year now<br>
>>>>> > and it is time to let the server enjoy a well deserved retirement.<br>
>>>>> > We are planning on turning the service off on January 5th, 2021.<br>
>>>>> > Please plan accordingly if, for some reason, you are still reliant on<br>
>>>>> > the SVN service being available. Thanks for your time and<br>
>>>>> > attention. I hope you all are having a nice day and staying safe.<br>
>>>>> ><br>
>>>>> > Respectfully,<br>
>>>>> > Mike Edwards<br>
>>>>> > _______________________________________________<br>
>>>>> > LLVM Developers mailing list<br>
>>>>> > <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
>>>>> > <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
>>>>><br>
>>>>> Hi Mike,<br>
>>>>><br>
>>>>> Not sure if anyone else has brought this up, but since turning the svn<br>
>>>>> server off, phab is no longer able to display commit details for older<br>
>>>>> commits to the svn server.<br>
>>>>><br>
>>>>> <a href="https://reviews.llvm.org/rL202984" rel="noreferrer" target="_blank">https://reviews.llvm.org/rL202984</a><br>
>>>>> As an example, results in an error like this:<br>
>>>>> -----------------------------------------------------------------------<br>
>>>>> Command failed with error #1!<br>
>>>>> COMMAND<br>
>>>>> svn --non-interactive --no-auth-cache --trust-server-cert cat<br>
>>>>> <a href="https://llvm.org/svn/llvm-project/llvm/trunk/include/llvm/ADT/IntrusiveRefCntPtr.h@202983" rel="noreferrer" target="_blank">https://llvm.org/svn/llvm-project/llvm/trunk/include/llvm/ADT/IntrusiveRefCntPtr.h@202983</a><br>
>>>>><br>
>>>>> STDOUT<br>
>>>>> (empty)<br>
>>>>><br>
>>>>> STDERR<br>
>>>>> svn: E170013: Unable to connect to a repository at URL '<br>
>>>>> <a href="https://llvm.org/svn/llvm-project/llvm/trunk/include/llvm/ADT/IntrusiveRefCntPtr.h" rel="noreferrer" target="_blank">https://llvm.org/svn/llvm-project/llvm/trunk/include/llvm/ADT/IntrusiveRefCntPtr.h</a>'<br>
>>>>> svn: E175013: Access to '/svn/llvm-<br>
>>>>> project/llvm/trunk/include/llvm/ADT/IntrusiveRefCntPtr.h' forbidden<br>
>>>>> -----------------------------------------------------------------------<br>
>>>>><br>
>>>>> Im guessing this is an issue that needs solving on the phabricator side<br>
>>>>> of things?<br>
>>>>><br>
>>>>> ~Nathan James<br>
>>>>><br>
>>>>><br>
>>> _______________________________________________<br>
>>> LLVM Developers mailing list<br>
>>> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
>>> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
><br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div></div>