[PATCH 2 of 2] The graphlog extension no longer uses the short option (-g)

Alpár Jüttner alpar at cs.elte.hu
Thu Feb 12 07:56:26 CST 2009


Hi,

I don't like this change. Firstly, it breaks the backward compatibility.
Secondly, I personally use -g quite frequently (but not always!)  while
I would never use --git as it is the default setting for me and I guess
it is the same for the majority of the users.

By the way, is there any reason why --git is not the default setting in
hg? The git format is an extension of the simple one, thus
      * if the changeset contains no binary changes, there is no
        difference between the two formats when exporting/importing.
      * if there are binary changes, then
              * without --git, we get a wrong patch, which does not
                contain all of our changes. I think it is dangerous.
              * with --git, the importing application either can import
                it or in rare cases it cannot, but at least it will
                report an error in the latter case.

Best regards,
Alpar

On Mon, 2009-02-09 at 10:45 -0500, jim.correia at gmail.com wrote:
> # HG changeset patch
> # User Jim Correia <jim.correia at pobox.com>
> # Date 1234194027 18000
> # Node ID 395eee7d51805cadce0cba324428831d5bc47cdd
> # Parent  3031c4495904ecd78de6a0a68b9bd0800b0e3a98
> The graphlog extension no longer uses the short option (-g).
> 
> Commands which produce patches now use -g|--git to trigger git diff
> generation.
> 
> diff -r 3031c4495904 -r 395eee7d5180 hgext/graphlog.py
> --- a/hgext/graphlog.py	Sat Jan 24 13:11:28 2009 -0500
> +++ b/hgext/graphlog.py	Mon Feb 09 10:40:27 2009 -0500
> @@ -409,7 +409,7 @@
>              return wrapfn(*args, **kwargs)
>          return orig(*args, **kwargs)
>      entry = extensions.wrapcommand(table, cmd, graph)
> -    entry[1].append(('g', 'graph', None, _("show the revision DAG")))
> +    entry[1].append(('', 'graph', None, _("show the revision DAG")))
>  
>  cmdtable = {
>      "glog":
> diff -r 3031c4495904 -r 395eee7d5180 mercurial/commands.py
> --- a/mercurial/commands.py	Sat Jan 24 13:11:28 2009 -0500
> +++ b/mercurial/commands.py	Mon Feb 09 10:40:27 2009 -0500
> @@ -2997,7 +2997,7 @@
>  
>  logopts = [
>      ('p', 'patch', None, _('show patch')),
> -    ('',  'git', None, _('use git extended diff format')),
> +    ('g', 'git', None, _('use git extended diff format')),
>      ('l', 'limit', '', _('limit number of changes displayed')),
>      ('M', 'no-merges', None, _('do not show merges')),
>  ] + templateopts
> @@ -3388,7 +3388,7 @@
>      "tip":
>          (tip,
>           [('p', 'patch', None, _('show patch')),
> -          ('',  'git', None, _('use git extended diff format')),
> +          ('g', 'git', None, _('use git extended diff format')),
>           ] + templateopts,
>           _('[-p]')),
>      "unbundle":
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel



More information about the Mercurial-devel mailing list