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

List:       kwrite-devel
Subject:    Re: Review Request 114229: add posibility to change swap file location
From:       "Dominik Haumann" <dhaumann () kde ! org>
Date:       2013-12-04 13:34:29
Message-ID: 20131204133429.21499.96125 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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


In general, the patch looks good, and given that users ask for this feature again and \
again, we probably should commit it at some point.

Can you post an updated version of this patch with the small issues addressed?
What also comes to my mind: Maybe on recovery, we should first look into the Document \
directory for a swap file, and then in the global swap-file-directory? What do you \
think?

Also, while you're at it, I'd indeed like to also see disabling the swap files \
entirely, since some users want this.


part/swapfile/kateswapfile.cpp
<http://git.reviewboard.kde.org/r/114229/#comment32242>

    I'd prefer ::swapFileMode() to return the enum instead of uint. Then we do not \
require a cast in the public API.  
    The cast is then internal to the Config class (when writing the config).



part/utils/kateconfig.h
<http://git.reviewboard.kde.org/r/114229/#comment32243>

    Question is: Do we also want to provide an option to entirely disable the swap \
files?  In that case, we could add another enum NoSwapFile or similar.



part/utils/kateconfig.cpp
<http://git.reviewboard.kde.org/r/114229/#comment32241>

    Shouldn't
      m_swapFileNoSyncSet
    rather be
      m_swapFileModeSet?


- Dominik Haumann


On Nov. 30, 2013, 9:52 p.m., Michal Humpula wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/114229/
> -----------------------------------------------------------
> 
> (Updated Nov. 30, 2013, 9:52 p.m.)
> 
> 
> Review request for Kate.
> 
> 
> Bugs: 328244
> 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 7377720 
> part/dialogs/katedialogs.cpp b137fd1 
> part/dialogs/opensaveconfigadvwidget.ui 7578fdf 
> part/swapfile/kateswapfile.cpp d4378d1 
> part/utils/kateconfig.h a932533 
> part/utils/kateconfig.cpp 00251fb 
> 
> Diff: http://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="http://git.reviewboard.kde.org/r/114229/">http://git.reviewboard.kde.org/r/114229/</a>
  </td>
    </tr>
   </table>
   <br />





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">In general, the patch \
looks good, and given that users ask for this feature again and again, we probably \
should commit it at some point.

Can you post an updated version of this patch with the small issues addressed?
What also comes to my mind: Maybe on recovery, we should first look into the Document \
directory for a swap file, and then in the global swap-file-directory? What do you \
think?

Also, while you&#39;re at it, I&#39;d indeed like to also see disabling the swap \
files entirely, since some users want this.</pre>  <br />







<div>




<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="http://git.reviewboard.kde.org/r/114229/diff/1/?file=221924#file221924line570" \
style="color: black; font-weight: bold; text-decoration: \
underline;">part/swapfile/kateswapfile.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 1)

    </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="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">569</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">  <span \
class="n">path</span><span class="p">.</span><span class="n">insert</span><span \
class="p">(</span><span class="n">poz</span><span class="o">+</span><span \
class="mi">1</span><span class="p">,</span> <span class="s">&quot;.&quot;</span><span \
class="p">);</span></pre></td>  <th bgcolor="#e9eaa8" style="border-left: 1px solid \
#C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font \
size="2">570</font></th>  <td bgcolor="#fdfebc" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; ">  <span class="n">KateDocumentConfig</span><span \
class="o">::</span><span class="n">SwapFileMode</span> <span class="n">mode</span> \
<span class="o">=</span> <span class="k">static_cast</span><span \
class="o">&lt;</span><span class="n">KateDocumentConfig</span><span \
class="o">::</span><span class="n">SwapFileMode</span><span \
class="o">&gt;</span><span class="p">(</span><span \
class="n">KateDocumentConfig</span><span class="o">::</span><span \
class="n">global</span><span class="p">()</span><span class="o">-&gt;</span><span \
class="n">swapFileMode</span><span class="p">());</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I&#39;d \
prefer ::swapFileMode() to return the enum instead of uint. Then we do not require a \
cast in the public API.

The cast is then internal to the Config class (when writing the config).</pre>
</div>
<br />

<div>




<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="http://git.reviewboard.kde.org/r/114229/diff/1/?file=221925#file221925line300" \
style="color: black; font-weight: bold; text-decoration: \
underline;">part/utils/kateconfig.h</a>  <span style="font-weight: normal;">

     (Diff revision 1)

    </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; ">class \
KATEPART_TESTS_EXPORT KateDocumentConfig : public KateConfig</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">300</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">      <span \
class="n">DocumentDirectory</span> <span class="o">=</span> <span \
class="mi">0</span><span class="p">,</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Question \
is: Do we also want to provide an option to entirely disable the swap files? In that \
case, we could add another enum NoSwapFile or similar.</pre> </div>
<br />

<div>




<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="http://git.reviewboard.kde.org/r/114229/diff/1/?file=221926#file221926line1074" \
style="color: black; font-weight: bold; text-decoration: \
underline;">part/utils/kateconfig.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 1)

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



 
 

 <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">1074</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">  <span \
class="k">if</span> <span class="p">(</span><span \
class="n">m_swapFileNoSyncSet</span> <span class="o">||</span> <span \
class="n">isGlobal</span><span class="p">())</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Shouldn&#39;t  m_swapFileNoSyncSet
rather be
  m_swapFileModeSet?</pre>
</div>
<br />



<p>- Dominik Haumann</p>


<br />
<p>On November 30th, 2013, 9:52 p.m. UTC, Michal Humpula wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://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 Nov. 30, 2013, 9:52 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=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">(7377720)</span></li>

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

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

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

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

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

</ul>

<p><a href="http://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