Mercurial > hg-stable
changeset 44460:d543ef183eb8
merge with stable
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 05 Mar 2020 10:52:51 -0500 |
parents | 5a5aee8ba980 (current diff) 07b79569fdf8 (diff) |
children | 8cdd0b9629e3 |
files | hgext/histedit.py mercurial/cmdutil.py mercurial/commands.py setup.py |
diffstat | 9 files changed, 43 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgsigs Wed Mar 04 14:21:23 2020 -0500 +++ b/.hgsigs Thu Mar 05 10:52:51 2020 -0500 @@ -192,3 +192,4 @@ 84a0102c05c7852c8215ef6cf21d809927586b69 0 iQJEBAABCAAuFiEEK8zhT1xnJaouqK63ucncgkqlvdUFAl4nP/4QHHJhZkBkdXJpbjQyLmNvbQAKCRC5ydyCSqW91VaHD/93dVKKFMJtclNMIG2AK3yZjfQ3HaqIuK1CqOuZyVQmk5fbnLydbi5RjIQMkaYPSKjDz0OKlfzDYo6kQrZrZUzIxzPBOz8/NMRSHGAWqvzQMbQGjYILsqDQ+wbol9wk8IDoyFzIcB4gPED1U5kWVCBTEqRrYiGP4siiycXVO5334Q5zOrvcjze0ksufbKQhL6SEUovfLtpX+DW6Z841LmR53aquEH8iBGswHKRt4ukyvmXTQAgea4lWXZXj3DH6oZqe0yzg5ogF4vFaoIgZDpBh2LZKuh6gwJtvA9jsFj5HVOzYDcllkgpaOTV1g/xKPo1EkLpt0W0vd/4vnjSKNo0fmOTvZzI9vCCXLlRSUhoboY6AFHN7XtL9gYWI0rj81p/WrnnQQ7Iv2YHS1KCLr765HW6mjREwFMLD9RrLLDQ0DWIyNuGq8/yrqoruAhidEE9ifITnNh38wVISdiPxORj3onZkAn7VbOWQnlJtYkynlk2t3HnHWfduLGc2G0BkLvg4YfEDsZBA+ssr+TspkZ1dVAq8kf4JKNR01sfjBF6Fj1zRPkoexV40/pPiW55ikfOI9LRHxRiOUyndLviIBv1Mbm90PZ89lT4OTMejD8hhb4omlVxH3HFv4j7TozuPFO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jnpnt+RomtHxrkqQ9SSHYnEWb4YTHqs+J7lWbm3ErjF08hYOyMA9/VT47UAKw4XL4Ss/1Pr7YezdmwB4jn7dqvslNvTqRAUOzB/15YeCfbd23SL4YzGaKBs9ajkxFFeCNNpLQ8CRm3a7/K6qkYyfSUpgUX7xBmRQTvUgr3nVk1epH/kOKwryy94Z+nlHF0qEMEq+1QOa5yvt3Kkr4H03pOFbLhdpjID5IYP4rRQTKB9yOS3XWBCE63AQVc7uuaBGPMCSLaKRAFDUXWY7GzCqda88WeN5BFC5iHrQTYE1IQ5YaWu38QMsJt2HHVc27+BuLA==
--- a/.hgtags Wed Mar 04 14:21:23 2020 -0500 +++ b/.hgtags Thu Mar 05 10:52:51 2020 -0500 @@ -205,3 +205,4 @@ 84a0102c05c7852c8215ef6cf21d809927586b69 5.3rc0 e4344e463c0c888a2f437b78b5982ecdf3f6650a 5.3rc1 7f5410dfc8a64bb587d19637deb95d378fd1eb5c 5.3 +6d121acbb82e65fe4dd3c2318a1b61981b958492 5.3.1
--- a/hgext/histedit.py Wed Mar 04 14:21:23 2020 -0500 +++ b/hgext/histedit.py Thu Mar 05 10:52:51 2020 -0500 @@ -1645,7 +1645,7 @@ pass -def _chistedit(ui, repo, *freeargs, **opts): +def _chistedit(ui, repo, freeargs, opts): """interactively edit changeset history via a curses interface Provides a ncurses interface to histedit. Press ? in chistedit mode @@ -1717,8 +1717,8 @@ with repo.vfs(b'chistedit', b'w+') as fp: for r in rules: fp.write(r) - opts['commands'] = fp.name - return _texthistedit(ui, repo, *freeargs, **opts) + opts[b'commands'] = fp.name + return _texthistedit(ui, repo, freeargs, opts) except KeyboardInterrupt: pass return -1 @@ -1855,23 +1855,25 @@ for intentional "edit" command, but also for resolving unexpected conflicts). """ + opts = pycompat.byteskwargs(opts) + # kludge: _chistedit only works for starting an edit, not aborting # or continuing, so fall back to regular _texthistedit for those # operations. if ( ui.interface(b'histedit') == b'curses' - and _getgoal(pycompat.byteskwargs(opts)) == goalnew + and _getgoal(opts) == goalnew ): - return _chistedit(ui, repo, *freeargs, **opts) - return _texthistedit(ui, repo, *freeargs, **opts) - - -def _texthistedit(ui, repo, *freeargs, **opts): + return _chistedit(ui, repo, freeargs, opts) + return _texthistedit(ui, repo, freeargs, opts) + + +def _texthistedit(ui, repo, freeargs, opts): state = histeditstate(repo) with repo.wlock() as wlock, repo.lock() as lock: state.wlock = wlock state.lock = lock - _histedit(ui, repo, state, *freeargs, **opts) + _histedit(ui, repo, state, freeargs, opts) goalcontinue = b'continue' @@ -1952,8 +1954,7 @@ ) -def _histedit(ui, repo, state, *freeargs, **opts): - opts = pycompat.byteskwargs(opts) +def _histedit(ui, repo, state, freeargs, opts): fm = ui.formatter(b'histedit', opts) fm.startitem() goal = _getgoal(opts)
--- a/mercurial/cmdutil.py Wed Mar 04 14:21:23 2020 -0500 +++ b/mercurial/cmdutil.py Thu Mar 05 10:52:51 2020 -0500 @@ -961,7 +961,7 @@ raise error.UnknownCommand(cmd, allcmds) -def changebranch(ui, repo, revs, label): +def changebranch(ui, repo, revs, label, opts): """ Change the branch name of given revs to label """ with repo.wlock(), repo.lock(), repo.transaction(b'branches'): @@ -979,7 +979,11 @@ root = repo[roots.first()] rpb = {parent.branch() for parent in root.parents()} - if label not in rpb and label in repo.branchmap(): + if ( + not opts.get(b'force') + and label not in rpb + and label in repo.branchmap() + ): raise error.Abort(_(b"a branch of the same name already exists")) if repo.revs(b'obsolete() and %ld', revs):
--- a/mercurial/commands.py Wed Mar 04 14:21:23 2020 -0500 +++ b/mercurial/commands.py Thu Mar 05 10:52:51 2020 -0500 @@ -1340,7 +1340,7 @@ scmutil.checknewlabel(repo, label, b'branch') if revs: - return cmdutil.changebranch(ui, repo, revs, label) + return cmdutil.changebranch(ui, repo, revs, label, opts) if not opts.get(b'force') and label in repo.branchmap(): if label not in [p.branch() for p in repo[None].parents()]:
--- a/setup.py Wed Mar 04 14:21:23 2020 -0500 +++ b/setup.py Thu Mar 05 10:52:51 2020 -0500 @@ -665,7 +665,9 @@ # here no extension enabled, disabled() lists up everything code = ( 'import pprint; from mercurial import extensions; ' - 'pprint.pprint(extensions.disabled())' + 'ext = extensions.disabled();' + 'ext.pop("__index__", None);' + 'pprint.pprint(ext)' ) returncode, out, err = runcmd( [sys.executable, '-c', code], localhgenv()
--- a/tests/test-amend.t Wed Mar 04 14:21:23 2020 -0500 +++ b/tests/test-amend.t Thu Mar 05 10:52:51 2020 -0500 @@ -487,7 +487,7 @@ $ echo beta >> foo $ cat > $TESTTMP/touchy_editor.sh <<EOF > sleep 1 - > echo delta >> $TESTTMP/modify-during-amend/foo + > echo delta >> "$TESTTMP/modify-during-amend/foo" > sleep 1 > echo hi > "\$1" > sleep 1
--- a/tests/test-branch-change.t Wed Mar 04 14:21:23 2020 -0500 +++ b/tests/test-branch-change.t Thu Mar 05 10:52:51 2020 -0500 @@ -355,6 +355,13 @@ abort: a branch of the same name already exists [255] + $ hg branch -r . stable --force + changed branch on 1 changesets + $ hg branches + stable 34:d1c2addda4a2 + jkl 29:6bc1c6c2c9da (inactive) + ghi 28:2f1019bd29d2 (inactive) + Changing branch on public changeset $ hg phase -r . -p
--- a/tests/test-remotefilelog-prefetch.t Wed Mar 04 14:21:23 2020 -0500 +++ b/tests/test-remotefilelog-prefetch.t Thu Mar 05 10:52:51 2020 -0500 @@ -233,9 +233,18 @@ z2: not copying - file is not managed abort: no files to copy [255] + $ find $CACHEDIR -type f | sort +.. The following output line about files fetches is globed because it is +.. flaky, the core the test is checked when checking the cache dir, so +.. hopefully this flakyness is not hiding any actual bug. $ hg revert -a -r 1 || true - 3 files fetched over 1 fetches - (3 misses, 0.00% hit ratio) over * (glob) + ? files fetched over 1 fetches - (? misses, 0.00% hit ratio) over * (glob) abort: z2@109c3a557a73: not found in manifest! (?) + $ find $CACHEDIR -type f | sort + $TESTTMP/hgcache/master/11/f6ad8ec52a2984abaafd7c3b516503785c2072/ef95c5376f34698742fe34f315fd82136f8f68c0 + $TESTTMP/hgcache/master/39/5df8f7c51f007019cb30201c49e884b46b92fa/69a1b67522704ec122181c0890bd16e9d3e7516a + $TESTTMP/hgcache/master/95/cb0bfd2977c761298d9624e4b4d4c72a39974a/076f5e2225b3ff0400b98c92aa6cdf403ee24cca + $TESTTMP/hgcache/repos # warning when we have excess remotefilelog fetching