Patchwork Add an example in churn extension

login
register
mail settings
Submitter Stéphane Blondon
Date Sept. 17, 2020, 1:44 p.m.
Message ID <CAOy+up6xx=MPEt=ZcP93ckNgH4BP4xSXcB+0yrxCJn9Am35mGA@mail.gmail.com>
Download mbox | patch
Permalink /patch/47190/
State New
Headers show

Comments

Stéphane Blondon - Sept. 17, 2020, 1:44 p.m.
Hello,

this patch (done with 'hg export') adds an example in the docstring
`churn()` function, in order the user can see it with:
hg help churn

I subscribed to this mailing list if there are remarks about the patch.

Regards
Augie Fackler - Sept. 17, 2020, 3:19 p.m.
Looks good and I'll apply it, but please note the thoughts here for future patches: https://www.mercurial-scm.org/wiki/ContributingChanges#Emailing_patches <https://www.mercurial-scm.org/wiki/ContributingChanges#Emailing_patches>

Thanks!

> On Sep 17, 2020, at 09:44, Stéphane Blondon <stephane.blondon@gmail.com> wrote:
> 
> Hello,
> 
> this patch (done with 'hg export') adds an example in the docstring
> `churn()` function, in order the user can see it with:
> hg help churn
> 
> I subscribed to this mailing list if there are remarks about the patch.
> 
> Regards
> -- 
> Stéphane
> <churn.patch>_______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Stéphane Blondon - Sept. 17, 2020, 7:32 p.m.
On 17/09/2020 17:19, Augie Fackler wrote:
> Looks good and I'll apply it, but please note the thoughts here for future patches: https://www.mercurial-scm.org/wiki/ContributingChanges#Emailing_patches <https://www.mercurial-scm.org/wiki/ContributingChanges#Emailing_patches>

Sorry, I missed this section in the page.

Thank you for the merge!

Patch

exporting patch:
# HG changeset patch
# User "Stephane" <stephane@yaal.fr>
# Date 1600349653 -7200
#      Thu Sep 17 15:34:13 2020 +0200
# Branch add_example_to_churn_extension
# Node ID ac25f6aee45f8fa5a3cedd986c3036512575b5fa
# Parent  5f0eeda2005d986d02c702961813170d97f1e399
churn: add an usage example in docstring

diff -r 5f0eeda2005d -r ac25f6aee45f hgext/churn.py
--- a/hgext/churn.py	Sat Sep 12 07:23:47 2020 +0900
+++ b/hgext/churn.py	Thu Sep 17 15:34:13 2020 +0200
@@ -183,6 +183,9 @@ 
       # display count of lines changed in every year
       hg churn -f "%Y" -s
 
+      # display count of lines changed in a time range
+      hg churn -d "2020-04 to 2020-09"
+
     It is possible to map alternate email addresses to a main address
     by providing a file using the following format::