changeset 31119:13bbcd56c57a

merge with stable
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 28 Feb 2017 11:13:25 -0800
parents 6483e49204ee (current diff) a91c62752d08 (diff)
children c4e8fa2b1c40
files mercurial/ui.py mercurial/worker.py
diffstat 11 files changed, 84 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/record.py	Sun Nov 06 20:16:54 2016 +0100
+++ b/hgext/record.py	Tue Feb 28 11:13:25 2017 -0800
@@ -42,7 +42,8 @@
 
     See :hg:`help dates` for a list of formats valid for -d/--date.
 
-    You will be prompted for whether to record changes to each
+    If using the text interface (see :hg:`help config`),
+    you will be prompted for whether to record changes to each
     modified file, and for files with multiple changes, for each
     change to use. For each query, the following responses are
     possible::
--- a/mercurial/ui.py	Sun Nov 06 20:16:54 2016 +0100
+++ b/mercurial/ui.py	Tue Feb 28 11:13:25 2017 -0800
@@ -70,9 +70,9 @@
 # path aliases to other clones of this repo in URLs or filesystem paths
 # (see 'hg help config.paths' for more info)
 #
-# default-push = ssh://jdoe@example.net/hg/jdoes-fork
-# my-fork      = ssh://jdoe@example.net/hg/jdoes-fork
-# my-clone     = /home/jdoe/jdoes-clone
+# default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork
+# my-fork         = ssh://jdoe@example.net/hg/jdoes-fork
+# my-clone        = /home/jdoe/jdoes-clone
 
 [ui]
 # name and email (local to this repository, optional), e.g.
@@ -85,10 +85,10 @@
 # path aliases to other clones of this repo in URLs or filesystem paths
 # (see 'hg help config.paths' for more info)
 #
-# default      = http://example.com/hg/example-repo
-# default-push = ssh://jdoe@example.net/hg/jdoes-fork
-# my-fork      = ssh://jdoe@example.net/hg/jdoes-fork
-# my-clone     = /home/jdoe/jdoes-clone
+# default         = http://example.com/hg/example-repo
+# default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork
+# my-fork         = ssh://jdoe@example.net/hg/jdoes-fork
+# my-clone        = /home/jdoe/jdoes-clone
 
 [ui]
 # name and email (local to this repository, optional), e.g.
--- a/mercurial/worker.py	Sun Nov 06 20:16:54 2016 +0100
+++ b/mercurial/worker.py	Tue Feb 28 11:13:25 2017 -0800
@@ -120,9 +120,12 @@
                         break
                     else:
                         raise
-            if p:
-                pids.discard(p)
-                st = _exitstatus(st)
+            if not p:
+                # skip subsequent steps, because child process should
+                # be still running in this case
+                continue
+            pids.discard(p)
+            st = _exitstatus(st)
             if st and not problem[0]:
                 problem[0] = st
     def sigchldhandler(signum, frame):
@@ -145,12 +148,16 @@
             # may do some clean-ups which could cause surprises like deadlock.
             # see sshpeer.cleanup for example.
             try:
-                scmutil.callcatch(ui, workerfunc)
+                try:
+                    scmutil.callcatch(ui, workerfunc)
+                finally:
+                    ui.flush()
             except KeyboardInterrupt:
                 os._exit(255)
             except: # never return, therefore no re-raises
                 try:
                     ui.traceback()
+                    ui.flush()
                 finally:
                     os._exit(255)
             else:
--- a/tests/test-hgrc.t	Sun Nov 06 20:16:54 2016 +0100
+++ b/tests/test-hgrc.t	Tue Feb 28 11:13:25 2017 -0800
@@ -35,9 +35,9 @@
   # path aliases to other clones of this repo in URLs or filesystem paths
   # (see 'hg help config.paths' for more info)
   #
-  # default-push = ssh://jdoe@example.net/hg/jdoes-fork
-  # my-fork      = ssh://jdoe@example.net/hg/jdoes-fork
-  # my-clone     = /home/jdoe/jdoes-clone
+  # default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork
+  # my-fork         = ssh://jdoe@example.net/hg/jdoes-fork
+  # my-clone        = /home/jdoe/jdoes-clone
   
   [ui]
   # name and email (local to this repository, optional), e.g.
--- a/tests/test-pull-http.t	Sun Nov 06 20:16:54 2016 +0100
+++ b/tests/test-pull-http.t	Tue Feb 28 11:13:25 2017 -0800
@@ -33,9 +33,9 @@
   # path aliases to other clones of this repo in URLs or filesystem paths
   # (see 'hg help config.paths' for more info)
   #
-  # default-push = ssh://jdoe@example.net/hg/jdoes-fork
-  # my-fork      = ssh://jdoe@example.net/hg/jdoes-fork
-  # my-clone     = /home/jdoe/jdoes-clone
+  # default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork
+  # my-fork         = ssh://jdoe@example.net/hg/jdoes-fork
+  # my-clone        = /home/jdoe/jdoes-clone
   
   [ui]
   # name and email (local to this repository, optional), e.g.
--- a/tests/test-qrecord.t	Sun Nov 06 20:16:54 2016 +0100
+++ b/tests/test-qrecord.t	Tue Feb 28 11:13:25 2017 -0800
@@ -39,9 +39,10 @@
   
       See 'hg help dates' for a list of formats valid for -d/--date.
   
-      You will be prompted for whether to record changes to each modified file,
-      and for files with multiple changes, for each change to use. For each
-      query, the following responses are possible:
+      If using the text interface (see 'hg help config'), you will be prompted
+      for whether to record changes to each modified file, and for files with
+      multiple changes, for each change to use. For each query, the following
+      responses are possible:
   
         y - record this change
         n - skip this change
