<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Svn on Blog GoHugo de Fredô : Linux, Proxmox, IA, Trail, Course, Randonnée, Gravel, Ski de Randonnée</title>
    <link>https://move.cyber-neurones.org/tags/svn/</link>
    <description>Recent content in Svn on Blog GoHugo de Fredô : Linux, Proxmox, IA, Trail, Course, Randonnée, Gravel, Ski de Randonnée</description>
    <generator>Hugo</generator>
    <language>fr</language>
    <lastBuildDate>Mon, 01 Aug 2022 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://move.cyber-neurones.org/tags/svn/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>SVN : 413 Request Entity Too Large</title>
      <link>https://move.cyber-neurones.org/post/2022/08/2022-08-01-svn-413-request-entity-too-large/</link>
      <pubDate>Mon, 01 Aug 2022 00:00:00 +0000</pubDate>
      <guid>https://move.cyber-neurones.org/post/2022/08/2022-08-01-svn-413-request-entity-too-large/</guid>
      <description>&lt;p&gt;Quand j&amp;rsquo;ai l&amp;rsquo;erreur suivante sur SVN : &amp;ldquo;413 Request Entity Too Large&amp;rdquo;, c&amp;rsquo;est qu&amp;rsquo;il y a un gros différenciel et que le serveur est mal configuré pour ce gros différentiel.&lt;/p&gt;&#xA;&lt;p&gt;J&amp;rsquo;utilise donc le workaround suivant, pour découper la mise à jours par répertoire :&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;**find -type d | grep -v -e &amp;quot;\.svn&amp;quot; | tac | xargs -d&amp;quot;\n&amp;quot; -n1 svn up**&lt;/code&gt;&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;find : search for files in a directory hierarchy&lt;/li&gt;&#xA;&lt;li&gt;grep : print lines that match pattern&lt;/li&gt;&#xA;&lt;li&gt;tac : concatenate and print files in reverse&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>MacOS : Python : Découverte de l’API Python Elasticsearch/Kibana avec SVN pour des stats</title>
      <link>https://move.cyber-neurones.org/post/2019/11/2019-11-25-macos-python-decouverte-de-lapi-python-elasticsearch-kibana-avec-svn-pour-des-stats/</link>
      <pubDate>Mon, 25 Nov 2019 00:00:00 +0000</pubDate>
      <guid>https://move.cyber-neurones.org/post/2019/11/2019-11-25-macos-python-decouverte-de-lapi-python-elasticsearch-kibana-avec-svn-pour-des-stats/</guid>
      <description>&lt;p&gt;Petit script pour envoyer l&amp;rsquo;historique d&amp;rsquo;un SVN vers Elasticsearch/Kibana. Avant j&amp;rsquo;utilisais statSVN : &lt;a href=&#34;https://statsvn.org&#34;&gt;https://statsvn.org .&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Pour l&amp;rsquo;installation sous Mac :&lt;/p&gt;&#xA;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ pip2 install --upgrade pip&#xA;$ pip2 install elasticsearch&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Voici le programme :&lt;/p&gt;&#xA;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;import xml.etree.ElementTree as ET&#xA;import os&#xA;import re&#xA;from elasticsearch import Elasticsearch &#xA;import sys&#xA;&#xA;tree = ET.parse(&amp;#39;svn.log&amp;#39;)&#xA;root = tree.getroot()&#xA;&#xA;count = 0;&#xA;nb_error = 0&#xA;es=Elasticsearch([{&amp;#39;host&amp;#39;:&amp;#39;localhost&amp;#39;,&amp;#39;port&amp;#39;:9200}])&#xA;es_keys=&amp;#34;svn&amp;#34;&#xA;&#xA;for logentry in root.iter(&amp;#39;logentry&amp;#39;):&#xA;   revision = logentry.get(&amp;#39;revision&amp;#39;)&#xA;   author = logentry.find(&amp;#39;author&amp;#39;).text&#xA;   date = logentry.find(&amp;#39;date&amp;#39;).text&#xA;   msg = logentry.find(&amp;#39;msg&amp;#39;).text&#xA;   if msg is not None:&#xA;      msg = msg.replace(&amp;#34;\n&amp;#34;, &amp;#34; &amp;#34;)&#xA;      msg = msg.replace(&amp;#34;\r&amp;#34;, &amp;#34; &amp;#34;)&#xA;      msg = msg.rstrip(&amp;#39;\r\n&amp;#39;)&#xA;      msg = msg.strip(&amp;#39;\r\n&amp;#39;)&#xA;      msg = str(re.sub(r&amp;#39;[^\x00-\x7F]&amp;#39;,&amp;#39; &amp;#39;, msg))&#xA;   paths = logentry.find(&amp;#39;paths&amp;#39;) &#xA;   for path in paths.findall(&amp;#39;path&amp;#39;):&#xA;      my_path = path.text&#xA;      my_basename = os.path.basename(my_path)&#xA;      my_dir = os.path.dirname(my_path)&#xA;      count += 1&#xA;      if msg is not None:&#xA;         json = &amp;#39;{&amp;#34;revision&amp;#34;:&amp;#39;+revision+&amp;#39;,&amp;#34;author&amp;#34;:&amp;#34;&amp;#39;+author+&amp;#39;&amp;#34;,&amp;#34;date&amp;#34;:&amp;#34;&amp;#39;+date+&amp;#39;&amp;#34;,&amp;#34;msg&amp;#34;:&amp;#34;&amp;#39;+msg+&amp;#39;&amp;#34;,&amp;#34;basename&amp;#34;:&amp;#34;&amp;#39;+my_basename+&amp;#39;&amp;#34;,&amp;#34;folder&amp;#34;:&amp;#34;&amp;#39;+my_dir+&amp;#39;&amp;#34;}&amp;#39;&#xA;      else:&#xA;         json = &amp;#39;{&amp;#34;revision&amp;#34;:&amp;#39;+revision+&amp;#39;,&amp;#34;author&amp;#34;:&amp;#34;&amp;#39;+author+&amp;#39;&amp;#34;,&amp;#34;date&amp;#34;:&amp;#34;&amp;#39;+date+&amp;#39;&amp;#34;,&amp;#34;basename&amp;#34;:&amp;#34;&amp;#39;+my_basename+&amp;#39;&amp;#34;,&amp;#34;folder&amp;#34;:&amp;#34;&amp;#39;+my_dir+&amp;#39;&amp;#34;}&amp;#39;&#xA;      print(count,json)&#xA;      try:&#xA;        res = es.index(index=es_keys,doc_type=&amp;#39;svn&amp;#39;,id=count,body=json)&#xA;      except:&#xA;        nb_error += 1  &lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Il faut faire un export XML de SVN :&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
