changeset 5508:2dd399d8a992

Merge with -stable
author Bryan O'Sullivan <bos@serpentine.com>
date Mon, 05 Nov 2007 13:20:24 -0800
parents bb417470d62a (diff) bf2bb53e5d2b (current diff)
children 305b035c5fda 11d7908a3ea8
files
diffstat 9 files changed, 68 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/bash_completion	Fri Oct 26 16:43:13 2007 -0700
+++ b/contrib/bash_completion	Mon Nov 05 13:20:24 2007 -0800
@@ -305,6 +305,15 @@
     _hg_ext_mq_patchlist qunapplied
 }
 
+_hg_cmd_qgoto()
+{
+    if [[ "$prev" = @(-n|--name) ]]; then
+	_hg_ext_mq_queues
+	return
+    fi
+    _hg_ext_mq_patchlist qseries
+}
+
 _hg_cmd_qdelete()
 {
     local qcmd=qunapplied
--- a/contrib/hgk	Fri Oct 26 16:43:13 2007 -0700
+++ b/contrib/hgk	Mon Nov 05 13:20:24 2007 -0800
@@ -649,7 +649,7 @@
     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 @@
 	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 @@
     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"
--- a/hgext/convert/common.py	Fri Oct 26 16:43:13 2007 -0700
+++ b/hgext/convert/common.py	Mon Nov 05 13:20:24 2007 -0800
@@ -1,6 +1,7 @@
 # common code for the convert extension
 import base64
 import cPickle as pickle
+from mercurial import util
 
 def encodeargs(args):
     def encodearg(s):
@@ -15,6 +16,11 @@
     s = base64.decodestring(s)
     return pickle.loads(s)
 
+def checktool(exe, name=None):
+    name = name or exe
+    if not util.find_exe(exe):
+        raise util.Abort('cannot find required "%s" tool' % name)
+
 class NoRepo(Exception): pass
 
 SKIPREV = 'SKIP'
--- a/hgext/convert/cvs.py	Fri Oct 26 16:43:13 2007 -0700
+++ b/hgext/convert/cvs.py	Mon Nov 05 13:20:24 2007 -0800
@@ -3,7 +3,7 @@
 import os, locale, re, socket
 from mercurial import util
 
-from common import NoRepo, commit, converter_source
+from common import NoRepo, commit, converter_source, checktool
 
 class convert_cvs(converter_source):
     def __init__(self, ui, path, rev=None):
@@ -13,6 +13,9 @@
         if not os.path.exists(cvs):
             raise NoRepo("couldn't open CVS repo %s" % path)
 
+        for tool in ('cvsps', 'cvs'):
+            checktool(tool)
+
         self.changeset = {}
         self.files = {}
         self.tags = {}
--- a/hgext/convert/darcs.py	Fri Oct 26 16:43:13 2007 -0700
+++ b/hgext/convert/darcs.py	Mon Nov 05 13:20:24 2007 -0800
@@ -1,6 +1,6 @@
 # darcs support for the convert extension
 
-from common import NoRepo, commit, converter_source
+from common import NoRepo, commit, converter_source, checktool
 from mercurial.i18n import _
 from mercurial import util
 import os, shutil, tempfile
@@ -24,6 +24,8 @@
         if not os.path.exists(os.path.join(path, '_darcs', 'inventory')):
             raise NoRepo("couldn't open darcs repo %s" % path)
 
+        checktool('darcs')
+
         if ElementTree is None:
             raise util.Abort(_("Python ElementTree module is not available"))
 
--- a/hgext/convert/git.py	Fri Oct 26 16:43:13 2007 -0700
+++ b/hgext/convert/git.py	Mon Nov 05 13:20:24 2007 -0800
@@ -3,7 +3,7 @@
 import os
 from mercurial import util
 
-from common import NoRepo, commit, converter_source
+from common import NoRepo, commit, converter_source, checktool
 
 class convert_git(converter_source):
     # Windows does not support GIT_DIR= construct while other systems
@@ -31,6 +31,9 @@
             path += "/.git"
         if not os.path.exists(path + "/objects"):
             raise NoRepo("couldn't open GIT repo %s" % path)
+
+        checktool('git-rev-parse', 'git')
+
         self.path = path
 
     def getheads(self):
--- a/hgext/gpg.py	Fri Oct 26 16:43:13 2007 -0700
+++ b/hgext/gpg.py	Mon Nov 05 13:20:24 2007 -0800
@@ -249,7 +249,7 @@
     message = opts['message']
     if not message:
         message = "\n".join([_("Added signature for changeset %s")
-                             % hgnode.hex(n)
+                             % hgnode.short(n)
                              for n in nodes])
     try:
         repo.commit([".hgsigs"], message, opts['user'], opts['date'])
--- a/tests/test-execute-bit	Fri Oct 26 16:43:13 2007 -0700
+++ b/tests/test-execute-bit	Mon Nov 05 13:20:24 2007 -0800
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+"$TESTDIR/hghave" execbit || exit 80
+
 hg init
 echo a > a
 hg ci -d'0 0' -Am'not executable'
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-merge-types	Mon Nov 05 13:20:24 2007 -0800
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+hg init
+echo a > a
+hg ci -Amadd
+
+chmod +x a
+hg ci -mexecutable
+
+hg up 0
+rm a
+ln -s symlink a
+hg ci -msymlink
+
+hg merge
+
+echo % symlink is left parent, executable is right
+
+if [ -L a ]; then
+    echo a is a symlink
+    readlink a
+elif [ -x a ]; then
+    echo a is executable
+fi
+
+hg update -C 1
+hg merge
+
+echo % symlink is right parent, executable is left
+
+if [ -L a ]; then
+    echo a is a symlink
+    readlink a
+elif [ -x a ]; then
+    echo a is executable
+fi