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

Re: [PATCH] git-gui: Correctly set up locators in case of preset URL variable

From
Shawn O. Pearce <spearce@spearce.org>
Date
Oct 10, 2008, 16:42 UTC
Message-ID
<20081010164255.GD29829@spearce.org>
In-Reply-To
<1223028826-10306-1-git-send-email-pasky@suse.cz>
Petr Baudis <pasky@suse.cz> wrote:
> This patch fixes locators setup in case the URL variable is already set,
> e.g. in the clone dialog during 'git gui clone'.
Huh.  Better, but Remote->Push... still crashes with your series:
can't read "push_url": no such variable
can't read "push_url": no such variable
    while executing
"set $urlvar"
    (procedure "location_input" line 26)
    invoked from within
"location_input $w.dest.url_t push_url push"
    (procedure "do_push_anywhere" line 53)
    invoked from within
"do_push_anywhere"
    invoked from within
".#mbar.#mbar#remote invoke active"
    ("uplevel" body line 1)
    invoked from within
"uplevel #0 [list $w invoke active]"
    (procedure "tk::MenuInvoke" line 50)
    invoked from within
"tk::MenuInvoke .#mbar.#mbar#remote 1"
    (command bound to event)
 
Show 22 quoted lines
> diff --git a/git-gui/lib/transport.tcl b/git-gui/lib/transport.tcl
> index 277e6b8..02c4eca 100644
> --- a/git-gui/lib/transport.tcl
> +++ b/git-gui/lib/transport.tcl
> @@ -68,8 +68,13 @@ proc location_input {widget urlvar op} {
>  
>  	global _locator_template _locator_input _locator_var
>  	trace remove variable _locator_input write locator_update
> -	set _locator_template $default_locator
> -	set _locator_input {}
> +	if {[set $urlvar] == {}} {
> +		set _locator_template $default_locator
> +		set _locator_input {}
> +	} else {
> +		set _locator_template "URL"
> +		set _locator_input [set $urlvar]
> +	}
>  	set _locator_var $urlvar
>  	trace add variable _locator_input write locator_update
>  
> -- 
> tg: (3c6c738..) t/git-gui/locator-preset (depends on: git-gui/locators t/git-gui/clonecmd)
-- 
Shawn.
Previous: Petr BaudisNext: Petr Baudis
Message 7 of 8 in “git-gui: Implement a 'clone' subcommand”
  1. git-gui: Implement a 'clone' subcommandPetr Baudis, Sep 30, 2008
  2. Shawn O. PearceSep 30, 2008
  3. Shawn O. PearceSep 30, 2008
  4. git-gui: Correctly set up locators in case of preset URL variablePetr Baudis, Oct 3, 2008
  5. H.Merijn BrandOct 3, 2008
  6. Petr BaudisOct 3, 2008
  7. Shawn O. PearceOct 10, 2008
  8. Petr BaudisOct 3, 2008

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.