summaryrefslogtreecommitdiff
path: root/lib/remote_branch_delete.tcl
AgeCommit message (Collapse)AuthorFilesLines
2016-10-03git-gui: fix incorrect use of Tcl append commandLibravatar Vasco Almeida1-1/+1
Fix wrong use of append command in strings marked for translation. According to Tcl/Tk Documentation [1], append varName ?value value value ...? appends all value arguments to the current value of variable varName. This means that append "[appname] ([reponame]): " [mc "File Viewer"] is setting a variable named "[appname] ([reponame]): " to the output of [mc "File Viewer"], rather than returning the concatenation of both expressions as one might expect. The format for some strings enables, for instance, a French translator to translate like "%s (%s) : Create Branch" (space before colon). Conversely, strings already translated will be marked as fuzzy and the translator must update them herself. For some cases, use alternative way for concatenation instead of using strcat procedure defined in git-gui.sh. Reference: 31bb1d1 ("git-gui: Paper bag fix missing translated strings", 2007-09-14) fixes the same issue slightly differently. [1] http://www.tcl.tk/man/tcl/TclCmd/append.htm Signed-off-by: Vasco Almeida <vascomalmeida@sapo.pt> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2011-02-13git-gui: always default to the last merged branch in remote deleteLibravatar Heiko Voigt1-1/+8
This is useful if you are directly working together with other developers pushing feature branches on a shared remote. You typically push feature branches to the remote so others can review. Once they are satisfied and the branch is merged into the main branch it needs to be deleted on the server. Since we did not yet have a preselected default branch in the remote delete dialog lets use the last merged branch if it is found on the server. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
2010-01-27git-gui: use themed tk widgets with Tk 8.5Libravatar Pat Thoyts1-25/+26
This patch enables the use of themed Tk widgets with Tk 8.5 and above. These make a significant difference on Windows in making the application appear native. On Windows and MacOSX ttk defaults to the native look as much as possible. On X11 the user may select a theme using the TkTheme XRDB resource class by adding an line to the .Xresources file. The set of installed theme names is available using the Tk command 'ttk::themes'. The default on X11 is similar to the current un-themed style - a kind of thin bordered motif look. A new git config variable 'gui.usettk' may be set to disable this if the user prefers the classic Tk look. Using Tk 8.4 will also avoid the use of themed widgets as these are only available since 8.5. Some support is included for Tk 8.6 features (themed spinbox and native font chooser for MacOSX and Windows). Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-12-05git gui: make current branch default in "remote delete branch" merge checkLibravatar Heiko Voigt1-1/+7
We already do the same when locally deleting a branch. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-08-10git-gui: remove warning when deleting correctly merged remote branchLibravatar Heiko Voigt1-7/+9
If the user wants to delete a remote branch and selects the correct "merged into" we should not warn that "Recovering deleted branches is difficult". For local branches we do the same already. Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2009-03-24git-gui: minor spelling fix and string factorisation.Libravatar Sam Hocevar1-3/+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-09-30git-gui: Avoid using the term URL when specifying repositoriesLibravatar Petr Baudis1-1/+1
Instead, 'Location' is used to label such inputs; in the Clone dialog, 'Source' and 'Target' are also introduced to further clarify the situation. The intent is to increase GUI consistency in the case location templates (upcoming) are used - then, other locators than URL may be used. Signed-off-by: Petr Baudis <petr.baudis@novartis.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2008-09-30git-gui: Clarify the Remote -> Delete... actionLibravatar Petr Baudis1-2/+2
Currently, it was not really clear what all does this perform. We rename "Delete..." to "Delete Branch..." (since this does not delete the remote as a whole) and relabel the window from "Delete Remote Branch" to "Delete Branch Remotely" (since the action also involves pushing the delete out). Signed-off-by: Petr Baudis <petr.baudis@novartis.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-13git-gui: add some strings to translationLibravatar Michele Ballabio1-2/+2
Most of these changes were suggested by Shawn Pearce in an answer to Johannes Schindelin. Some strings for the blame module were added too. [sp: Minor edits in blame module formatting] Signed-off-by: Michele Ballabio <barra_cuda@katamail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-09-02Mark strings for translation.Libravatar Christian Stimming1-22/+20
The procedure [mc ...] will translate the strings through msgcat. Strings must be enclosed in quotes, not in braces, because otherwise xgettext cannot extract them properly, although on the Tcl side both delimiters would work fine. [jes: I merged the later patches to that end.] Signed-off-by: Christian Stimming <stimming@tuhh.de> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
2007-07-09git-gui: Always use absolute path to all git executablesLibravatar Shawn O. Pearce1-1/+1
Rather than making the C library search for git every time we want to execute it we now search for the main git wrapper at startup, do symlink resolution, and then always use the absolute path that we found to execute the binary later on. This should save us some cycles, especially on stat challenged systems like Cygwin/Win32. While I was working on this change I also converted all of our existing pipes ([open "| git ..."]) to use two new pipe wrapper functions. These functions take additional options like --nice and --stderr which instructs Tcl to take special action, like running the underlying git program through `nice` (if available) or redirect stderr to stdout for capture in Tcl. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-07-04git-gui: Correct resizing of remote branch delete dialogLibravatar Shawn O. Pearce1-2/+2
The status field of the remote branch delete dialog was marked to expand, which meant that if the user grew the window vertically most of the new vertical height was given to the status field and not to the branch list. Since the status field is just a single line of text there is no reason for it to gain additional height, instead we should make sure all additional height goes to the branch list. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2007-06-11Merge branch 'maint'Libravatar Shawn O. Pearce1-1/+0
* maint: git-gui: Save geometry before the window layout is damaged git-gui: Give amend precedence to HEAD over MERGE_MSG
2007-05-28git-gui: Allow users to delete remote branchesLibravatar Shawn O. Pearce1-0/+348
Git has supported remote branch deletion for quite some time, but I've just never gotten around to supporting it in git-gui. Some workflows have users push short-term branches to some remote Git repository, then delete them a few days/weeks later when that topic has been fully merged into the main trunk. Typically in that style of workflow the user will want to remove the branches they created. We now offer a "Delete..." option in the Push menu, right below the generic "Push..." option. When the user opens our generic delete dialog they can select a preconfigured remote, or enter a random URL. We run `git ls-remote $url` to obtain the list of branches and tags known there, and offer this list in a listbox for the user to select one or more from. Like our local branch delete dialog we offer the user a way to filter their selected branch list down to only those branches that have been merged into another branch. This is a very common operation as the user will likely want to select a range of topic branches, but only delete them if they have been merged into some sort of common trunk. Unfortunately our remote merge base detection is not nearly as strict as the local branch version. We only offer remote heads as the test commit (not any local ones) and we require that all necessary commits to successfully run git-merge-base are available locally. If one or more is missing we suggest that the user run a fetch first. Since the Git remote protocol doesn't let us specify what the tested commit was when we evaluated our decision to execute the remote delete there is a race condition here. The user could do a merge test against the trunk, determine a topic branch was fully merged, but before they can start pushing the delete request another user could fast-forward the remote topic branch to a new commit that is not merged into the trunk. The delete will arrive after, and remove the topic, even though it was not fully merged. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>