changeset 20829:9a09a625bc93

merge with stable
author Matt Mackall <mpm@selenic.com>
date Tue, 25 Mar 2014 16:17:16 -0500
parents 3210b7930899 (current diff) dd2e25e49862 (diff)
children 44e80bf2688f
files mercurial/dispatch.py mercurial/hg.py mercurial/revset.py
diffstat 4 files changed, 30 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dispatch.py	Mon Mar 24 20:00:18 2014 -0700
+++ b/mercurial/dispatch.py	Tue Mar 25 16:17:16 2014 -0500
@@ -108,13 +108,17 @@
 
             # if we are in HGPLAIN mode, then disable custom debugging
             debugger = ui.config("ui", "debugger")
+            debugmod = pdb
             if not debugger or ui.plain():
                 debugger = 'pdb'
-
-            try:
-                debugmod = __import__(debugger)
-            except ImportError:
-                debugmod = pdb
+            elif '--debugger' in req.args:
+                # This import can be slow for fancy debuggers, so only
+                # do it when absolutely necessary, i.e. when actual
+                # debugging has been requested
+                try:
+                    debugmod = __import__(debugger)
+                except ImportError:
+                    pass # Leave debugmod = pdb
 
             debugtrace[debugger] = debugmod.set_trace
             debugmortem[debugger] = debugmod.post_mortem
--- a/mercurial/hg.py	Mon Mar 24 20:00:18 2014 -0700
+++ b/mercurial/hg.py	Tue Mar 25 16:17:16 2014 -0500
@@ -230,8 +230,10 @@
                 dstvfs.mkdir(dstbase)
             if srcvfs.exists(f):
                 if f.endswith('data'):
+                    # 'dstbase' may be empty (e.g. revlog format 0)
+                    lockfile = os.path.join(dstbase, "lock")
                     # lock to avoid premature writing to the target
-                    destlock = lock.lock(dstvfs, dstbase + "/lock")
+                    destlock = lock.lock(dstvfs, lockfile)
                 hardlink, n = util.copyfiles(srcvfs.join(f), dstvfs.join(f),
                                              hardlink)
                 num += n
--- a/mercurial/revset.py	Mon Mar 24 20:00:18 2014 -0700
+++ b/mercurial/revset.py	Tue Mar 25 16:17:16 2014 -0500
@@ -1594,6 +1594,10 @@
 def tag(repo, subset, x):
     """``tag([name])``
     The specified tag by name, or all tagged revisions if no name is given.
+
+    If `name` starts with `re:`, the remainder of the name is treated as
+    a regular expression. To match a tag that actually starts with `re:`,
+    use the prefix `literal:`.
     """
     # i18n: "tag" is a keyword
     args = getargs(x, 0, 1, _("tag takes one or no arguments"))
--- a/tests/test-clone.t	Mon Mar 24 20:00:18 2014 -0700
+++ b/tests/test-clone.t	Tue Mar 25 16:17:16 2014 -0500
@@ -621,3 +621,17 @@
 #endif
 
   $ cd ..
+
+Test clone from the repository in (emulated) revlog format 0 (issue4203):
+
+  $ mkdir issue4203
+  $ mkdir -p src/.hg
+  $ echo foo > src/foo
+  $ hg -R src add src/foo
+  $ hg -R src commit -m '#0'
+  $ hg -R src log -q
+  0:e1bab28bca43
+  $ hg clone -U -q src dst
+  $ hg -R dst log -q
+  0:e1bab28bca43
+  $ cd ..