Commit Graph

67 Commits

Author SHA1 Message Date
Andrew Shadura
eb789f07b1 hgk: use hg export to write commits
Instead of calling internal command, use hg export to produce changeset
diffs compatible with hg import directly.
2014-03-15 18:27:51 +01:00
Andrew Shadura
7953c9bd23 hgk: add .diff extension when exporting commits
Append the .diff extension automatically.
2014-03-25 22:47:59 +01:00
Andrew Shadura
2aff9e16b0 hgk: enable selected patch text on Windows
Port a patch from gitk. Original description:

On windows, mouse input follows the keyboard focus, so to allow selecting
text from the patch canvas we must not shift focus back to the top level.
This change has no negative impact on X, so we don't explicitly test
for Win32 on this change. This provides similar selection capability
as already available using X-Windows.

Signed-off-by: Mark Levedahl <mdl123@verizon.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2014-03-15 15:44:51 +01:00
Andrew Shadura
3634ed2b59 hgk: ignore ctrl-z as EOF on windows
Port a patch from gitk. Original description:

Cygwin's Tcl is configured to honor any occurence of ctrl-z as an
end-of-file marker, while some commits in the git repository and possibly
elsewhere include that character in the commit comment. This causes gitk
ignore commit history following such a comment and incorrect graphs. This
change affects only Windows as Tcl on other platforms already has
eofchar == {}. This fixes problems noted by me and by Ray Lehtiniemi, and
the fix was suggested by Shawn Pierce.

Signed-off-by: Mark Levedahl <mdl123@verizon.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2014-03-15 15:33:50 +01:00
Andrew Shadura
e4287fe436 hgk: fix tag list parser (issue4101)
As tags may have embedded spaces, and "hg tags" command doesn't escape them,
the output of the command doesn't make a well-formed list, so we can't just
iterate over it. Instead, apply a simple regexp to transform it to a list
which we actually use. Line boundary matching should be enabled.
2013-12-01 13:53:24 -06:00
Mads Kiilerich
3f5dd3e256 codingstyle: remove trailing spaces in various text files
Better do it once than see random changes in diffs later.
2013-04-17 03:40:18 +02:00
Andrew Shadura
28d59c61fd hgk: remove regsub, split on \r instead
No need to regsub all \r\n's to \n's,
we can just split on \r as well; this may
produce extra empty elements in the list,
but they won't match anyway.
2012-10-16 22:44:14 +02:00
Andrew Shadura
5228b6acc2 hgk: simplify tags parser
As when hg tags is being called without -v option, it returns
lines with two elements in each, we can just interate them as
if it were a usual Tcl list using foreach and two variables.
Line endings and whitespace don't matter when doing so, so we
may keep them as is.

When we're processing the lines, tag variable is assigned a tag
name, and rev is a string in form of revision:hash which we can
split on colon. As Tcl8.4 lacks lassign command, and using lindex
makes code a bit less readable, we use foreach to iterate over
two-element list.
2012-10-16 22:41:44 +02:00
Andrew Shadura
95fa807adb hgk: in popups, replace labels with window titles
Replace labels with window titles.
That also requires to change grid placement manager settings
to compensate padding which used to be applied to now non-existent
labels.
2013-03-10 16:42:23 +01:00
Andrew Shadura
ee76b3a7be hgk: update backgroud colour when Ttk is available
Ttk doesn't automatically set up Tk colour palette.
Because of that, Ttk controls look differently when used
together with old Tk controls. When we use Ttk controls,
we first query if we have any setting for the client
background, and if we do, we update Tk palette as well.
2013-03-10 16:42:16 +01:00
Andrew Shadura
a995a530a6 hgk: fix pop-up windows
Create pop-up windows properly so they go to the floating layer in
tiling window managers.
2012-10-16 15:31:56 +02:00
Andrew Shadura
a8b0903f71 hgk: don't use fixed format for dates
Don't pass -format with a date format string,
use default instead so users can use their
own preferences.
2013-03-10 16:12:26 +01:00
Andrew Shadura
af656c838f hgk: reformat changsets fields
Rename Author to User.
Rename Revision to Changeset.
Put Date on its own line.
2013-03-10 16:07:57 +01:00
Andrew Shadura
7e6b0edec9 hgk: drop committer field from the UI
Remove Committer field, it doesn't make sense in Hg.
2012-10-16 15:07:41 +02:00
Andrew Shadura
ee874dbc29 hgk: support the old way of getting the current Ttk theme (issue3808)
It seems like the API has changed somewhere around 8.5.7, so the preferred way
of getting the current theme is now [ttk::style theme use], while the
deprecated (but still working) is $::ttk::currentTheme.
2013-02-05 12:58:21 +01:00
Andrew Shadura
9254f7ffef hgk: specify some colours explicitly in hex
Tk 8.6b3 uses web colours, where green is defined as #008000, not #00ff00, and grey
is #c0c0c0, not #808080, so specify those colours explicitly.
2012-11-07 14:49:44 +01:00
Andrew Shadura
460e1dc017 hgk: use Ttk instead of plain Tk
Use Ttk (themed Tk) for most of the widgets. Default to xpnative theme on
Windows, clam otherwise.

