[PATCH evolve-ext] evolve: adding longer aliases for olog

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH evolve-ext] evolve: adding longer aliases for olog

Martin von Zweigbergk via Mercurial-devel
# HG changeset patch
# User Rodrigo Damazio Bovendorp <[hidden email]>
# Date 1495172417 25200
#      Thu May 18 22:40:17 2017 -0700
# Node ID 6d3120ae0f41701b90c7c9cec93a659ee5f68787
# Parent  f7d67b6ee44f8bb98578fbef8bf7e2e86df638e8
evolve: adding longer aliases for olog

Novice users will likely find the longer versions more obvious to understand
what they're doing (olog only makes sense once you already know what it does).
Especially on the help page, "obsoletelog" will be easier to find and make sense
of.

diff --git a/hgext3rd/evolve/obshistory.py b/hgext3rd/evolve/obshistory.py
--- a/hgext3rd/evolve/obshistory.py
+++ b/hgext3rd/evolve/obshistory.py
@@ -25,7 +25,7 @@
 eh = exthelper.exthelper()
 
 @eh.command(
-    'olog',
+    '^obsoletelog|obslog|olog',
     [('G', 'graph', True, _("show the revision DAG")),
      ('r', 'rev', [], _('show the specified revision or revset'), _('REV'))
     ] + commands.formatteropts,
diff --git a/tests/test-evolve-obshistory.t b/tests/test-evolve-obshistory.t
--- a/tests/test-evolve-obshistory.t
+++ b/tests/test-evolve-obshistory.t
@@ -59,7 +59,7 @@
   x  471f378eab4c (1) A0
        rewritten by test (*20*) as 4ae3a4151de9 (glob)
   
-  $ hg olog 4ae3a4151de9 --no-graph -Tjson | python -m json.tool
+  $ hg obslog 4ae3a4151de9 --no-graph -Tjson | python -m json.tool
   [
       {
           "debugobshistory.markers": [],
@@ -86,7 +86,7 @@
           "debugobshistory.shortdescription": "A0"
       }
   ]
-  $ hg olog --hidden 471f378eab4c
+  $ hg obsoletelog --hidden 471f378eab4c
   x  471f378eab4c (1) A0
        rewritten by test (*20*) as 4ae3a4151de9 (glob)
   
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH evolve-ext] evolve: adding longer aliases for olog

Pierre-Yves David-2


On 05/19/2017 07:56 AM, Rodrigo Damazio Bovendorp via Mercurial-devel wrote:

> # HG changeset patch
> # User Rodrigo Damazio Bovendorp <[hidden email]>
> # Date 1495172417 25200
> #      Thu May 18 22:40:17 2017 -0700
> # Node ID 6d3120ae0f41701b90c7c9cec93a659ee5f68787
> # Parent  f7d67b6ee44f8bb98578fbef8bf7e2e86df638e8
> evolve: adding longer aliases for olog
>
> Novice users will likely find the longer versions more obvious to understand
> what they're doing (olog only makes sense once you already know what it does).
> Especially on the help page, "obsoletelog" will be easier to find and make sense
> of.

I've taken parts on this patch, Thanks!

I took:
  - the obslog alias, it is obviously clearer.
    Maybe we should drop the "olog" one?

I've not taken:

  - "obsoletelog" I'm not sure about he "obsolete" usage here. I see the
point of having a full long name, but maybe "obsolescencelog" or
"evolutionlog" would be clear?

  - addition on "^", this affect something in the helps (I forgot the
details) and obslog might be a corner case enough so that we might want
to keep the basic help tidier. I'm open to discussing this further in a
separated patch.

Cheers,

--
Pierre-Yves David
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel