Pat Thoyts [Fri, 12 Mar 2010 18:31:47 +0000 (18:31 +0000)]
gitk: Avoid calling tk_setPalette on Windows
This just messes up the system colors. Leave them alone.
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Jonathan Nieder [Sat, 6 Mar 2010 22:58:42 +0000 (16:58 -0600)]
gitk: Don't clobber "Remember this view" setting
In the View → Edit View... dialog, the "Remember this view" option
always starts out unset. Using the dialog to change an existing view
and ignoring the parts of the dialog that aren’t relevant results in
both the old and new versions of the view being lost.
The cause: right after newviewopts($curview,perm) is set to an
appropriate value, decode_view_opts is clobbering it with the default
value. If that call is moved a little earlier, the "Remember this
view" option gets properly set to its previous value, fixing the
problem.
Reported-by: Steve Cotton <steve0001@s.cotton.clara.co.uk>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Jonathan Nieder [Sat, 6 Mar 2010 22:48:38 +0000 (16:48 -0600)]
gitk: Add comments to explain encode_view_opts and decode_view_opts
Summarize these functions to save the reader some time.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Mark Hills [Wed, 13 Jan 2010 20:40:22 +0000 (20:40 +0000)]
gitk: Use consistent font for all text input fields
Instead of setting the font for specific widgets, set the font for the
widget type. If themed widgets are not available, this is via the X
resources. If themed widgets are available, the theme font is used.
The exception is the SHA1 ID which is forced to use the fixed-width
font, even where themed widgets are used.
Signed-off-by: Mark Hills <mark@pogo.org.uk>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Mark Hills [Wed, 13 Jan 2010 20:40:20 +0000 (20:40 +0000)]
gitk: Set the font for all listbox widgets
This affects the font chooser.
Signed-off-by: Mark Hills <mark@pogo.org.uk>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Mark Hills [Wed, 13 Jan 2010 20:40:19 +0000 (20:40 +0000)]
gitk: Set the font for all spinbox widgets
Use the X resources to set the font, removing the need to set the font
for specific widgets.
Signed-off-by: Mark Hills <mark@pogo.org.uk>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Mark Hills [Wed, 13 Jan 2010 20:40:18 +0000 (20:40 +0000)]
gitk: Remove forced use of sans-serif font
The X resources set using uifont cover this case.
Signed-off-by: Mark Hills <mark@pogo.org.uk>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Jens Lehmann [Tue, 2 Feb 2010 22:11:28 +0000 (23:11 +0100)]
gitk: Add Ctrl-W shortcut for closing the active window
To make the user experience between git gui and gitk more homogeneous,
use Ctrl-W in gitk for closing the active window. When closing the
main window doquit is called for proper cleanup.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Wed, 3 Feb 2010 21:49:00 +0000 (08:49 +1100)]
gitk: Fix copyright symbol in About box message
Somehow it got corrupted in commit
d93f1713 ("gitk: Use themed tk
widgets").
Signed-off-by: Paul Mackerras <paulus@samba.org>
Christian Stimming [Fri, 29 Jan 2010 11:55:14 +0000 (22:55 +1100)]
gitk: Update German translation
Signed-off-by: Christian Stimming <stimming@tuhh.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Emmanuel Trillaud [Tue, 12 Jan 2010 13:02:50 +0000 (14:02 +0100)]
gitk: Add French translation
Signed-off-by: Emmanuel Trillaud <etrillaud@gmail.com>
Signed-off-by: Thomas Moulard <thomas.moulard@gmail.com>
Signed-off-by: Guy Brand <gb@unistra.fr>
Signed-off-by: Nicolas Sebrecht <nicolas.s.dev@gmx.fr>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Michele Ballabio [Fri, 29 Jan 2010 11:51:28 +0000 (22:51 +1100)]
gitk: update Italian translation
Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Peter Krefting [Fri, 29 Jan 2010 11:50:29 +0000 (22:50 +1100)]
gitk: Update Swedish translation
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Markus Heidelberg [Sat, 9 Jan 2010 22:11:12 +0000 (23:11 +0100)]
gitk: Adjust two equal strings which differed in whitespace
There were the two strings "SHA1 ID: " and "SHA1 ID:" as description
for the SHA1 search textbox. Change it to two equal strings, the
space is now outside of the translated string.
Furthermore the German translation wasn't unique, but "SHA1:" resp.
"SHA1-Hashwert:". The former was displayed after initialisation, the
latter after changes to the textbox, for example when clearing the text.
But it was too long to be displayed fully, so use a shorter translation.
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Kirill Smelkov [Tue, 5 Jan 2010 12:44:54 +0000 (15:44 +0300)]
gitk: Display submodule diffs with appropriate encoding
Previously, when submodule commit headings contained non-latin-1
characters, they were displayed incorrectly in gitk, because $line was
not properly decoded, for example:
----------------------------- Documentation/Dokko -----------------------------
Submodule Documentation/Dokko
2ca20c7..
0ea204d:
> Ð
\9fÑ
\80оÑ
\82околÑ
\8b Ñ
\81опÑ
\80Ñ
\8fжениÑ
\8f Ð
\98Ð
\9cС "Ð
\9cоÑ
\81Ñ
\82ик-21631" (Ð
\9bÐ
\982 и Сандал)
> hardware: докÑ
\83менÑ
\82аÑ
\86иÑ
\8f на InnoDisk SATA 10000
> hardware: докÑ
\83менÑ
\82аÑ
\86иÑ
\8f на IEI PCISA-6770E2 v3.0
> hardware: докÑ
\83менÑ
\82аÑ
\86иÑ
\8f на Fastwel NIB941
> hardware: докÑ
\83менÑ
\82аÑ
\86иÑ
\8f на IEI IPX-9S
> hardware: докÑ
\83менÑ
\82аÑ
\86иÑ
\8f на Hirschmann 5TX-EEC
instead of
----------------------------- Documentation/Dokko -----------------------------
Submodule Documentation/Dokko
2ca20c7..
0ea204d:
> Протоколы сопряжения ИМС "Мостик-21631" (ЛИ2 и Сандал)
> hardware: документация на InnoDisk SATA 10000
> hardware: документация на IEI PCISA-6770E2 v3.0
> hardware: документация на Fastwel NIB941
> hardware: документация на IEI IPX-9S
> hardware: документация на Hirschmann 5TX-EEC
This fixes it.
Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Dave Dulson [Sun, 3 Jan 2010 14:56:25 +0000 (14:56 +0000)]
gitk: Fix display of newly-created tags
If the user creates a tag with the "create tag" dialog in gitk and
then clicks on the newly-created tag, its contents don't get
displayed. The reason is that rereadrefs hasn't been called, meaning
the tag doesn't exist in $tagobjid. This causes the cat-file to fail.
Instead of using $tagobjid, pass the $tag directly, ensuring the tag
contents are populated correctly.
Signed-off-by: David Dulson <dave@dulson.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Dave Dulson [Sun, 3 Jan 2010 14:55:52 +0000 (14:55 +0000)]
gitk: Enable gitk to create tags with messages
Currently, tags created using the "create tag" dialog in gitk are
always lightweight tags, i.e., they don't have any annotation
(message). This enables the user to specify a message; if they do,
gitk will create an unsigned, annotated tag object.
Signed-off-by: David Dulson <dave@dulson.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Miklos Vajna [Mon, 14 Dec 2009 13:12:25 +0000 (14:12 +0100)]
gitk: Update Hungarian translation
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Laszlo Papp [Tue, 12 Jan 2010 10:40:41 +0000 (21:40 +1100)]
gitk: Add Hungarian translation
[Junio C Hamano <gitster@pobox.com>: Fix a couple of wrapped lines]
Signed-off-by: Laszlo Papp <djszapi@archlinux.us>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Christian Couder [Sat, 12 Dec 2009 04:52:39 +0000 (05:52 +0100)]
gitk: Add "--no-replace-objects" option
Replace refs are useful to change some git objects after they
have started to be shared between different repositories. One
might want to ignore them to see the original state, and
"--no-replace-objects" option can be used from the command
line to do so.
This option simply sets the GIT_NO_REPLACE_OBJECTS environment
variable, and that is enough to make gitk ignore replace refs.
The GIT_NO_REPLACE_OBJECTS is set to "1" instead of "" as it is
safer on some platforms, thanks to Johannes Sixt and Michael J
Gruber.
Tested-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Pat Thoyts [Sat, 14 Nov 2009 13:21:09 +0000 (13:21 +0000)]
gitk: Fix selection of tags
When a tag is clicked an error is raised due to a missing parameter in
a function call.
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Pat Thoyts [Fri, 6 Nov 2009 23:28:01 +0000 (23:28 +0000)]
gitk: Default to the system colours on Windows
Also convert a button to use the themed widget set.
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Sat, 14 Nov 2009 10:26:31 +0000 (21:26 +1100)]
gitk: Merge branch 'dev' into master
Signed-off-by: Paul Mackerras <paulus@samba.org>
Mizar [Sat, 14 Nov 2009 10:21:08 +0000 (21:21 +1100)]
gitk: Update Japanese translation
Signed-off-by: Paul Mackerras <paulus@samba.org>
Markus Heidelberg [Tue, 3 Nov 2009 23:21:41 +0000 (00:21 +0100)]
gitk: Fix "git gui blame" invocation when called from top-level directory
When run in the top-level directory of a git repository, "git
rev-parse --git-dir" doesn't return an absolute path, but merely
".git", so the selected file for "git gui blame" has a relative path.
The function make_relative then tries to make the already relative
path relative, which results in a path like "../../../../Makefile"
with as many ".." as there are elements of [pwd].
This regression was introduced by commit
9712b81 (gitk: Fix bugs in
blaming code, 2008-12-06), which fixed "git gui blame" when called from
subdirs.
This also fixes it for bare repositories.
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Sitaram Chamarty [Tue, 3 Nov 2009 16:00:12 +0000 (21:30 +0530)]
gitk: Disable checkout of remote branches
At the command line, trying to check out a remote branch gives you a
detailed warning message, but the gitk GUI currently allows it without
any fuss.
Since the GUI is often used by people much less familiar with git, it
seems reasonable to make the GUI more restrictive than the command line,
not less.
This prevents a lot of detached HEAD commits by new users.
Signed-off-by: Sitaram Chamarty <sitaramc@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Sat, 14 Nov 2009 10:15:01 +0000 (21:15 +1100)]
gitk: Improve appearance of radiobuttons and checkbuttons
Commit
5497f7a23ac11f9b230892220d5ed80263eedd1f ("gitk: Add configuration
for UI colour scheme") added a call to tk_setPalette at startup.
Unfortunately, tk_setPalette always chooses a dark red color for
the selectColor value if none is given explicitly, and this makes
checkbuttons and radiobuttons look rather bad.
This restores the previous appearance by specifying selectColor
explicitly. For light backgrounds we use white for selectColor, and
for dark backgrounds we use black. The formula and threshold for
distinguishing light from dark are the same as used in tk_setPalette
for choosing the foreground color.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Bernt Hansen [Mon, 2 Nov 2009 12:41:00 +0000 (07:41 -0500)]
gitk: Skip translation of "wrong Tcl version" message
We check the required Tcl version number before we setup msgcat for
language translation. If the Tcl version is too old just display the
untranslated error text.
The caller of show_error can now pass an alternative function for mc.
The Tcl list function turns the translation into a no-op.
This fixes the error:
Error in startup script: invalid command name "mc"
when attempting to start gitk with Tcl 8.3.
Tested with both Tcl 8.3 and 8.4.
Signed-off-by: Bernt Hansen <bernt@norang.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Mizar [Thu, 29 Oct 2009 16:22:26 +0000 (01:22 +0900)]
gitk: Add Japanese translation
Signed-off-by: Paul Mackerras <paulus@samba.org>
Jens Lehmann [Wed, 28 Oct 2009 11:40:45 +0000 (12:40 +0100)]
gitk: Use the --submodule option for displaying diffs when available
When displaying diffs in a submodule, this makes gitk display the
headlines of the commits being diffed, instead of just showing
not-quite-helpful SHA-1 pairs, if the underlying git installation
supports this. That makes it much easier to evaluate the changes, as
it eliminates the need to start a gitk inside the submodule and use
the superprojects hashes there to find out what the commits are about.
Since the --submodule option of git diff is new in git version 1.6.6,
this only uses the --submodule option when a git version of 1.6.6 or
higher is detected.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Jens Lehmann [Tue, 27 Oct 2009 17:13:42 +0000 (18:13 +0100)]
gitk: Fix diffing committed -> staged (typo in diffcmd)
When highlighting a commit, using the context menu over the staged changes
and then selecting "Diff this -> selected" the diff was empty. The same
happened when highlighting the staged changes and using "Diff selected ->
this" over a commit. The reason was a copy/paste error in [diffcmd].
This fixes it.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Guillermo S. Romero [Thu, 15 Oct 2009 16:51:49 +0000 (18:51 +0200)]
gitk: Add configuration for UI colour scheme
This adds an option to control the global colour scheme in the
Edit > Preferences dialog so that the whole interface can have
a non-default main colour.
Signed-off-by: Guillermo S. Romero <gsromero@infernal-iceberg.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Pat Thoyts [Tue, 15 Sep 2009 09:26:30 +0000 (10:26 +0100)]
gitk: Work around leftover temporary save file
If a file exists and is hidden on Windows the Tcl open command will
fail as the attributes provided in the CREAT call fail to match those
of the existing file. Forcing removal of the temporary file before we
begin solves any problems caused by previous failures to save the
application settings. An alternative would be to remove the hidden
attribute before calling 'open'.
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Thu, 10 Sep 2009 11:58:40 +0000 (21:58 +1000)]
gitk: Don't compare fake children when comparing commits
This fixes a bug where the compare-commits function would advance
to a fake node (one representing local changes, either checked in
but not committed, or not checked in) and then get an error when
trying to get the patch-id. This fixes it by only considering the
real children of each commit.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Mon, 7 Sep 2009 00:08:21 +0000 (10:08 +1000)]
gitk: Show diff of commits at end of compare-commits output
When comparing a string of commits, when we find two non-merge commits
that differ, we now write the two commits to files and diff the files.
This pulls out the logic for creating a temporary directory from
external_diff into a separate procedure so that the new diffcommits
procedure can use it.
Because the diff command returns an exit status of 1 when the files
differ, and Tcl treats that as an error, this adds catch {} around the
close statements in getblobdiffline.
At present this only removes the temporary files when gitk exits. It
should remove them when the diff is done.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Mon, 7 Sep 2009 00:08:21 +0000 (10:08 +1000)]
gitk: Show diff of commits at end of compare-commits output
When comparing a string of commits, when we find two non-merge commits
that differ, we now write the two commits to files and diff the files.
This pulls out the logic for creating a temporary directory from
external_diff into a separate procedure so that the new diffcommits
procedure can use it.
Because the diff command returns an exit status of 1 when the files
differ, and Tcl treats that as an error, this adds catch {} around the
close statements in getblobdiffline.
At present this only removes the temporary files when gitk exits. It
should remove them when the diff is done.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Sat, 5 Sep 2009 12:06:46 +0000 (22:06 +1000)]
gitk: Add a user preference to enable/disable use of themed widgets
Also move the hide-remotes option up into the commit display options
in the Edit->Preferences panel, since it affects the commit display
more than the diff display.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Sat, 5 Sep 2009 07:34:03 +0000 (17:34 +1000)]
Merge branch 'master' into dev
Peter Krefting [Fri, 10 Jul 2009 07:08:15 +0000 (08:08 +0100)]
gitk: Update Swedish translation (280t0f0u)
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Thomas Rast [Thu, 13 Aug 2009 07:25:03 +0000 (09:25 +0200)]
gitk: Parse arbitrary commit-ish in SHA1 field
We only accepted either SHA1s or heads/tags that have been read. This
meant the user could not, e.g., enter HEAD to go back to the current
commit.
This adds code to call out to git rev-parse --verify if all other
methods of interpreting the string the user entered fail.
(git-rev-parse alone is not enough as we really want a single
revision.)
The error paths change slighly, because we now know from the rev-parse
invocation whether the expression was valid at all. The previous
"unknown" path is now only triggered if the revision does exist, but
is not in the current view display.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Thomas Rast [Wed, 5 Aug 2009 21:15:36 +0000 (23:15 +0200)]
gitk: Fix direction of symmetric difference in optimized mode
ee66e08 (gitk: Make updates go faster, 2008-05-09) implemented an
optimized mode where gitk parses the arguments with rev-parse, and
manually reads history in chunks. As mentioned in the commit message,
symmetric differences are a problem there:
One wrinkle is that we have to turn symmetric diff arguments (of the
form a...b) back into symmetric diff form so that --left-right still
works, as git rev parse turns a...b into a b ^merge_base(a,b).
However, git-rev-parse returns a...b in the swapped order
b a ^merge_base(a,b)
This has been the case since at least
1f8115b (the state of master at
the time of the abovementioned
ee66e08; Merge branch 'maint',
2008-05-08). So gitk flipped the sides of symmetric differences
whenever it was in optimized mode.
Fix this by swapping the sides of the reconstruction code.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Thomas Rast [Mon, 3 Aug 2009 21:53:36 +0000 (23:53 +0200)]
gitk: New option to hide remote refs
In repositories with lots of remotes, looking at the history in gitk
can be borderline insane with all the red labels for remote refs.
Introduce a new option in the preferences that makes gitk ignore
remote refs entirely, so they don't take up space in the display.
Wished-for-by: Thell Fowler <tbfowler4@gmail.com>
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Johannes Sixt [Tue, 21 Jul 2009 08:09:48 +0000 (10:09 +0200)]
gitk: Do not hard-code "encoding" in attribute lookup functions
Commit
39ee47e (Clean up file encoding code and add enable/disable option,
2008-10-15) rewrote the attribute lookup functions gitattr and
cache_gitattr, but in the process hard-coded the attribute name "encoding"
instead of using the functions' parameters. This fixes it.
This is not a serious regression because currently all callers look only
for "encoding".
Further note that this fix assumes that future callers will not pass an
attribute name that contains regex special characters.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Markus Heidelberg [Sat, 23 May 2009 17:31:37 +0000 (19:31 +0200)]
gitk: Allow diff view without context lines
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Michele Ballabio [Sat, 23 May 2009 09:48:25 +0000 (11:48 +0200)]
gitk: Add another string to translation
Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Dirk Suesserott [Thu, 21 May 2009 13:35:40 +0000 (15:35 +0200)]
gitk: Add option 'Simple history' to the options menu
When clicked, the option --simplify-by-decoration is added to gitk/git log.
This yields to a simplified history where only decorated commits are shown,
i.e. those with a yellow tag or a green branch flag.
Signed-off-by: Dirk Suesserott <newsletter@dirk.my1.cc>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Pat Thoyts [Mon, 18 May 2009 21:46:01 +0000 (22:46 +0100)]
gitk: Handle msysGit version during version comparisons
msysGit generates version strings with text appended which cannot
be used with vcompare; trying to use them generates a Tcl error.
Limit git_version to the first three digits which are the real git
version to avoid this error.
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Elijah Newren [Mon, 23 Mar 2009 17:57:46 +0000 (11:57 -0600)]
gitk: Make more options easily accessible from Edit View dialog
Commit
218a900bd8efd0d49f8a0d9491aa4786a998d4f4 added a number of new
individual fields for the Edit View dialog to make them more accessible
to end users, while still allowing all options to be specified in the
"arguments to git log" field. This extends the dialog further, to
include refs, author, committer, commit message, and patch contents.
As before everything still remains accessible from the "arguments to
git log" input field.
Additionally, this provides hints for the format of the various input
fields (for example, listing some sample date strings in different
formats), and puts related query items into subsections to make it
easier to digest the number of options that exist.
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Sat, 16 May 2009 11:06:01 +0000 (21:06 +1000)]
gitk: Check git version before using --textconv flag
Commit
785b7535 ("gitk: use --textconv to generate diff text")
added the --textconv flag to the git diff commands used to
display commit diffs. Since some people use newer gitk with older
git installations, this adds a check on the git version to check
that it understands --textconv before using it.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Johannes Sixt [Tue, 28 Apr 2009 12:03:54 +0000 (14:03 +0200)]
gitk: Use --textconv to generate diff text
For the most part gitk's focus is on showing history and changes in
a human readable form. For this reason, it makes sense to generate
the patch text in the diff view using --textconv so that textconv
drivers are used if they are defined.
gitk can also generate patches, but we do not use --textconv because
such patches could not be applied.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Christian Stimming [Tue, 12 May 2009 20:20:23 +0000 (22:20 +0200)]
gitk: Update German translation.
Signed-off-by: Christian Stimming <stimming@tuhh.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Pat Thoyts [Tue, 12 May 2009 14:45:06 +0000 (15:45 +0100)]
gitk: Fix errors in the theme patch
This fixes a typo in the commit selection combobox that prevented it
from working properly, and sets the width of the widget. This also
fixes show_error to handle errors arising before the gui is fully
configured (ie: invalid command line parameters)
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Pat Thoyts [Fri, 17 Apr 2009 00:24:35 +0000 (01:24 +0100)]
gitk: Use themed tk widgets
With Tk 8.5+, this uses the themed widgets to improve the appearance
on Windows and MacOSX. On X11 less difference is apparent, but users
can select alternate themes by setting *TkTheme in the resource
database (eg: *TkTheme: clam).
With Tk 8.6 there is a built-in font selection dialog. This will make
use of that when available, as on Windows and MacOSX it calls the
native font selection dialog.
[paulus@samba.org - folded in subsequent patch to restore saved
pane sizes for ttk widgets, and trimmed trailing whitespace.]
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Thu, 30 Apr 2009 23:34:57 +0000 (09:34 +1000)]
Merge branch 'master' into dev
Alex Riesen [Mon, 27 Apr 2009 18:04:27 +0000 (20:04 +0200)]
gitk: Add Russian translation
Thanks go to Dmitry Potapov for proofreading and suggested translation
of the word 'merge'.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Tue, 21 Apr 2009 12:22:31 +0000 (22:22 +1000)]
gitk: Fix compare-commits function when we have local changes
This fixes a bug in the compare-commits function added in commit
010509f2 ("gitk: Add a command to compare two strings of commits")
where gitk would show an error dialog if the comparison of commits
got to a fake commit (one showing local changes). It extends
getpatchid to handle these fake commits by using [diffcmd] to get
the git diff command variant to use, and also handles the situation
where an error occurs.
Now that we can have the fake commit IDs showing up, which are
00..00 and 00..01, the short ID is ambiguous. To make sure the links
point to the right commit, this adds a new [appendshortlink] procedure
which takes the full link destination, and uses that rather than
appendwithlinks.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Pat Thoyts [Wed, 15 Apr 2009 16:14:03 +0000 (17:14 +0100)]
gitk: Avoid crash if closed while reading references
As recorded in msysGit issue 125, if the user closes gitk while it
reports itself as still reading references then Tk will crash in the
geometry management code. This has been fixed for Tk 8.5.7 and above.
This patch avoids the problem by flushing outstanding geometry events
before calling the readrefs procedure.
See also http://code.google.com/p/msysgit/issues/detail?id=125
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Pat Thoyts [Wed, 15 Apr 2009 15:54:19 +0000 (16:54 +0100)]
gitk: Handle external diff tool with spaces in the path
This fixes the launching of external diff to handle a diff tool
that has spaces in the path. This ensures a correctly formed
tcl list is passed to the open command with a single pipe character
prefixing the list (as per the tcl manual page for open).
The specific fault observed was that selecting WinMerge as the diff
tool from the default installed location in Program Files failed to
be launched from the context menu.
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Pat Thoyts [Tue, 14 Apr 2009 21:09:53 +0000 (22:09 +0100)]
gitk: Remember and restore the window state with the geometry
This records the window state in ~/.gitk. On startup, if the gitk
window was previously maximized (zoomed), then we restore that state.
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Michele Ballabio [Mon, 30 Mar 2009 12:55:21 +0000 (14:55 +0200)]
gitk: Map KP_Divide to focus the search box
Commit
97bed034 changed the behavior of the '/' key on the keyboard,
but the '/' on the keypad was left unused. They now both do the same
thing.
Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Michele Ballabio [Mon, 30 Mar 2009 19:17:25 +0000 (21:17 +0200)]
gitk: Mark some more strings for translation
Signed-off-by: Michele Ballabio <barra_cuda@katamail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Christian Stimming [Thu, 26 Mar 2009 20:13:45 +0000 (21:13 +0100)]
gitk: Mark forgotten string for translation
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Mon, 23 Mar 2009 10:37:51 +0000 (21:37 +1100)]
gitk: Make .gitk a hidden file under windows
This sets the hidden attribute on the ~/.gitk file so it doesn't
appear in the windows user profile.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Thu, 9 Apr 2009 12:10:20 +0000 (22:10 +1000)]
gitk: Add a command to compare two strings of commits
This adds a row context menu command to compare this commit and its
descendants with the marked commit and its descendants. The results
are shown in the bottom-left pane. Commits are compared by checking
whether their headlines are the same and their patches have the same
patch ID as generated by git patch-id.
Merges are ignored and skipped over (as long as they have one
descendant). If two commits have the same patch ID then the process
will continue and compare their descendants, as long as they both have
exactly one descendant. If either commit has 0 or 2 or more descendants,
the comparison stops there. There is currently a limit of 100
comparisons.
This can be useful for checking whether one string of commits is just
a rebased version of another string of commits. Mark the end of one
string (i.e. the oldest commit in the string) and invoke "Compare with
marked commit" on the end of the other string.
As this is implemented, the UI will be unresponsive while the results
are being generated. This should be fixed.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Wed, 8 Apr 2009 23:34:46 +0000 (09:34 +1000)]
gitk: Add a way to mark a commit, plus a "find descendant" command
This adds a context-menu command to put a mark on this commit. There
is at most one marked commit at any time, and it is indicated by a box
drawn around the headline. Once a commit is marked, two other
context-menu commands become available: one to select the marked commit,
and another to find the closest common descendant of this commit and
the marked commit.
The "find common descendant" command uses the displayed parent/child
relationships (i.e. the rewritten parent pointers produced by git log),
not the real parent/child relationships. Currently the UI will be
unresponsive while gitk is working out the nearest common descendant;
this should be improved in future.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Daniel A. Steffen [Mon, 23 Mar 2009 11:17:38 +0000 (12:17 +0100)]
gitk: Fixes for Mac OS X TkAqua
- middle button is B3 on TkAqua
- add horizontal mousehweel scrolling
- nicer default fonts
- use OSX-specific extdifftool
- remove quit menu item, call doquit on quit event
- move about & preferences menu items into apple menu
- don't set menu font
Signed-off-by: Daniel A. Steffen <das@users.sourceforge.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Stephen Boyd [Thu, 19 Mar 2009 08:54:18 +0000 (01:54 -0700)]
gitk: Provide a 32x32 window icon based on the git logo
This simply expands the 16x16 logo image to 32x32 and provides it as
an alternative icon image.
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Giuseppe Bilotta [Thu, 19 Mar 2009 08:54:17 +0000 (01:54 -0700)]
gitk: Provide a window icon if possible
Try to set up a 16x16 Tk photo image (based on the git logo) and use
it as window icon. The code is wrapped in a catch because it may fail
in earlier Tcl/Tk 8.4 releases that don't provide 'wm iconphoto'.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Stephen Boyd <bebarino@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Pat Thoyts [Mon, 16 Mar 2009 10:24:40 +0000 (10:24 +0000)]
gitk: Handle blobs containing a DOS end-of-file marker
If a patchset contains an EOF marker (Ctrl-Z) the blob diff terminates
at that point. This permits gitk to ignore the eof and continue to
display any subsequent blobs and also displays a sensible representation
of the eof char.
Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Sun, 1 Mar 2009 22:38:17 +0000 (09:38 +1100)]
gitk: Fix possible infinite loop and display corruption
This fixes an issue reported by Johannes Sixt on the git mailing list:
> This recipe sends gitk into an endless loop. In git.git do:
>
> cd t
> # remove chmod a+x A near the end of the file
> sed -i 's/chmod/: chmod/' t3400-rebase.sh
> sh t3400-rebase.sh --debug
> cd trash\ directory.t3400-rebase/
> gitk master modechange modechange@{1}
>
>
> I briefly see the history chart, but the dot that should be modechange@{1}
> is missing. One automatically selected commit is shown in the diff section
> below. But then the commit list is cleared and gitk goes into an infinite
> loop.
>
> Things work alright if either modechange@{1} is dropped, or the 'chmod'
> line is left unchanged, which is a bit strange.
>
> This is with git version 1.6.1.2.390.gba743
There were actually two problems. This recipe created a situation where
git log would output a child commit after its parent. This meant that
we called fix_reversal which called splitvarc, which should call modify_arc
to note the fact that it has modified the arc that it has just split. It
wasn't, which meant that displayorder and other variables got into an
inconsistent state (a commit appearing twice in displayorder).
This then meant that the targetrow/targetid logic in drawvisible thought
it need to redraw each time. That, together with the fact that drawvisible
called drawcommits which called drawvisible if a redraw was needed, led
to the infinite loop.
In fact drawvisible is now the only caller of drawcommits. Thus, the
start and end row arguments to drawcommits always encompass the whole
visible area, so drawcommits doesn't need to call drawvisible to redraw;
it just needs to clear the screen and draw what it's been asked to.
This fixes these two problems by adding a call to modify_arc in
splitvarc and by taking out the call to drawvisible in drawcommits.
It also removes an unrelated left-over debugging puts in external_blame.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Johannes Sixt [Thu, 18 Dec 2008 07:30:49 +0000 (08:30 +0100)]
gitk: Force the focus to the main window on Windows
On msysGit, the focus is first on the (Tk) console. This console is then
hidden, but keeps the focus. Work around that by forcing the focus onto
the gitk window.
This fixes msysGit issue 14. Diagnosed and originally fixed by
Johannes Schindelin.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Kevin Ballard [Thu, 18 Dec 2008 09:26:48 +0000 (01:26 -0800)]
gitk: Allow unbalanced quotes/braces in commit headers
When parsing commits, gitk treats the headers of the commit as tcl
lists. This causes errors if the header contains an unbalanced quote
or open brace. Splitting the line on spaces allows us to treat it as
a set of words instead of as a tcl list, which prevents errors.
Signed-off-by: Kevin Ballard <kevin@sb.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Christian Stimming [Sat, 6 Dec 2008 19:49:24 +0000 (20:49 +0100)]
gitk: Update German translation
Attached to avoid whitespace problems.
Regards,
Christian
From
282060ac531fee722142f9d39c4ff29570723cbb Mon Sep 17 00:00:00 2001
From: Christian Stimming <stimming@tuhh.de>
Date: Sat, 6 Dec 2008 20:47:15 +0100
Subject: [PATCH 2/2] gitk: Update German translation
Merged with most recent "make update-po" result.
Signed-off-by: Christian Stimming <stimming@tuhh.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Christian Stimming [Sat, 6 Dec 2008 19:48:30 +0000 (20:48 +0100)]
gitk: Mark forgotten strings (header sentence parts in color chooser) for translation
Signed-off-by: Paul Mackerras <paulus@samba.org>
Johannes Sixt [Wed, 3 Dec 2008 12:43:20 +0000 (13:43 +0100)]
gitk: Ensure that "Reset branch" menu entry is enabled
Consider this sequence of events:
1. Detach HEAD and fire up gitk
2. Call the context menu on some commit. Notice that the last menu entry
says "Detached HEAD: can't reset" and it is disabled.
3. Now checkout some regular branch (e.g. 'master') using the context menu.
4. Call the context menu again on some commit.
Previously, at this point the last menu entry said "Reset master branch
to here", but it was still disabled. With this fix it is now enabled again.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Johannes Sixt [Tue, 2 Dec 2008 20:42:16 +0000 (21:42 +0100)]
gitk: Use check-buttons' -text property instead of separate labels
Previously the check-buttons' labels in the Preferences were separate
widgets. This had the disadvantage that in order to toggle the
check-button with the mouse the check-box had to be clicked. With
this change the check-box can also be toggled by clicking the label.
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Giuseppe Bilotta [Tue, 2 Dec 2008 01:19:22 +0000 (02:19 +0100)]
gitk: Map / to focus the search box
The / key is often used to initiate searches (less, vim, some web
browsers). This changes the binding for the / (slash) key from 'find
next' to 'focus the search box' to follow this convention.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Sat, 6 Dec 2008 10:44:05 +0000 (21:44 +1100)]
gitk: Fix bugs in blaming code
The "show origin of this line" function wasn't working when gitk was
run in a subdirectory, since it passed the path relative to the
top-level directory to git blame. This fixes it by passing the
absolute path to the file instead of the relative path.
The same problem occurs when running git gui blame, except that
git gui blame appears not to be able to accept an absolute path to the
file, so we make a relative path using a new [make_relative] function.
Finally, this fixes a bug in [show_line_source] where we weren't
setting id, resulting in an error when trying to find the origin of
a line in the fake commit for local changes not checked in, when its
parent was a real commit (i.e. there were no changes checked in).
Signed-off-by: Paul Mackerras <paulus@samba.org>
Alexander Gavrilov [Thu, 13 Nov 2008 20:12:42 +0000 (23:12 +0300)]
gitk: Add a menu option to start git gui
Git gui already has menu commands to start gitk, and this makes the
relation symmetric.
[paulus@samba.org - changed "Git Gui" in the menu item to "git gui"]
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Alexander Gavrilov [Mon, 1 Dec 2008 17:30:09 +0000 (20:30 +0300)]
gitk: Make line origin search update the busy status
Currently the 'show origin of this line' feature does not update the
status field of the gitk window, so it is not evident that any
processing is going on. It may seem at first that clicking the item
had no effect.
This commit adds calls to set and clear the busy status with an
appropriate title, similar to other search commands.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Christian Stimming [Sat, 25 Oct 2008 11:25:35 +0000 (13:25 +0200)]
gitk: Update German translation
This takes into account the most recent po file merge.
Signed-off-by: Christian Stimming <stimming@tuhh.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Mon, 1 Dec 2008 22:17:46 +0000 (09:17 +1100)]
gitk: Fix bug in accessing undefined "notflag" variable
As pointed out by Johannes Sixt and Alexander Gavrilov, commit
2958228430b63f2e38c55519d1f98d8d6d9e23f3 ("gitk: Fix switch statement
in parseviewargs") exposed a latent bug in that $notflag was never
initialized. Since it isn't used either, this removes it entirely.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Mon, 1 Dec 2008 22:02:46 +0000 (09:02 +1100)]
gitk: Highlight only when search type is "containing:".
When the search type is "touching paths" or "adding/removing string",
it's not very useful to highlight instances of the search string in
the commit message, headline or author name, so this disables the
highlighting in those cases.
This was suggested by Mark Burton <markb@ordern.com>, but the
implementation is different to his patch, which tested $gdttype at
each place where $markingmatches was tested.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Sun, 23 Nov 2008 02:14:23 +0000 (13:14 +1100)]
gitk: Restore scrolling position of diff pane on back/forward in history
This arranges to save the scrolling position of the diff display pane
when we move from displaying one thing to another, and then scroll the
pane to the same position when we go back to the previous thing using
the back or forward buttons. This works if we have clicked on a commit
and are in patch display mode, or if we have clicked on a line or a tag,
or have done a diff between two commits with the context menu. It
doesn't currently restore the pane to where it was if is was displaying
a commit in tree display mode.
For future extensibility, addtohistory now takes an extra optional
argument which is a script to invoke when moving from this thing to
another. The script needs to return a list of pairs of variable name
and value. If we go back to this thing, the godo procedure will set
the named variables to the values given. At present that is just used
to store the $ctext scrolling position, but in future we will use it
to store the state of which directories are open in the file list pane.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Tue, 18 Nov 2008 10:40:32 +0000 (21:40 +1100)]
gitk: Fix context menu items for generating diffs when in tree mode
Currently, if you invoke the "diff this -> selected" or "diff selected
-> this" and gitk is in "Tree" mode rather than "Patch" mode, the
diff display pane will just show the header but not the actual diff,
unless gitk has done the diff before and thus has the list of files
that differ. This was because the logic in gettreediffline that
checked whether we had moved on to doing something else checked the
mode (Tree or Patch) before checking whether the ids we're diffing
had changed.
This fixes it. The new logic in gettreediffline is slightly hacky
and relies on the fact that the Tree/Patch mode only applies when
we're looking at a single commit, not at the diff between two commits.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Alexander Gavrilov [Thu, 13 Nov 2008 20:09:18 +0000 (23:09 +0300)]
gitk: Avoid handling the Return key twice in Add Branch
This reverts commit
63767d5fb8fe236d8fdeba44297ac925701b27a0.
A similar change was made as part of commit
76f15947af7, that added
bindings to all dialogs, and this duplication causes mkbrgo to be
called twice, the second time after the window has been destroyed.
As a result, an error window appears when the code tries to access
widgets.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Tue, 18 Nov 2008 08:54:14 +0000 (19:54 +1100)]
gitk: Show local changes properly when we have a path limit
Since gitk looks for the HEAD commit to attach the fake commits for
local changes to, we can miss out on seeing the fake commits if we
have a path limit and the HEAD commit doesn't alter any of the files
in the path limit.
This fixes it by running
git rev-list -1 $head -- $paths
if we have a path limit, and taking the result of that as the commit
to attach the fake commits to. This means that we can be attaching
the fake commits to a different commit in each view, so we use a new
$viewmainhead($view) for that.
This also fixes a buglet where updatecommits would only fix up the
fake commits if the HEAD changed since the last call to updatecommits,
whereas it should fix them up if the HEAD has changed since this view
was last created or updated.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Tue, 18 Nov 2008 08:44:20 +0000 (19:44 +1100)]
gitk: Fix switch statement in parseviewargs
In Tcl, a comment in a switch command where a pattern would be expected
doesn't do what one would expect, so this moves the comments inside the
actions. Doing that shows up an extra "-" which this also removes.
With this, --merge is now handled properly.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Thu, 13 Nov 2008 12:01:46 +0000 (23:01 +1100)]
gitk: Index line[hnd]tag arrays by id rather than row number
This simplifies things a bit and is better because ids are stable
but row numbers aren't. It also means we can avoid one [rowofcommit]
call.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Thu, 13 Nov 2008 11:39:00 +0000 (22:39 +1100)]
gitk: Fix linehtag undefined error with file highlighting
Occasionally gitk will throw a Tcl error complaining that linehtag(n)
is undefined when. It happens when the commit list is still growing
(e.g. when updating the commit list) and gitk is set to highlight
commits that affect certain file(s). What happens is that the changes
to the commit list set need_redisplay to indicate that the display
needs to be redrawn. That causes the next call to drawcommits to call
clear_display, which unsets iddrawn and thus ensures that readfhighlight
won't call bolden on any rows that have moved. However, it is possible
for readfhighlight to be called after the commit list has changed but
before drawcommits has run, meaning that readfhighlight will potentially
think that rows have been drawn when they haven't, because of the
change in the id -> row mapping (and the fact that iddrawn is indexed
by id but line[hnd]tag are indexed by row number).
This fixes it (and also optimizes things a little) by making bolden
and bolden_name check need_redisplay before doing anything. If
need_redisplay is set, then there is no point doing anything because
the whole display is about to get cleared and redrawn, and it avoids
looking up line[hn]tag using stale row numbers.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Alexander Gavrilov [Sun, 9 Nov 2008 15:06:07 +0000 (18:06 +0300)]
gitk: Fix commit encoding support
This commit fixes two problems with commit encodings:
1) git-log actually uses i18n.logoutputencoding to generate
its output, and falls back to i18n.commitencoding only
when that option is not set. Thus, gitk should use its
value to read the results, if available.
2) The readcommit function did not process encodings at all.
This led to randomly appearing misconverted commits if
the commit encoding differed from the current locale.
Now commit messages should be displayed correctly, except
when logoutputencoding is set to an encoding that cannot
represent charecters in the message. For example, it is
impossible to convert Japanese characters from Shift-JIS
to CP-1251 (although the reverse conversion works).
The reason for using git log to read the commit and then getting
Tcl to convert its output is that is essentially what happens in
the normal path through getcommitlines, hence there is less chance
for unintended differences in how commits are processed in
getcommitlines and do_readcommit.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Alexander Gavrilov [Tue, 11 Nov 2008 20:55:42 +0000 (23:55 +0300)]
gitk: Fix transient windows on Win32 and MacOS
Transient windows cause problems on these platforms:
- On Win32 the windows appear in the top left corner
of the screen. In order to fix it, this patch causes
them to be explicitly centered on their parents by
an idle handler.
- On MacOS with Tk 8.4 they appear without a title bar.
Since it is clearly unacceptable, this patch disables
transient on that platform.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Alexander Gavrilov [Sun, 9 Nov 2008 10:00:45 +0000 (13:00 +0300)]
gitk: Add accelerators to frequently used menu commands
This commit documents keyboard accelerators used for menu
commands in the menu, as it is usually done, and adds some
more, e.g. F4 to invoke Edit View (or New View if the current
view is the un-editable "All files" view).
The changes include a workaround for handling Shift-F4 on
systems where XKB binds special XF86_Switch_VT_* symbols
to Ctrl-Alt-F* combinations. Tk often receives these codes
when Shift-F* is pressed, so it is necessary to bind the
relevant actions to them as well.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Sun, 9 Nov 2008 11:05:50 +0000 (22:05 +1100)]
Merge branch 'dev'
Alexander Gavrilov [Sun, 2 Nov 2008 18:59:48 +0000 (21:59 +0300)]
gitk: Implement a user-friendly Edit View dialog
Originally gitk required the user to specify all limiting
options manually in the same field with the list of commits.
It is rather unfriendly for new users, who may not know
which options can be used, or, indeed, that it is possible
to specify them at all.
This commit modifies the dialog to present the most useful
options as individual fields. Note that options that may
be useful to an extent, but produce a severely broken view,
are deliberately not included.
It is still possible to specify options in the commit list
field, but when the dialog is reopened, they will be extracted
into their own separate fields.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Sat, 8 Nov 2008 10:37:09 +0000 (21:37 +1100)]
gitk: Improve cherry-pick error handling
This adds to the regexps that are used to work out what sort of error
we encountered in trying to do a cherry-pick so that it recognizes
some additional common error messages. It adds a confirmation dialog
when the error is a merge conflict so the user can choose whether or
not to run git citool. Finally, it arranges to update the display
after a cherry-pick failed so that any local changes made by the
cherry-pick become visible.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Alexander Gavrilov [Sun, 2 Nov 2008 18:59:47 +0000 (21:59 +0300)]
gitk: Make cherry-pick call git-citool on conflicts
Now that git-gui has facilities to help users resolve
conflicts, it makes sense to launch it from other GUI
tools when they happen.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Alexander Gavrilov [Sun, 2 Nov 2008 18:59:45 +0000 (21:59 +0300)]
gitk: Make gitk dialog windows transient
Transient windows are always kept above their parent, and don't occupy
any space in the taskbar, which is useful for dialogs. Also, when
transient is used, it is important to bind windows to the correct
parent.
This commit adds transient annotations to all dialogs, ensures usage
of the correct parent for error and confirmation popups, and, as a
side job, makes gitk preserve the create tag dialog window in case of
errors.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Alexander Gavrilov [Sun, 2 Nov 2008 18:59:44 +0000 (21:59 +0300)]
gitk: Add Return and Escape bindings to dialogs
It is often more convenient to dismiss or accept a dialog using the
keyboard, than by clicking buttons on the screen. This commit adds
key binding to make it possible with gitk's dialogs.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Tue, 4 Nov 2008 10:09:00 +0000 (21:09 +1100)]
gitk: Cope with unmerged files in local changes
This modifies gettreediffline so that it when we get both a "U" line
and an "M" line for the same file in the output from git diff-files
or git diff-index --cached (used when the user clicks on a fake commit)
we don't add the same filename to the treediff list twice.
This also makes getblobdiffline recognize the "* Unmerged path ..."
lines we get when we ask for the actual diffs, and makes a tiny
optimization in makediffhdr.
Signed-off-by: Paul Mackerras <paulus@samba.org>