Things that could be better for GUIs

Bastian Doetsch bastian.doetsch at gmx.de
Sat Feb 28 06:18:21 CST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Am 28.02.2009 um 13:07 schrieb Dirkjan Ochtman:

> On 28/02/2009 11:40, Bastian Doetsch wrote:
>> Generally, I'm quite content how interfacing Mercurial works. There  
>> are
>> some issues though:
>
> Ah, I guess that you have different needs than THG/PIDA/CHG, since  
> you call us from the command line. Good to keep that in mind.

But the same as Netbeans and other IDEs that aren't written in  
Python :).

>
>
>> - - Authentication is a problem: Mercurial switches automatically to
>> non-interactive mode when not called in a terminal. Rather  
>> unfortunate
>> for hg sign, repository authentication and so on. Possible solution:
>> Provide means to pass user and password via command line.
>
> Would it be helpful if we added an --interactive global option that  
> keeps it from going into non-interactive mode?

Yes, it would enable everything in Mercurial that is inaccessible  
right now:

- - repo authentication
- - interactive commits (record)
- - interactive shelving (shelve/attic)
- - hg sign authentication

and probably a lot more :). Everything that is interactive in  
Mercurial right now can't be accessed when calling the Mercurial  
executable from Eclipse (or probably any other program).


>
>
>> - - When calling the Mercurial executable, big repositories get a  
>> huge
>> performance penality, as text transformation has to be done in  
>> Mercurial
>> (templates/styles) and in the calling program, as it needs to parse  
>> all
>> that information.
>
> Hmmm... Where is this an issue? log might be worst here, but I guess  
> you could do incremental log; I don't suppose you'd need all 7000  
> csets at once, or do you?

Actually, currently we already do it that way, but the conversions are  
the profiling hotspots nonetheless. And doing an incremental hg glog  
doesn't yield the same graph. If I had a wish for displaying a log  
graph in MercurialEclipse, it would be perfect to have topologically  
sorted output for the visualization :)).

>
>
>> - - Mercurial doesn't provide progress indications.
>
> This is something astratto has been working on, so at least it  
> should be getting better in the future, hopefully.

I hope so, too.

>
>
>> - - It's hard to determine, which options/commands are available
>> (parsing hg help is no fun...)
>
> I came up with this quick hack:
>
> diff -r e5627562b9f2 mercurial/commands.py
> --- a/mercurial/commands.py     Tue Feb 24 18:09:16 2009 +0100
> +++ b/mercurial/commands.py     Sat Feb 28 12:54:04 2009 +0100
> @@ -686,6 +686,12 @@
>     a = r.ancestor(lookup(rev1), lookup(rev2))
>     ui.write("%d:%s\n" % (r.rev(a), hex(a)))
>
> +def debugcommands(ui, repo, *args):
> +    for cmd, vals in util.sort(table.iteritems()):
> +        cmd = cmd.split('|')[0].strip('^')
> +        opts = ', '.join([i[1] for i in vals[1]])
> +        ui.write('%s: %s\n' % (cmd, opts))
> +
> def debugcomplete(ui, cmd='', **opts):
>     """returns the completion list associated with the given  
> command"""
>
> @@ -3129,6 +3135,7 @@
>          _('[OPTION]... [SOURCE]... DEST')),
>     "debugancestor": (debugancestor, [], _('[INDEX] REV1 REV2')),
>     "debugcheckstate": (debugcheckstate, []),
> +    "debugcommands": (debugcommands, []),
>     "debugcomplete":
>         (debugcomplete,
>          [('o', 'options', None, _('show the command options'))],
>
> I hope that would be acceptable for inclusion. Matt?

I would like it a lot and it would help us greatly for determining  
which Mercurial features / commands / options  are available for us.  
We need this information for choosing the right command, e.g. imerge  
or resolve, resolve --all, etc.

>
>
>> - - Rename tracking is not available in hg cat (if I find time to  
>> learn
>> enough python, I'll fix it myself).
>
> I can't really say anything about this, sorry.

It is a known issue (somewhere in the bts), but not too high on my  
priority list :).

Thanks for your work!
Bastian

>
>
> Cheers,
>
> Dirkjan
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAkmpK40ACgkQBqJW4lDO0YKWEQCfa9+PP5zt7ngUhPiZ8IYCzQac
5s0AnA5wRSnWwW2tSOtkksn0Krf3dgCR
=ye+s
-----END PGP SIGNATURE-----



More information about the Mercurial-devel mailing list