Patchwork [6,of,6] crecord: update downarrowshiftevent() docstring, remove todo

login
register
mail settings
Submitter Anton Shestakov
Date May 5, 2016, 1:54 p.m.
Message ID <7f839466fe34b6ea9450.1462456446@neuro>
Download mbox | patch
Permalink /patch/14921/
State Accepted
Headers show

Comments

Anton Shestakov - May 5, 2016, 1:54 p.m.
# HG changeset patch
# User Anton Shestakov <av6@dwimlabs.net>
# Date 1462449095 -28800
#      Thu May 05 19:51:35 2016 +0800
# Node ID 7f839466fe34b6ea94508a7e313627686cbf7e11
# Parent  5d66cb69e27668f0faf5be918c5bdde55342eb19
crecord: update downarrowshiftevent() docstring, remove todo

The phrasing is mostly taken from uparrowshiftevent().
Pierre-Yves David - May 5, 2016, 2:42 p.m.
This series is pushed.
I replaced patch 2 by one dropping the version reference entirely, this 
is shipped with core now.

Thanks.

On 05/05/2016 03:54 PM, Anton Shestakov wrote:
> # HG changeset patch
> # User Anton Shestakov <av6@dwimlabs.net>
> # Date 1462449095 -28800
> #      Thu May 05 19:51:35 2016 +0800
> # Node ID 7f839466fe34b6ea94508a7e313627686cbf7e11
> # Parent  5d66cb69e27668f0faf5be918c5bdde55342eb19
> crecord: update downarrowshiftevent() docstring, remove todo
>
> The phrasing is mostly taken from uparrowshiftevent().
>
> diff --git a/mercurial/crecord.py b/mercurial/crecord.py
> --- a/mercurial/crecord.py
> +++ b/mercurial/crecord.py
> @@ -650,12 +650,10 @@ class curseschunkselector(object):
>   
>       def downarrowshiftevent(self):
>           """
> -        if the cursor is already at the bottom chunk, scroll the screen up and
> -        move the cursor-position to the subsequent chunk.  otherwise, only move
> -        the cursor position down one chunk.
> +        select (if possible) the next item on the same level as the currently
> +        selected item.  otherwise, select (if possible) the next item on the
> +        same level as the parent item of the currently selected item.
>           """
> -        # todo: update docstring
> -
>           currentitem = self.currentselecteditem
>           nextitem = currentitem.nextitem()
>           # if there's no next item on this level, try choosing the parent's
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/crecord.py b/mercurial/crecord.py
--- a/mercurial/crecord.py
+++ b/mercurial/crecord.py
@@ -650,12 +650,10 @@  class curseschunkselector(object):
 
     def downarrowshiftevent(self):
         """
-        if the cursor is already at the bottom chunk, scroll the screen up and
-        move the cursor-position to the subsequent chunk.  otherwise, only move
-        the cursor position down one chunk.
+        select (if possible) the next item on the same level as the currently
+        selected item.  otherwise, select (if possible) the next item on the
+        same level as the parent item of the currently selected item.
         """
-        # todo: update docstring
-
         currentitem = self.currentselecteditem
         nextitem = currentitem.nextitem()
         # if there's no next item on this level, try choosing the parent's