Provide a shim for Tk 8.4 without Tile/Ttk.
2012-10-16 14:54:51 +02:00
David Soria Parra
362bc7e128 hgk: display bookmark in commit diff window 2011-02-23 00:25:18 +01:00
David Soria Parra
9e74296485 hgk: display bookmarks as gray labels in the commitline 2011-02-23 00:25:01 +01:00
David Soria Parra
1e08f0a83e hgk: read bookmarks 2011-02-23 00:24:21 +01:00
Javi Merino
20536933b3 hgk: gitk->hgk in About... menu 2011-02-14 07:39:21 +00:00
Eduard-Cristian Stefan
2ad7399c8a hgk: remember main window position 2010-10-06 23:07:52 +03:00
Fabian Kreutz
a7bf3f1ac6 hgk: do not ignore ---/+++ lines in diff 2009-12-02 14:30:39 +02:00
Martin Geisler
ccfb3c24ba hgk: select first changeset at startup (issue1382) 2009-02-16 01:41:01 +01:00
Robert Bauck Hamar
d94956710e hgk: added explanation to .hgk for background colour 2009-02-09 19:00:55 +01:00
Robert Bauck Hamar
6faf5ed122 hgk: added colour settings for different colours in diff view 2009-02-09 19:00:52 +01:00
Robert Bauck Hamar
7831eedb92 hgk: added setting of foreground colour
Added the fgcolor setting read by hgk to change the text colour in the
diff output and the file list. The colours for diff highlighting
remains unchanged.
2009-02-09 19:00:48 +01:00
Robert Bauck Hamar
da9d5a5752 hgk: Add background colour setting
Adds the bgcolor config variable, that sets the background
colour of the text and canvas frames.
2009-02-07 18:46:13 +01:00
Michael Sommerville
3ce4deef7c hgk: Display branch name for each head (issue 740)
In the graphical view, each head is decorated with an additonal tag
containing the branch name, if that head is not on the default branch.
2008-09-15 23:39:11 +01:00
Patrick Mezard
0c0a818562 hgk: display orphan revisions content (issue 1041) 2008-03-23 18:52:02 +01:00
Dennis Schoen
ccbd3f1b72 hgk: don't exit if mercurial commands only print warnings 2008-01-16 11:50:24 +01:00
Thomas Arendsen Hein
deb94bc7fe Removed trailing spaces from everything except test output 2008-03-07 00:24:36 +01:00
Patrick Mezard
ba2d1c85b5 hgk: display branch name in diff header 2008-01-15 13:46:32 +01:00
Steve Borho
957c67ad44 hgk: add black and blue as preferred colors 2007-12-10 12:16:59 -06:00
bdowning@lavos.net
95bc1b9c93 hgk: change config file from .gitk to .hgk
Git's gitk and Mercurial's hgk have diverged enough that their configuration information is no longer entirely compatible.  Whenever I run one, the other gets reset to the default screen position.  This patch changes hgk to store and read its configuration from ".hgk" instead of ".gitk", so as not to conflict with the "real" gitk anymore.
2007-11-03 21:50:11 +01:00
Georg.Koltermann@mscsoftware.com
0e65b396d5 hgk: colorize commits by authors
Color commits by author. Colors will be assigned to authors by using a configurable list of colors. The line corresponding to current id (the version currently in the working tree) is highlighted in a special font which is also configurable. There is provision to assign fixed colors to authors. See .gitk comment for details.
2007-04-12 13:11:30 +02:00
TK Soh
630bf5e215 hgk: allow any extdiff command for visual diff 2007-10-08 11:18:34 +08:00
Patrick Mezard
0e612978e0 hgk: add basic usage and configuration documentation 2007-10-05 23:40:33 +02:00
Patrick Mezard
8dbf0b280f hgk: add context menu visual diff action
* * *
2007-10-02 23:28:04 +02:00
Patrick Mezard
510efc6c01 hgk: add debug-config command to pass configuration options 2007-10-05 22:39:36 +02:00
Patrick Mezard
671b107790 hgk: fix right-mouse button handling under macosx 2007-10-02 23:28:02 +02:00
Steve Borho
5a6d8a2860 hgk: add repo root to window title 2007-09-05 21:53:59 +02:00
Thomas Arendsen Hein
e34927453f Remove trailing spaces, fix indentation 2007-08-07 10:28:43 +02:00
Patrick Mezard
475f65528e hgk: enable mouse wheel under Windows.
For some reason, MouseWheel events are not routed under windows even in latest ActiveTcl 8.4.15 while they are under linux and macosx. These events are activated using code supplied with Tcl Tip 171: <http://www.tcl.tk/cgi-bin/tct/tip/171.html>. Strangely, the Tip code almost work but generates some unexpected infinite loop which is fixed using a simple boolean to check reentrancy.
2007-07-22 16:21:49 +02:00
Patrick Mezard
20a41666e1 hgk: enable mouse wheel on MouseWheel events.
At this point, mouse wheel still does not work under Windows.
2007-07-22 16:21:49 +02:00
Thomas Arendsen Hein
34b7fe0900 Make hgk handle filenames with spaces (issue49) 2007-07-01 19:15:25 +02:00
Thomas Arendsen Hein
03bf1f420d Use "--config ui.report_untrusted=false" for hg calls in hgk, fixes issue523.
tcl's exec yields an error if output to stderr happens and isn't redirected to
a file, so the warnings about untrusted .hg/hgrc caused problems in hgk.
The warning is still printed when executing 'hg view', so the user can see it
when using it from the shell.
2007-07-01 15:22:49 +02:00
Thomas Arendsen Hein
9270e4454c hgk: Use $HG instead of hg (see 9779a8c8d672) 2007-06-23 21:10:55 +02:00
TK Soh
490bbff9dc hgk: display tags that contain spaces 2007-06-04 09:16:53 -05:00
Bela Babik
6a77eec575 hgk: added -selectbackground grey to canvases 2007-06-04 16:54:52 +10:00