Patchwork [STABLE] hgweb: remove baseline info from paper template

login
register
mail settings
Submitter Pierre-Yves David
Date Feb. 1, 2013, 4:43 a.m.
Message ID <80f3dd3aa40280e97289.1359693810@yamac.lan>
Download mbox | patch
Permalink /patch/783/
State Accepted
Commit 0c51532ec2335b89fa0283a84e57754495df2c08
Headers show

Comments

Pierre-Yves David - Feb. 1, 2013, 4:43 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1359693606 -3600
# Branch stable
# Node ID 80f3dd3aa40280e97289153455b493c727ef0a52
# Parent  2a1fac3650a5b4d650198604c82ab59969500374
hgweb: remove baseline info from paper template

The user interface is not considered ready for prime time yet. The internal code stay in
place custom template usage. The feature is ultimatly wished and will be
reenabled soon. The current issue is only related to the visual of the current
interface.
Mads Kiilerich - Feb. 1, 2013, 9:38 a.m.
On 02/01/2013 05:43 AM, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
> # Date 1359693606 -3600
> # Branch stable
> # Node ID 80f3dd3aa40280e97289153455b493c727ef0a52
> # Parent  2a1fac3650a5b4d650198604c82ab59969500374
> hgweb: remove baseline info from paper template
>
> The user interface is not considered ready for prime time yet. The internal code stay in
> place custom template usage. The feature is ultimatly wished and will be
> reenabled soon. The current issue is only related to the visual of the current
> interface.

A reference to the revision that introduced the feature, please.

The template keyword 'currentbaseline' is also very strange - there is 
no 'baseline' concept anywhere in Mercurial. In 'changeset' it should be 
something like 'diffparent'. Diff between arbitrary revisions belongs 
elsewhere - and then it would be more descriptive to call the two nodes 
'anode' and 'bnode'.

So I suggest removing the keyword too so we can change it without 
breaking backward compatibility. Actually I suggest backing out the full 
feature until it is ready.

/Mads

>
> diff --git a/mercurial/templates/paper/changeset.tmpl b/mercurial/templates/paper/changeset.tmpl
> --- a/mercurial/templates/paper/changeset.tmpl
> +++ b/mercurial/templates/paper/changeset.tmpl
> @@ -72,18 +72,10 @@ files, or words in the commit message</d
>         <p>
>         <table>{diffstat}</table>
>       </div>
>     </td>
>   </tr>
> -<tr>
> - <th class="author">change baseline</th>
> - <td class="author">{parent%changesetbaseline}</td>
> -</tr>
> -<tr>
> - <th class="author">current baseline</th>
> - <td class="author"><a href="{url}rev/{currentbaseline|short}{sessionvars%urlparameter}">{currentbaseline|short}</a></td>
> -</tr>
>   </table>
>   
>   <div class="overflow">
>   <div class="sourcefirst">   line diff</div>
>   
> diff --git a/tests/test-hgweb-commands.t b/tests/test-hgweb-commands.t
> --- a/tests/test-hgweb-commands.t
> +++ b/tests/test-hgweb-commands.t
> @@ -445,18 +445,10 @@ Logs and changes
>       </tr>
>     </table>
>         </div>
>       </td>
>     </tr>
> -  <tr>
> -   <th class="author">change baseline</th>
> -   <td class="author"></td>
> -  </tr>
> -  <tr>
> -   <th class="author">current baseline</th>
> -   <td class="author"><a href="/rev/000000000000">000000000000</a></td>
> -  </tr>
>     </table>
>     
>     <div class="overflow">
>     <div class="sourcefirst">   line diff</div>
>     
> diff --git a/tests/test-hgweb-diffs.t b/tests/test-hgweb-diffs.t
> --- a/tests/test-hgweb-diffs.t
> +++ b/tests/test-hgweb-diffs.t
> @@ -137,18 +137,10 @@ revision
>       </tr>
>     </table>
>         </div>
>       </td>
>     </tr>
> -  <tr>
> -   <th class="author">change baseline</th>
> -   <td class="author"></td>
> -  </tr>
> -  <tr>
> -   <th class="author">current baseline</th>
> -   <td class="author"><a href="/rev/000000000000">000000000000</a></td>
> -  </tr>
>     </table>
>     
>     <div class="overflow">
>     <div class="sourcefirst">   line diff</div>
>     
> @@ -406,18 +398,10 @@ revision
>       </tr>
>     </table>
>         </div>
>       </td>
>     </tr>
> -  <tr>
> -   <th class="author">change baseline</th>
> -   <td class="author"></td>
> -  </tr>
> -  <tr>
> -   <th class="author">current baseline</th>
> -   <td class="author"><a href="/rev/000000000000">000000000000</a></td>
> -  </tr>
>     </table>
>     
>     <div class="overflow">
>     <div class="sourcefirst">   line diff</div>
>     
> diff --git a/tests/test-hgweb-removed.t b/tests/test-hgweb-removed.t
> --- a/tests/test-hgweb-removed.t
> +++ b/tests/test-hgweb-removed.t
> @@ -110,18 +110,10 @@ revision
>       </tr>
>     </table>
>         </div>
>       </td>
>     </tr>
> -  <tr>
> -   <th class="author">change baseline</th>
> -   <td class="author"><a href="/rev/cb9a9f314b8b:c78f6c5cbea9">cb9a9f314b8b</a> </td>
> -  </tr>
> -  <tr>
> -   <th class="author">current baseline</th>
> -   <td class="author"><a href="/rev/cb9a9f314b8b">cb9a9f314b8b</a></td>
> -  </tr>
>     </table>
>     
>     <div class="overflow">
>     <div class="sourcefirst">   line diff</div>
>     
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
Thomas Arendsen Hein - Feb. 1, 2013, 9:49 a.m.
* Mads Kiilerich <mads@kiilerich.com> [20130201 10:38]:
> On 02/01/2013 05:43 AM, Pierre-Yves David wrote:
> ># HG changeset patch
> ># User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
> ># Date 1359693606 -3600
> ># Branch stable
> ># Node ID 80f3dd3aa40280e97289153455b493c727ef0a52
> ># Parent  2a1fac3650a5b4d650198604c82ab59969500374
> >hgweb: remove baseline info from paper template
> >
> >The user interface is not considered ready for prime time yet. The internal code stay in
> >place custom template usage. The feature is ultimatly wished and will be
> >reenabled soon. The current issue is only related to the visual of the current
> >interface.
> 
> A reference to the revision that introduced the feature, please.

