diff --git a/hgext/record.py b/hgext/record.py --- a/hgext/record.py +++ b/hgext/record.py @@ -42,7 +42,8 @@ def record(ui, repo, *pats, **opts): 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:: diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -70,9 +70,9 @@ default = %s # 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 @@ default = %s # 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. diff --git a/mercurial/worker.py b/mercurial/worker.py --- a/mercurial/worker.py +++ b/mercurial/worker.py @@ -120,9 +120,12 @@ def _posixworker(ui, func, staticargs, a 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 @@ def _posixworker(ui, func, staticargs, a # 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: diff --git a/tests/test-hgrc.t b/tests/test-hgrc.t --- a/tests/test-hgrc.t +++ b/tests/test-hgrc.t @@ -35,9 +35,9 @@ Issue1199: Can't use '%' in hgrc (eg url # 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. diff --git a/tests/test-pull-http.t b/tests/test-pull-http.t --- a/tests/test-pull-http.t +++ b/tests/test-pull-http.t @@ -33,9 +33,9 @@ Cloning with a password in the URL shoul # 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. diff --git a/tests/test-qrecord.t b/tests/test-qrecord.t --- a/tests/test-qrecord.t +++ b/tests/test-qrecord.t @@ -39,9 +39,10 @@ help record (record) 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 diff --git a/tests/test-record.t b/tests/test-record.t --- a/tests/test-record.t +++ b/tests/test-record.t @@ -22,9 +22,10 @@ Record help 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 diff --git a/tests/test-revset-outgoing.t b/tests/test-revset-outgoing.t --- a/tests/test-revset-outgoing.t +++ b/tests/test-revset-outgoing.t @@ -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. diff --git a/tests/test-simple-update.t b/tests/test-simple-update.t --- a/tests/test-simple-update.t +++ b/tests/test-simple-update.t @@ -56,3 +56,38 @@ update to rev 0 with a date [255] $ cd .. + +update with worker processes + +#if no-windows + + $ cat < 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 <> .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 diff --git a/tests/test-subrepo-deep-nested-change.t b/tests/test-subrepo-deep-nested-change.t --- a/tests/test-subrepo-deep-nested-change.t +++ b/tests/test-subrepo-deep-nested-change.t @@ -134,9 +134,9 @@ Largefiles is NOT enabled in the clone i # 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 @@ The local repo enables largefiles if a l # 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. diff --git a/tests/test-url-rev.t b/tests/test-url-rev.t --- a/tests/test-url-rev.t +++ b/tests/test-url-rev.t @@ -48,9 +48,9 @@ Test basic functionality of url#rev synt # 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.