git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Added macro support to qgit

From
PRPavel Roskin <proski@gnu.org>
Date
Jun 23, 2006, 01:00 UTC
Message-ID
<1151024452.5205.46.camel@dv>
In-Reply-To
<e5bfff550606220704q568d8345o1420a0a3e29544e8@mail.gmail.com>
Hello, Marco!
On Thu, 2006-06-22 at 16:04 +0200, Marco Costalba wrote:
> I have pushed some patches that add macros to qgit.
> 
> From menu bar it is possible to  run a macro created by a fancy new
> dialog invoked by 'Macros->Setup macros...' menu.

I'm not sure they can be called macros. Macro is something consisting of several commands that are already implemented. So, a macro-assembler is a program that allows to combine several supported instructions into one macro. Macros in editors record actions already implemented by the editors. You may also want to read this: http://en.wikipedia.org/wiki/Macro

If I understand correctly, qgit doesn't do that. It calls external commands that are not implemented internally, and it doesn't aggregate anything. Then why not call them "external commands"?

The interface is quite confusing. I see 5 buttons on top, all of which are enabled, plus one button labeled as "...", three checkboxes, one single-line entry and one multiline entry. I have no I idea where to start. Should I click "new" or white something and then click "new"? And where's "Cancel"?.

That's what I have tried:

Enter "foo bar" in the multiline entry. Click "New" Enter "foobar" Click "New" Enter "abc" Select "foobar"

Now "Run external script" is selected and "foo bar" is gone! I believe user input should not be discarded without a warning.

I also tried something more meaningful. I create a "pull" macro as an external script "stg pull". It didn't work. Am I supposed to supply full path? Does it understand arguments? It the script supposed to be in a certain format? OK, stg is written in python, but how about cg-status, a shell script? It doesn't seen to work either.

I could make macros work when I entered the under "Insert commands to run". The output window looks nice. But I see no indication whether the script is running or it has finished. I don't see how to terminate the script "gently", an equivalent of Ctrl-C.

As far as I understand, the text entries should not be enabled at the same time. But it saw it happening when there were no macros at all. And if I delete all macros, "Insert commands to run" doesn't work at all.

What happens to the arguments qgit is asking for if a multiline entry is executed? I understand they are prepended to the first line. This is not quite logical. Wouldn't it be better to have a shell like notation for them?

I see the macros are saved in the qgit configuration for the user .qt/qgitrc, like this:

[Macro reset] commands=echo\nstg pull\necho 123\nsleep 5 patch_flags=9040 script_path=/home/proski/bin/cg-reset

Shouldn't only one of commands and script_path be saved? Whouldn't it be better to save meaningful boolean options instead of the opaque binary "patch_flags"

And what is "macro_name=New macro" in [General]?

I think I should write you what I would like to see in qgit, but that would be a separate e-mail.

-- 
Regards,
Pavel Roskin
Previous: Marco CostalbaNext: Marco Costalba
Message 2 of 4 in “Added macro support to qgit”
  1. Marco CostalbaJun 22, 2006
  2. Pavel RoskinJun 23, 2006
  3. Marco CostalbaJun 23, 2006
  4. Pavel RoskinJun 23, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.