[PATCH] hgk: change config file from .gitk to .hgk

Brian Downing bdowning at lavos.net
Wed Oct 24 05:02:14 UTC 2007


# HG changeset patch
# User bdowning at lavos.net
# Date 1193201860 18000
# Node ID 4d550672797dd1369b993e421958830b438412eb
# Parent  3aa5c45874c60560d75df74adbc964e107c8538a
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.

diff -r 3aa5c45874c6 -r 4d550672797d contrib/hgk
--- a/contrib/hgk	Sat Oct 20 03:04:34 2007 +0200
+++ b/contrib/hgk	Tue Oct 23 23:57:40 2007 -0500
@@ -649,7 +649,7 @@ proc savestuff {w} {
     if {$stuffsaved} return
     if {![winfo viewable .]} return
     catch {
-	set f [open "~/.gitk-new" w]
+	set f [open "~/.hgk-new" w]
 	puts $f [list set mainfont $mainfont]
 	puts $f [list set curidfont $curidfont]
 	puts $f [list set textfont $textfont]
@@ -687,7 +687,7 @@ proc savestuff {w} {
 	puts $f "#"
 	puts $f "set authorcolors {$authorcolors}"
 	close $f
-	file rename -force "~/.gitk-new" "~/.gitk"
+	file rename -force "~/.hgk-new" "~/.hgk"
     }
     set stuffsaved 1
 }
@@ -3847,7 +3847,7 @@ set authorcolors {
     deeppink mediumorchid blue burlywood4 goldenrod slateblue red2 navy dimgrey
 }
 
-catch {source ~/.gitk}
+catch {source ~/.hgk}
 
 if {$curidfont == ""} {  # initialize late based on current mainfont
     set curidfont "$mainfont bold italic underline"



More information about the Mercurial-devel mailing list