summaryrefslogtreecommitdiff
path: root/lib/tools.tcl
AgeCommit message (Collapse)AuthorFilesLines
2016-10-03git-gui: support for $FILENAMES in tool definitionsLibravatar Alex Riesen1-0/+3
This adds a FILENAMES environment variable, which contains the repository pathnames of all selected files the list. The variable contains the names separated by LF (\n, \x0a). If the file names contain LF characters, the tool command might be unable to unambiguously split the value of $FILENAME into the separate names. Note that the file marked and diffed immediately after starting the GUI up, is not actually selected. One must click on it once to really select it. Signed-off-by: Alex Riesen <alexander.riesen@cetitec.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2011-10-21git-gui: include the file path in guitools confirmation dialogLibravatar Bert Wesarg1-2/+8
For those guitools that require a filename, display this filename when asking the user to confirm the tool launch. [PT: modified to use positional parameters for i18n] Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2009-03-24git-gui: minor spelling fix and string factorisation.Libravatar Sam Hocevar1-1/+1
Properly spell "successful" and slightly rewrite a couple of strings that actually say the same thing in order to reduce translation work. Update .pot and .po files accordingly since no new translation is required. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-11-16git-gui: Implement automatic rescan after Tool execution.Libravatar Alexander Gavrilov1-2/+42
The Tools menu is generally intended for commands that affect the working directory or repository state. Thus, the user would usually want to initiate rescan after execution of a tool. This commit implements it. In case somebody would want to avoid rescanning after certain tools, it also adds an option that controls it, although it is not made available through the Add dialog. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-11-16git-gui: Allow Tools request arguments from the user.Libravatar Alexander Gavrilov1-1/+12
While static commands are already useful, some tools need additional parameters to reach maximum usability. This commit adds support for passing them one revision name parameter, and one arbitrary string. With this addition, the tools menu becomes flexible enough to implement basic rebase support: [core] editor = kwrite [guitool "Rebase/Abort"] cmd = git rebase --abort confirm = yes [guitool "Rebase/Continue"] cmd = git rebase --continue [guitool "Rebase/Skip Commit"] cmd = git rebase --skip confirm = yes [guitool "Rebase/Start..."] cmd = git rebase $ARGS $REVISION $CUR_BRANCH title = Start Rebase prompt = Rebase Current Branch argprompt = Flags revprompt = New Base revunmerged = yes Some of the options, like title or prompt, are intentionally not included in the Add dialog to avoid clutter. Also, the dialog handles argprompt and revprompt as boolean vars. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-11-16git-gui: Add a Tools menu for arbitrary commands.Libravatar Alexander Gavrilov1-0/+108
Due to the emphasis on scriptability in the git design, it is impossible to provide 100% complete GUI. Currently unaccounted areas include git-svn and other source control system interfaces, TopGit, all custom scripts. This problem can be mitigated by providing basic customization capabilities in Git Gui. This commit adds a new Tools menu, which can be configured to contain items invoking arbitrary shell commands. The interface is powerful enough to allow calling both batch text programs like git-svn, and GUI editors. To support the latter use, the commands have access to the name of the currently selected file through the environment. Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>