[patch 4/4] Convert hgk to use the new hgit command names

Chris Mason mason at suse.com
Wed Sep 7 10:03:40 CDT 2005


# HG changeset patch
# User mason at suse.com
Convert hgk to use the new hgit command names

Index: crew/contrib/hgk
===================================================================
--- crew.orig/contrib/hgk	2005-09-07 13:07:20.000000000 +0000
+++ crew/contrib/hgk	2005-09-07 14:44:00.000000000 +0000
@@ -18,8 +18,8 @@ proc readfullcommits {rargs} {
     set curcommit {}
     set allcommitstate none
     set phase getcommits
-    if [catch {set commfd [open "|hgit rev-list -c $rargs" r]} err] {
-	puts stderr "Error executing hgit rev-list: $err"
+    if [catch {set commfd [open "|hg git-rev-list -c $rargs" r]} err] {
+	puts stderr "Error executing hg git-rev-list: $err"
 	exit 1
     }
     fconfigure $commfd -blocking 0
@@ -42,8 +42,8 @@ proc getcommitline {commfd}  {
 	}
 	if {[string range $err 0 4] == "usage"} {
 	    set err "\
-Gitk: error reading commits: bad arguments to hgit rev-list.\n\
-(Note: arguments to gitk are passed to hgit rev-list\
+Gitk: error reading commits: bad arguments to hg git-rev-list.\n\
+(Note: arguments to gitk are passed to hg git-rev-list\
 to allow selection of commits to be displayed.)"
 	} else {
 	    set err "Error reading commits: $err"
@@ -52,7 +52,7 @@ to allow selection of commits to be disp
 	exit 1
     }
     if {![regexp {^[0-9a-f]{40}$} $line]} {
-	error_popup "Can't parse hgit rev-tree output: {$line}"
+	error_popup "Can't parse hg git-rev-tree output: {$line}"
 	exit 1
     }
     lappend commits $line
@@ -147,8 +147,8 @@ proc getallcommitline {commfd}  {
 	}
 	if {[string range $err 0 4] == "usage"} {
 	    set err "\
-Gitk: error reading commits: bad arguments to hgit rev-list.\n\
-(Note: arguments to gitk are passed to hgit rev-list\
+Gitk: error reading commits: bad arguments to hg git-rev-list.\n\
+(Note: arguments to gitk are passed to hg git-rev-list\
 to allow selection of commits to be displayed.)"
 	} else {
 	    set err "Error reading commits: $err"
@@ -182,8 +182,8 @@ proc getcommits {rargs} {
     }
     set commits {}
     set phase getcommits
-    if [catch {set commfd [open "|hgit rev-list $rargs" r]} err] {
-	puts stderr "Error executing hgit rev-list: $err"
+    if [catch {set commfd [open "|hg git-rev-list $rargs" r]} err] {
+	puts stderr "Error executing hg git-rev-list: $err"
 	exit 1
     }
     fconfigure $commfd -blocking 0
@@ -208,7 +208,7 @@ proc readcommit {id} {
     }
     set parents($id) {}
     set nparents($id) 0
-    if [catch {set contents [exec hgit cat-file commit $id]}] return
+    if [catch {set contents [exec hg git-cat-file commit $id]}] return
     readonecommit $id $contents
 }
 
@@ -220,7 +220,7 @@ proc readrefs {} {
 	    set fd [open $f r]
 	    set line [read $fd]
 	    if {[regexp {^[0-9a-f]{40}} $line id]} {
-		set contents [split [exec hgit cat-file tag $id] "\n"]
+		set contents [split [exec hg git-cat-file tag $id] "\n"]
 		set obj {}
 		set type {}
 		set tag {}
@@ -1167,7 +1167,7 @@ proc gettreediffs {id} {
     set treepending $id
     set treediffs($id) {}
     set p [lindex $parents($id) 0]
-    if [catch {set gdtf [open "|hgit diff-tree -r $p $id" r]}] return
+    if [catch {set gdtf [open "|hg git-diff-tree -r $p $id" r]}] return
     fconfigure $gdtf -blocking 0
     fileevent $gdtf readable "gettreediffline $gdtf $id"
 }
@@ -1191,7 +1191,7 @@ proc getblobdiffs {id} {
     global diffindex difffilestart
     set p [lindex $parents($id) 0]
     set env(GIT_DIFF_OPTS) $diffopts
-    if [catch {set bdf [open "|hgit diff-tree -r -p $p $id" r]} err] {
+    if [catch {set bdf [open "|hg git-diff-tree -r -p $p $id" r]} err] {
 	puts "error getting diffs: $err"
 	return
     }

--


More information about the Mercurial mailing list