Patchwork [3,of,9,STABLE?,V2] gendoc: rename to show_doc_hg from show_doc

login
register
mail settings
Submitter Takumi IINO
Date May 15, 2013, 7:14 a.m.
Message ID <4ff0ea3872414cffa1ea.1368602060@iino-no-MacBook-Air.local>
Download mbox | patch
Permalink /patch/1644/
State Rejected, archived
Headers show

Comments

Takumi IINO - May 15, 2013, 7:14 a.m.
# HG changeset patch
# User Takumi IINO <trot.thunder@gmail.com>
# Date 1368600301 -32400
#      Wed May 15 15:45:01 2013 +0900
# Branch stable
# Node ID 4ff0ea3872414cffa1eaf8120e6fb359827c283a
# Parent  8ef73a60dc14d96a7dbd8844df862a51517630f3
gendoc: rename to show_doc_hg from show_doc

This function prints hg.1.gendoc.txt content.
Matt Mackall - May 23, 2013, 10:44 p.m.
On Wed, 2013-05-15 at 16:14 +0900, Takumi IINO wrote:
> # HG changeset patch
> # User Takumi IINO <trot.thunder@gmail.com>
> # Date 1368600301 -32400
> #      Wed May 15 15:45:01 2013 +0900
> # Branch stable
> # Node ID 4ff0ea3872414cffa1eaf8120e6fb359827c283a
> # Parent  8ef73a60dc14d96a7dbd8844df862a51517630f3
> gendoc: rename to show_doc_hg from show_doc
> 
> This function prints hg.1.gendoc.txt content.

> -def show_doc(ui):
> +def show_doc_hg(ui):

We're unfond of underbars in identifier names, so you need to remove
them when changing names.

Patch

diff --git a/doc/gendoc.py b/doc/gendoc.py
--- a/doc/gendoc.py
+++ b/doc/gendoc.py
@@ -64,7 +64,7 @@ 
 
     return d
 
-def show_doc(ui):
+def show_doc_hg(ui):
     # print options
     ui.write(minirst.section(_("Options")))
     for optstr, desc in get_opts(globalopts):
@@ -158,4 +158,4 @@ 
     return extensions.enabled().keys() + extensions.disabled().keys()
 
 if __name__ == "__main__":
-    show_doc(sys.stdout)
+    show_doc_hg(sys.stdout)