Yes, create an issue and include the number.

> The template keyword 'currentbaseline' is also very strange - there
> is no 'baseline' concept anywhere in Mercurial. In 'changeset' it
> should be something like 'diffparent'. Diff between arbitrary
> revisions belongs elsewhere - and then it would be more descriptive
> to call the two nodes 'anode' and 'bnode'.
> 
> So I suggest removing the keyword too so we can change it without
> breaking backward compatibility. Actually I suggest backing out the
> full feature until it is ready.

I'd vote to keep the code as it generally works and anyone who is
able to create templates based on this should be able to do a
search/replace on the keywords later.

Regards,
Thomas
Pierre-Yves David - Feb. 1, 2013, 10:11 a.m.
On Fri, Feb 01, 2013 at 10:38:21AM +0100, Mads Kiilerich wrote:
> On 02/01/2013 05:43 AM, Pierre-Yves David wrote:
> ># HG changeset patch
> ># User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
> ># Date 1359693606 -3600
> ># Branch stable
> ># Node ID 80f3dd3aa40280e97289153455b493c727ef0a52
> ># Parent  2a1fac3650a5b4d650198604c82ab59969500374
> >hgweb: remove baseline info from paper template
> >
> >The user interface is not considered ready for prime time yet. The internal code stay in
> >place custom template usage. The feature is ultimatly wished and will be
> >reenabled soon. The current issue is only related to the visual of the current
> >interface.
> 
> A reference to the revision that introduced the feature, please.

good point, that's d605a82cf189

> The template keyword 'currentbaseline' is also very strange - there
> is no 'baseline' concept anywhere in Mercurial. In 'changeset' it
> should be something like 'diffparent'. Diff between arbitrary
> revisions belongs elsewhere - and then it would be more descriptive
> to call the two nodes 'anode' and 'bnode'.

Yes baseline sound wrong and is not used anywhere in Mercurial. not even
in d605a82cf189 description.

> So I suggest removing the keyword too so we can change it without
> breaking backward compatibility. Actually I suggest backing out the
> full feature until it is ready.

Bah, not sure about that. The code works so we can keep it arround but
not advertise the keywork name for now
Mads Kiilerich - Feb. 1, 2013, 10:40 a.m.
On 02/01/2013 11:11 AM, Pierre-Yves David wrote:
> On Fri, Feb 01, 2013 at 10:38:21AM +0100, Mads Kiilerich wrote:
>> On 02/01/2013 05:43 AM, Pierre-Yves David wrote:
>>> # HG changeset patch
>>> # User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
>>> # Date 1359693606 -3600
>>> # Branch stable
>>> # Node ID 80f3dd3aa40280e97289153455b493c727ef0a52
>>> # Parent  2a1fac3650a5b4d650198604c82ab59969500374
>>> hgweb: remove baseline info from paper template
>>>
>>> The user interface is not considered ready for prime time yet. The internal code stay in
>>> place custom template usage. The feature is ultimatly wished and will be
>>> reenabled soon. The current issue is only related to the visual of the current
>>> interface.
>> A reference to the revision that introduced the feature, please.
> good point, that's d605a82cf189
>
>> The template keyword 'currentbaseline' is also very strange - there
>> is no 'baseline' concept anywhere in Mercurial. In 'changeset' it
>> should be something like 'diffparent'. Diff between arbitrary
>> revisions belongs elsewhere - and then it would be more descriptive
>> to call the two nodes 'anode' and 'bnode'.
> Yes baseline sound wrong and is not used anywhere in Mercurial. not even
> in d605a82cf189 description.
>
>> So I suggest removing the keyword too so we can change it without
>> breaking backward compatibility. Actually I suggest backing out the
>> full feature until it is ready.
> Bah, not sure about that. The code works so we can keep it arround but
> not advertise the keywork name for now

Sure - it will be kept around in history after a backout and we can back 
it in again when it is ready.

Leaving it (temporarily) as unused and untested code do not sound like a 
good idea to me.

/Mads
Thomas Arendsen Hein - Feb. 1, 2013, 3:16 p.m.
* Mads Kiilerich <mads@kiilerich.com> [20130201 11:40]:
> On 02/01/2013 11:11 AM, Pierre-Yves David wrote:
> >Bah, not sure about that. The code works so we can keep it arround but
> >not advertise the keywork name for now
> 
> Sure - it will be kept around in history after a backout and we can
> back it in again when it is ready.
> 
> Leaving it (temporarily) as unused and untested code do not sound
> like a good idea to me.

On the other hand, all tests during the freeze were with this code
in place, none of the recent tests have been done with this code
backed out.

Keeping this code has a chance to keep a problem in unused code.

Backing this code out has a chance to introduce a new change to the
code, even it is a change that should not cause harm to anything
else. Additionally this is another patch to look at in a time where
even obviously correct patches can distract the people who look at
them.

Regards,
Thomas

Patch

diff --git a/mercurial/templates/paper/changeset.tmpl b/mercurial/templates/paper/changeset.tmpl
--- a/mercurial/templates/paper/changeset.tmpl
+++ b/mercurial/templates/paper/changeset.tmpl
@@ -72,18 +72,10 @@  files, or words in the commit message</d
       <p>
       <table>{diffstat}</table>
     </div>
   </td>
 </tr>
-<tr>
- <th class="author">change baseline</th>
- <td class="author">{parent%changesetbaseline}</td>
-</tr>
-<tr>
- <th class="author">current baseline</th>
- <td class="author"><a href="{url}rev/{currentbaseline|short}{sessionvars%urlparameter}">{currentbaseline|short}</a></td>
-</tr>
 </table>
 
 <div class="overflow">
 <div class="sourcefirst">   line diff</div>
 
diff --git a/tests/test-hgweb-commands.t b/tests/test-hgweb-commands.t
--- a/tests/test-hgweb-commands.t
+++ b/tests/test-hgweb-commands.t
@@ -445,18 +445,10 @@  Logs and changes
     </tr>
   </table>
       </div>
     </td>
   </tr>
-  <tr>
-   <th class="author">change baseline</th>
-   <td class="author"></td>
-  </tr>
-  <tr>
-   <th class="author">current baseline</th>
-   <td class="author"><a href="/rev/000000000000">000000000000</a></td>
-  </tr>
   </table>
   
   <div class="overflow">
   <div class="sourcefirst">   line diff</div>
   
diff --git a/tests/test-hgweb-diffs.t b/tests/test-hgweb-diffs.t
--- a/tests/test-hgweb-diffs.t
+++ b/tests/test-hgweb-diffs.t
@@ -137,18 +137,10 @@  revision
     </tr>
   </table>
       </div>
     </td>
   </tr>
-  <tr>
-   <th class="author">change baseline</th>
-   <td class="author"></td>
-  </tr>
-  <tr>
-   <th class="author">current baseline</th>
-   <td class="author"><a href="/rev/000000000000">000000000000</a></td>
-  </tr>
   </table>
   
   <div class="overflow">
   <div class="sourcefirst">   line diff</div>
   
@@ -406,18 +398,10 @@  revision
     </tr>
   </table>
       </div>
     </td>
   </tr>
-  <tr>
-   <th class="author">change baseline</th>
-   <td class="author"></td>
-  </tr>
-  <tr>
-   <th class="author">current baseline</th>
-   <td class="author"><a href="/rev/000000000000">000000000000</a></td>
-  </tr>
   </table>
   
   <div class="overflow">
   <div class="sourcefirst">   line diff</div>
   
diff --git a/tests/test-hgweb-removed.t b/tests/test-hgweb-removed.t
--- a/tests/test-hgweb-removed.t
+++ b/tests/test-hgweb-removed.t
@@ -110,18 +110,10 @@  revision
     </tr>
   </table>
       </div>
     </td>
   </tr>
-  <tr>
-   <th class="author">change baseline</th>
-   <td class="author"><a href="/rev/cb9a9f314b8b:c78f6c5cbea9">cb9a9f314b8b</a> </td>
-  </tr>
-  <tr>
-   <th class="author">current baseline</th>
-   <td class="author"><a href="/rev/cb9a9f314b8b">cb9a9f314b8b</a></td>
-  </tr>
   </table>
   
   <div class="overflow">
   <div class="sourcefirst">   line diff</div>