--- a/tests/test-record.t	Sun Nov 06 20:16:54 2016 +0100
+++ b/tests/test-record.t	Tue Feb 28 11:13:25 2017 -0800
@@ -22,9 +22,10 @@
   
       See 'hg help dates' for a list of formats valid for -d/--date.
   
-      You will be prompted for whether to record changes to each modified file,
-      and for files with multiple changes, for each change to use. For each
-      query, the following responses are possible:
+      If using the text interface (see 'hg help config'), you will be prompted
+      for whether to record changes to each modified file, and for files with
+      multiple changes, for each change to use. For each query, the following
+      responses are possible:
   
         y - record this change
         n - skip this change
--- a/tests/test-revset-outgoing.t	Sun Nov 06 20:16:54 2016 +0100
+++ b/tests/test-revset-outgoing.t	Tue Feb 28 11:13:25 2017 -0800
@@ -43,9 +43,9 @@
   # path aliases to other clones of this repo in URLs or filesystem paths
   # (see 'hg help config.paths' for more info)
   #
-  # default-push = ssh://jdoe@example.net/hg/jdoes-fork
-  # my-fork      = ssh://jdoe@example.net/hg/jdoes-fork
-  # my-clone     = /home/jdoe/jdoes-clone
+  # default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork
+  # my-fork         = ssh://jdoe@example.net/hg/jdoes-fork
+  # my-clone        = /home/jdoe/jdoes-clone
   
   [ui]
   # name and email (local to this repository, optional), e.g.
@@ -95,9 +95,9 @@
   # path aliases to other clones of this repo in URLs or filesystem paths
   # (see 'hg help config.paths' for more info)
   #
-  # default-push = ssh://jdoe@example.net/hg/jdoes-fork
-  # my-fork      = ssh://jdoe@example.net/hg/jdoes-fork
-  # my-clone     = /home/jdoe/jdoes-clone
+  # default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork
+  # my-fork         = ssh://jdoe@example.net/hg/jdoes-fork
+  # my-clone        = /home/jdoe/jdoes-clone
   
   [ui]
   # name and email (local to this repository, optional), e.g.
--- a/tests/test-simple-update.t	Sun Nov 06 20:16:54 2016 +0100
+++ b/tests/test-simple-update.t	Tue Feb 28 11:13:25 2017 -0800
@@ -56,3 +56,38 @@
   [255]
 
   $ cd ..
+
+update with worker processes
+
+#if no-windows
+
+  $ cat <<EOF > forceworker.py
+  > from mercurial import extensions, worker
+  > def nocost(orig, ui, costperop, nops):
+  >     return worker._numworkers(ui) > 1
+  > def uisetup(ui):
+  >     extensions.wrapfunction(worker, 'worthwhile', nocost)
+  > EOF
+
+  $ hg init worker
+  $ cd worker
+  $ cat <<EOF >> .hg/hgrc
+  > [extensions]
+  > forceworker = $TESTTMP/forceworker.py
+  > [worker]
+  > numcpus = 4
+  > EOF
+  $ for i in `python $TESTDIR/seq.py 1 100`; do
+  >   echo $i > $i
+  > done
+  $ hg ci -qAm 'add 100 files'
+
+  $ hg update null
+  0 files updated, 0 files merged, 100 files removed, 0 files unresolved
+  $ hg update -v | grep 100
+  getting 100
+  100 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+  $ cd ..
+
+#endif
--- a/tests/test-subrepo-deep-nested-change.t	Sun Nov 06 20:16:54 2016 +0100
+++ b/tests/test-subrepo-deep-nested-change.t	Tue Feb 28 11:13:25 2017 -0800
@@ -134,9 +134,9 @@
   # path aliases to other clones of this repo in URLs or filesystem paths
   # (see 'hg help config.paths' for more info)
   #
-  # default-push = ssh://jdoe@example.net/hg/jdoes-fork
-  # my-fork      = ssh://jdoe@example.net/hg/jdoes-fork
-  # my-clone     = /home/jdoe/jdoes-clone
+  # default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork
+  # my-fork         = ssh://jdoe@example.net/hg/jdoes-fork
+  # my-clone        = /home/jdoe/jdoes-clone
   
   [ui]
   # name and email (local to this repository, optional), e.g.
@@ -695,9 +695,9 @@
   # path aliases to other clones of this repo in URLs or filesystem paths
   # (see 'hg help config.paths' for more info)
   #
-  # default-push = ssh://jdoe@example.net/hg/jdoes-fork
-  # my-fork      = ssh://jdoe@example.net/hg/jdoes-fork
-  # my-clone     = /home/jdoe/jdoes-clone
+  # default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork
+  # my-fork         = ssh://jdoe@example.net/hg/jdoes-fork
+  # my-clone        = /home/jdoe/jdoes-clone
   
   [ui]
   # name and email (local to this repository, optional), e.g.
--- a/tests/test-url-rev.t	Sun Nov 06 20:16:54 2016 +0100
+++ b/tests/test-url-rev.t	Tue Feb 28 11:13:25 2017 -0800
@@ -48,9 +48,9 @@
   # path aliases to other clones of this repo in URLs or filesystem paths
   # (see 'hg help config.paths' for more info)
   #
-  # default-push = ssh://jdoe@example.net/hg/jdoes-fork
-  # my-fork      = ssh://jdoe@example.net/hg/jdoes-fork
-  # my-clone     = /home/jdoe/jdoes-clone
+  # default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork
+  # my-fork         = ssh://jdoe@example.net/hg/jdoes-fork
+  # my-clone        = /home/jdoe/jdoes-clone
   
   [ui]
   # name and email (local to this repository, optional), e.g.