[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: Review Request 114229: frameworks: add posibility to change swap file location
From:       "Christoph Cullmann" <cullmann () kde ! org>
Date:       2013-12-28 14:04:11
Message-ID: 20131228140411.18782.70390 () probe ! kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On Dec. 27, 2013, 10:31 p.m., Dominik Haumann wrote:
> > part/swapfile/kateswapfile.cpp, line 577
> > <https://git.reviewboard.kde.org/r/114229/diff/3/?file=227020#file227020line577>
> > 
> > QByteArray KateTextBuffer::digest()
> > 
> > always returns the md5sum of the file on disk. You could also use this md5sum. \
> > Then the md5sum would be used as filename, and the first contents of the swap \
> > file itself would also be the md5sum as integrity check. 
> > I guess this is what Christoph also meant in his comment.

we can refine the path names later, otherwise that just look ok.
But yeah, I meant to concatinate url md5sum + KateTextBuffer::digest().


- Christoph


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/114229/#review46231
-----------------------------------------------------------


On Dec. 23, 2013, 7:03 p.m., Michal Humpula wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/114229/
> -----------------------------------------------------------
> 
> (Updated Dec. 23, 2013, 7:03 p.m.)
> 
> 
> Review request for Kate.
> 
> 
> Bugs: 321135 and 328244
> http://bugs.kde.org/show_bug.cgi?id=321135
> http://bugs.kde.org/show_bug.cgi?id=328244
> 
> 
> Repository: kate
> 
> 
> Description
> -------
> 
> Single purpose of this patch is to have something more than idea for disccussion.
> 
> The main idea is to put kate-swp files to a different place then original document \
> in case the document is on "slow" remote FS (sshfs, afs, ...). 
> The config ui is a little bit rought. The md5 sum might represent a collision \
> problem. Not sure if it makes sense to add third option: "Turn Swapping Off", \
> a.k.a. how essential is for a text editor to keep "swap" files? 
> 
> Diffs
> -----
> 
> part/dialogs/katedialogs.h 20ed4c3 
> part/dialogs/katedialogs.cpp 9c2c4e2 
> part/dialogs/opensaveconfigadvwidget.ui aead37b 
> part/document/katedocument.cpp 6a78907 
> part/swapfile/kateswapfile.cpp ec67665 
> part/utils/kateconfig.h aabedd3 
> part/utils/kateconfig.cpp db28b68 
> 
> Diff: https://git.reviewboard.kde.org/r/114229/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Michal Humpula
> 
> 


[Attachment #5 (text/html)]

<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/114229/">https://git.reviewboard.kde.org/r/114229/</a>
  </td>
    </tr>
   </table>
   <br />










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On December 27th, 2013, 10:31 p.m. UTC, <b>Dominik \
Haumann</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/114229/diff/3/?file=227020#file227020line577" \
style="color: black; font-weight: bold; text-decoration: \
underline;">part/swapfile/kateswapfile.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 3)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">bool \
SwapFile::updateFileName()</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">577</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">path</span><span class="p">.</span><span class="n">append</span><span \
class="p">(</span> <span class="n">QCryptographicHash</span><span \
class="o">::</span><span class="n">hash</span><span class="p">(</span> <span \
class="n">url</span><span class="p">.</span><span class="n">toLocalFile</span><span \
class="p">().</span><span class="n">toUtf8</span><span class="p">(),</span> <span \
class="n">QCryptographicHash</span><span class="o">::</span><span \
class="n">Md5</span> <span class="p">).</span><span class="n">toHex</span><span \
class="p">()</span> <span class="p">);</span></pre></td>  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">QByteArray \
KateTextBuffer::digest()

always returns the md5sum of the file on disk. You could also use this md5sum. Then \
the md5sum would be used as filename, and the first contents of the swap file itself \
would also be the md5sum as integrity check.

I guess this is what Christoph also meant in his comment.</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">we can \
refine the path names later, otherwise that just look ok. But yeah, I meant to \
concatinate url md5sum + KateTextBuffer::digest().</pre> <br />




<p>- Christoph</p>


<br />
<p>On December 23rd, 2013, 7:03 p.m. UTC, Michal Humpula wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for Kate.</div>
<div>By Michal Humpula.</div>


<p style="color: grey;"><i>Updated Dec. 23, 2013, 7:03 p.m.</i></p>







<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=321135">321135</a>, 

 <a href="http://bugs.kde.org/show_bug.cgi?id=328244">328244</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kate
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Single purpose of this patch is to have something more than idea for \
disccussion.

The main idea is to put kate-swp files to a different place then original document in \
case the document is on &quot;slow&quot; remote FS (sshfs, afs, ...).

The config ui is a little bit rought. The md5 sum might represent a collision \
problem. Not sure if it makes sense to add third option: &quot;Turn Swapping \
Off&quot;, a.k.a. how essential is for a text editor to keep &quot;swap&quot; \
files?</pre>  </td>
 </tr>
</table>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>part/dialogs/katedialogs.h <span style="color: grey">(20ed4c3)</span></li>

 <li>part/dialogs/katedialogs.cpp <span style="color: grey">(9c2c4e2)</span></li>

 <li>part/dialogs/opensaveconfigadvwidget.ui <span style="color: \
grey">(aead37b)</span></li>

 <li>part/document/katedocument.cpp <span style="color: grey">(6a78907)</span></li>

 <li>part/swapfile/kateswapfile.cpp <span style="color: grey">(ec67665)</span></li>

 <li>part/utils/kateconfig.h <span style="color: grey">(aabedd3)</span></li>

 <li>part/utils/kateconfig.cpp <span style="color: grey">(db28b68)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/114229/diff/" style="margin-left: \
3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>



_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic