mercurial@40471: 4 new changesets
4 new changesets in mercurial: https://www.mercurial-scm.org/repo/hg/rev/1f0c5c9a1765 changeset: 40468:1f0c5c9a1765 user:Boris Feld date:Thu Nov 01 14:29:14 2018 +0100 summary: test: drop usage of `HGMERGE` in `test-lfconvert.t` https://www.mercurial-scm.org/repo/hg/rev/f8154ddaaed3 changeset: 40469:f8154ddaaed3 user:Boris Feld date:Fri Oct 19 01:52:16 2018 +0200 summary: run-tests: explicitly declare the list of dropped environment variable https://www.mercurial-scm.org/repo/hg/rev/d6b6f1b441cf changeset: 40470:d6b6f1b441cf user:Boris Feld date:Thu Nov 01 14:29:21 2018 +0100 summary: run-tests: define the default merge tool through configuration https://www.mercurial-scm.org/repo/hg/rev/844a40687d83 changeset: 40471:844a40687d83 bookmark:@ tag: tip user:Boris Feld date:Thu Nov 01 14:35:18 2018 +0100 summary: test: remove changes preparing the drop of `HGMERGE` -- Repository URL: https://www.mercurial-scm.org/repo/hg ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
mercurial@40467: 7 new changesets
7 new changesets in mercurial: https://www.mercurial-scm.org/repo/hg/rev/c7618901584d changeset: 40461:c7618901584d user:Boris Feld date:Fri Oct 19 00:53:18 2018 +0200 summary: obsutil: prefetch method in allpredecessors loop https://www.mercurial-scm.org/repo/hg/rev/6e2a24550b7e changeset: 40462:6e2a24550b7e user:Boris Feld date:Fri Oct 19 01:07:08 2018 +0200 summary: obsolete: prefetch the repo.obsstore used in phasedivergence loop https://www.mercurial-scm.org/repo/hg/rev/cfa564037789 changeset: 40463:cfa564037789 user:Boris Feld date:Fri Apr 20 18:08:54 2018 +0200 summary: extensions: include current version in "invalid version" message https://www.mercurial-scm.org/repo/hg/rev/37e75be0b019 changeset: 40464:37e75be0b019 user:Boris Feld date:Wed Oct 31 18:43:56 2018 +0100 summary: tests: adjust merge tool config in test-largefiles-update.t https://www.mercurial-scm.org/repo/hg/rev/1736450cd1df changeset: 40465:1736450cd1df user:Boris Feld date:Wed Oct 31 19:12:32 2018 +0100 summary: test: also deactivate `ui.merge` when testing merge tool https://www.mercurial-scm.org/repo/hg/rev/b57f2734ac92 changeset: 40466:b57f2734ac92 user:Boris Feld date:Thu Nov 01 14:24:34 2018 +0100 summary: test: use the "correct" merge tool in `test-rebase-detach.t` https://www.mercurial-scm.org/repo/hg/rev/ee17af097257 changeset: 40467:ee17af097257 bookmark:@ tag: tip user:Boris Feld date:Thu Nov 01 14:26:30 2018 +0100 summary: test: drop usage of `HGMERGE` in `test-merge-types.t` -- Repository URL: https://www.mercurial-scm.org/repo/hg ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5209: statprof: add a couple of asserts to avoid storing unicodes
This revision was automatically updated to reflect the committed changes. Closed by commit rHG93501a5fd62b: statprof: add a couple of asserts to avoid storing unicodes (authored by durin42, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5209?vs=12364=12387 REVISION DETAIL https://phab.mercurial-scm.org/D5209 AFFECTED FILES mercurial/statprof.py CHANGE DETAILS diff --git a/mercurial/statprof.py b/mercurial/statprof.py --- a/mercurial/statprof.py +++ b/mercurial/statprof.py @@ -206,8 +206,10 @@ __slots__ = (u'path', u'lineno', u'function', u'source') def __init__(self, path, lineno, function): +assert isinstance(path, bytes) self.path = path self.lineno = lineno +assert isinstance(function, bytes) self.function = function self.source = None To: durin42, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5210: statprof: clean up unicode/bytes a little
This revision was automatically updated to reflect the committed changes. Closed by commit rHG8664fdc1cfb3: statprof: clean up unicode/bytes a little (authored by durin42, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5210?vs=12365=12386 REVISION DETAIL https://phab.mercurial-scm.org/D5210 AFFECTED FILES mercurial/statprof.py CHANGE DETAILS diff --git a/mercurial/statprof.py b/mercurial/statprof.py --- a/mercurial/statprof.py +++ b/mercurial/statprof.py @@ -238,7 +238,7 @@ lineno = self.lineno - 1 fp = None try: -fp = open(self.path) +fp = open(self.path, 'rb') for i, line in enumerate(fp): if i == lineno: self.source = line.strip() @@ -274,8 +274,10 @@ stack = [] while frame: -stack.append(CodeSite.get(frame.f_code.co_filename, frame.f_lineno, - frame.f_code.co_name)) +stack.append(CodeSite.get( +pycompat.sysbytes(frame.f_code.co_filename), +frame.f_lineno, +pycompat.sysbytes(frame.f_code.co_name))) frame = frame.f_back return Sample(stack, time) @@ -372,7 +374,7 @@ file.write("%d\0%s\n" % (time, '\0'.join(sites))) def load_data(path): -lines = open(path, 'r').read().splitlines() +lines = open(path, 'rb').read().splitlines() state.accumulated_time = [float(value) for value in lines[0].split()] state.samples = [] @@ -512,9 +514,9 @@ for stat in stats: site = stat.site -sitelabel = '%s:%d:%s' % (pycompat.fsencode(site.filename()), +sitelabel = '%s:%d:%s' % (site.filename(), site.lineno, - pycompat.sysbytes(site.function)) + site.function) fp.write(b'%6.2f %9.2f %9.2f %s\n' % ( stat.selfpercent(), stat.totalseconds(), stat.selfseconds(), sitelabel)) @@ -532,7 +534,7 @@ grouped = defaultdict(list) for stat in stats: -grouped[stat.site.filename() + r":" + stat.site.function].append(stat) +grouped[stat.site.filename() + b":" + stat.site.function].append(stat) # compute sums for each function functiondata = [] @@ -561,7 +563,7 @@ function[3], # total percent function[1], # total cum sec function[2], # total self sec -pycompat.sysbytes(function[0]))) # file:function +function[0])) # file:function function[4].sort(reverse=True, key=lambda i: i.selfseconds()) for stat in function[4]: @@ -696,7 +698,7 @@ ' %4.1f%% %s %s' liststring = listpattern % (node.count / root.count * 100, filename, function) -codepattern = '%' + str(55 - len(liststring)) + 's %s: %s' +codepattern = '%' + ('%d' % (55 - len(liststring))) + 's %d: %s' codestring = codepattern % ('line', site.lineno, site.getsource(30)) finalstring = liststring + codestring @@ -777,7 +779,10 @@ stack = [] for frame in sample.stack: -stack.append((frame.path, frame.lineno, frame.function)) +stack.append( +(pycompat.sysstr(frame.path), + frame.lineno, + pycompat.sysstr(frame.function))) samples.append((sample.time, stack)) To: durin42, #hg-reviewers Cc: yuja, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5094: merge-tools: when calling external merge tool, describe the resolve inputs
This revision was automatically updated to reflect the committed changes. Closed by commit rHG86dfae98a3a2: merge-tools: when calling external merge tool, describe the resolve inputs (authored by spectral, committed by ). CHANGED PRIOR TO COMMIT https://phab.mercurial-scm.org/D5094?vs=12369=12380#toc REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5094?vs=12369=12380 REVISION DETAIL https://phab.mercurial-scm.org/D5094 AFFECTED FILES mercurial/configitems.py mercurial/filemerge.py mercurial/help/config.txt tests/test-merge-tools.t CHANGE DETAILS diff --git a/tests/test-merge-tools.t b/tests/test-merge-tools.t --- a/tests/test-merge-tools.t +++ b/tests/test-merge-tools.t @@ -1946,6 +1946,25 @@ : 00 01 02 03 || $ hg merge --abort -q +Check that the extra information is printed correctly + + $ hg merge 9 \ + > --config merge-tools.testecho.executable='echo' \ + > --config merge-tools.testecho.args='merge runs here ...' \ + > --config merge-tools.testecho.binary=True \ + > --config ui.merge=testecho \ + > --config ui.pre-merge-tool-output-template='\n{label("extmerge.running_merge_tool", "Running merge tool for {path} ({toolpath}):")}\n{separate("\n", extmerge_section(local), extmerge_section(base), extmerge_section(other))}\n' \ + > --config 'templatealias.extmerge_section(sect)="- {pad("{sect.name} ({sect.label})", 20, left=True)}: {revset(sect.node)%"{rev}:{shortest(node,8)} {desc|firstline} {separate(" ", tags, bookmarks, branch)}"}"' + merging b + + Running merge tool for b (*/bin/echo): (glob) + - local (working copy): 10:2d1f533d add binary file (#2) tip default + - base (base): -1: default + -other (merge rev): 9:1e7ad7d7 add binary file (#1) default + merge runs here ... + 0 files updated, 1 files merged, 0 files removed, 0 files unresolved + (branch merge, don't forget to commit) + Check that debugpicktool examines which merge tool is chosen for specified file as expected diff --git a/mercurial/help/config.txt b/mercurial/help/config.txt --- a/mercurial/help/config.txt +++ b/mercurial/help/config.txt @@ -2296,6 +2296,16 @@ On Windows, this configuration option is ignored and the command aborted. +``pre-merge-tool-output-template`` +A template that is printed before executing an external merge tool. This can +be used to print out additional context that might be useful to have during +the conflict resolution, such as the description of the various commits +involved or bookmarks/tags. + +Additional information is available in the ``local`, ``base``, and ``other`` +dicts. For example: ``{local.label}``, ``{base.name}``, or +``{other.islink}``. + ``quiet`` Reduce the amount of output printed. (default: False) diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py --- a/mercurial/filemerge.py +++ b/mercurial/filemerge.py @@ -13,7 +13,11 @@ import shutil from .i18n import _ -from .node import nullid, short +from .node import ( +hex, +nullid, +short, +) from . import ( encoding, @@ -27,6 +31,7 @@ tagmerge, templatekw, templater, +templateutil, util, ) @@ -536,6 +541,44 @@ raise error.InMemoryMergeConflictsError('in-memory merge does not support ' 'external merge tools') +def _describemerge(ui, repo, mynode, fcl, fcb, fco, env, toolpath, args): +tmpl = ui.config('ui', 'pre-merge-tool-output-template') +if not tmpl: +return + +mappingdict = templateutil.mappingdict +props = {'ctx': fcl.changectx(), + 'node': hex(mynode), + 'path': fcl.path(), + 'local': mappingdict({'ctx': fcl.changectx(), + 'fctx': fcl, + 'node': hex(mynode), + 'name': _('local'), + 'islink': 'l' in fcl.flags(), + 'label': env['HG_MY_LABEL']}), + 'base': mappingdict({'ctx': fcb.changectx(), + 'fctx': fcb, + 'name': _('base'), + 'islink': 'l' in fcb.flags(), + 'label': env['HG_BASE_LABEL']}), + 'other': mappingdict({'ctx': fco.changectx(), + 'fctx': fco, + 'name': _('other'), + 'islink': 'l' in fco.flags(), + 'label': env['HG_OTHER_LABEL']}), + 'toolpath': toolpath, + 'toolargs': args} + +# TODO: make all of this something that can be specified on a per-tool basis +tmpl = templater.unquotestring(tmpl) + +# Not using cmdutil.rendertemplate here since it causes errors
D5208: tests: add some helpful `|| cat` bits to test-profile.t
This revision was automatically updated to reflect the committed changes. Closed by commit rHG4e6ffcb5b9fc: tests: add some helpful `|| cat` bits to test-profile.t (authored by durin42, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5208?vs=12363=12385 REVISION DETAIL https://phab.mercurial-scm.org/D5208 AFFECTED FILES tests/test-profile.t CHANGE DETAILS diff --git a/tests/test-profile.t b/tests/test-profile.t --- a/tests/test-profile.t +++ b/tests/test-profile.t @@ -86,22 +86,22 @@ Various statprof formatters work - $ hg --profile --config profiling.statformat=byline sleep 2>../out + $ hg --profile --config profiling.statformat=byline sleep 2>../out || cat ../out $ head -n 3 ../out % cumulative self timeseconds seconds name * sleepext.py:*:sleep (glob) $ cat ../out | statprofran - $ hg --profile --config profiling.statformat=bymethod sleep 2>../out + $ hg --profile --config profiling.statformat=bymethod sleep 2>../out || cat ../out $ head -n 1 ../out % cumulative self $ cat ../out | statprofran - $ hg --profile --config profiling.statformat=hotpath sleep 2>../out + $ hg --profile --config profiling.statformat=hotpath sleep 2>../out || cat ../out $ cat ../out | statprofran - $ hg --profile --config profiling.statformat=json sleep 2>../out + $ hg --profile --config profiling.statformat=json sleep 2>../out || cat ../out $ cat ../out \[\[-?\d+.* (re) To: durin42, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5204: tests: add a critical flush() to run-tests.py to make output stable on py3
This revision was automatically updated to reflect the committed changes. Closed by commit rHG176c26a21123: tests: add a critical flush() to run-tests.py to make output stable on py3 (authored by durin42, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5204?vs=12359=12381 REVISION DETAIL https://phab.mercurial-scm.org/D5204 AFFECTED FILES tests/run-tests.py CHANGE DETAILS diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -482,6 +482,7 @@ parser.error('--with-hg must specify an executable hg script') if os.path.basename(options.with_hg) not in [b'hg', b'hg.exe']: sys.stderr.write('warning: --with-hg should specify an hg script\n') +sys.stderr.flush() if options.local: testdir = os.path.dirname(_bytespath(canonpath(sys.argv[0]))) reporootdir = os.path.dirname(testdir) To: durin42, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5207: tests: skip wireproto clientreactor tests on Python 3.6.0-3.6.3 inclusive
This revision was automatically updated to reflect the committed changes. Closed by commit rHG07b87ee2ea75: tests: skip wireproto clientreactor tests on Python 3.6.0-3.6.3 inclusive (authored by durin42, committed by ). CHANGED PRIOR TO COMMIT https://phab.mercurial-scm.org/D5207?vs=12362=12384#toc REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5207?vs=12362=12384 REVISION DETAIL https://phab.mercurial-scm.org/D5207 AFFECTED FILES tests/test-wireproto-clientreactor.py CHANGE DETAILS diff --git a/tests/test-wireproto-clientreactor.py b/tests/test-wireproto-clientreactor.py --- a/tests/test-wireproto-clientreactor.py +++ b/tests/test-wireproto-clientreactor.py @@ -1,5 +1,6 @@ from __future__ import absolute_import +import sys import unittest import zlib @@ -600,5 +601,10 @@ self.assertEqual(meta[b'data'], response2) if __name__ == '__main__': +if (3, 6, 0) <= sys.version_info <= (3, 6, 3): +# Python 3.6.0 through 3.6.3 inclusive shipped with +# https://bugs.python.org/issue31825 and we can't run these +# tests on those specific versions of Python. Sigh. +sys.exit(80) import silenttestrunner silenttestrunner.main(__name__) To: durin42, #hg-reviewers Cc: yuja, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5206: contrib: tweak import-checker to always use bytes for module names
This revision was automatically updated to reflect the committed changes. Closed by commit rHG90517fad4293: contrib: tweak import-checker to always use bytes for module names (authored by durin42, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5206?vs=12361=12383 REVISION DETAIL https://phab.mercurial-scm.org/D5206 AFFECTED FILES contrib/import-checker.py CHANGE DETAILS diff --git a/contrib/import-checker.py b/contrib/import-checker.py --- a/contrib/import-checker.py +++ b/contrib/import-checker.py @@ -696,7 +696,7 @@ if py or f.endswith('.t'): with open(f, 'rb') as src: for script, modname, t, line in embedded(f, modname, src): -yield script, modname, t, line +yield script, modname.encode('utf8'), t, line def main(argv): if len(argv) < 2 or (argv[1] == '-' and len(argv) > 2): To: durin42, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5205: contrib: fix import-checker to not b'' module names on Python 3
This revision was automatically updated to reflect the committed changes. Closed by commit rHG99d5424eedc8: contrib: fix import-checker to not b module names on Python 3 (authored by durin42, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5205?vs=12360=12382 REVISION DETAIL https://phab.mercurial-scm.org/D5205 AFFECTED FILES contrib/import-checker.py CHANGE DETAILS diff --git a/contrib/import-checker.py b/contrib/import-checker.py --- a/contrib/import-checker.py +++ b/contrib/import-checker.py @@ -674,6 +674,8 @@ # "starts" is "line number" (1-origin), but embedded() is # expected to return "line offset" (0-origin). Therefore, this # yields "starts - 1". +if not isinstance(modname, str): +modname = modname.decode('utf8') yield code, "%s[%d]" % (modname, starts), name, starts - 1 def sources(f, modname): To: durin42, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5199: test: fix self._testdir to use ues the right mercurial library during testing
yuja added a comment. > - a/tests/run-tests.py +++ b/tests/run-tests.py @@ -2527,13 +2527,14 @@ os.umask(oldmask) > > def _run(self, testdescs): +testdir = getcwdb() > self._testdir = osenvironb[b'TESTDIR'] = getcwdb() Nit: maybe this line has to be removed. > 1. assume all tests in same folder for now if testdescs: pathname = os.path.dirname(testdescs[0]['path']) if pathname: > - osenvironb[b'TESTDIR'] = os.path.join(osenvironb[b'TESTDIR'], > - pathname) +testdir = os.path.join(testdir,pathname) + self._testdir = osenvironb[b'TESTDIR'] = testdir The idea sounds good, but test-run-tests.t failed. Can you investigate? REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5199 To: sangeet259, #hg-reviewers Cc: yuja, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: D5199: test: fix self._testdir to use ues the right mercurial library during testing
> --- a/tests/run-tests.py > +++ b/tests/run-tests.py > @@ -2527,13 +2527,14 @@ > os.umask(oldmask) > > def _run(self, testdescs): > +testdir = getcwdb() > self._testdir = osenvironb[b'TESTDIR'] = getcwdb() Nit: maybe this line has to be removed. > # assume all tests in same folder for now > if testdescs: > pathname = os.path.dirname(testdescs[0]['path']) > if pathname: > -osenvironb[b'TESTDIR'] = os.path.join(osenvironb[b'TESTDIR'], > - pathname) > +testdir = os.path.join(testdir,pathname) > +self._testdir = osenvironb[b'TESTDIR'] = testdir The idea sounds good, but test-run-tests.t failed. Can you investigate? ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5207: tests: skip wireproto clientreactor tests on Python 3.6.0-3.6.3 inclusive
yuja added a comment. > if __name__ == '__main__': > > +if (3, 6, 0) <= sys.version_info <= (3, 6, 3): > +# Python 3.6.0 through 3.6.3 inclusive shipped with > +# https://bugs.python.org/issue31825 and we can't run these > +# tests on those specific versions of Python. Sigh. > +sys.exit(0) Changed 0 to 80 to flag the test as skipped. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5207 To: durin42, #hg-reviewers Cc: yuja, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: D5207: tests: skip wireproto clientreactor tests on Python 3.6.0-3.6.3 inclusive
> if __name__ == '__main__': > +if (3, 6, 0) <= sys.version_info <= (3, 6, 3): > +# Python 3.6.0 through 3.6.3 inclusive shipped with > +# https://bugs.python.org/issue31825 and we can't run these > +# tests on those specific versions of Python. Sigh. > +sys.exit(0) Changed 0 to 80 to flag the test as skipped. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5200: fix: add a config to abort when a fixer tool fails
yuja added a comment. Looks good, but test-check-config.t failed probably because the doc couldn't be found by the checker. > @@ -464,9 +488,14 @@ > > showstderr(ui, fixctx.rev(), fixername, stderr) > if proc.returncode == 0: > newdata = newerdata > > - elif not stderr: > - showstderr(ui, fixctx.rev(), fixername, > - _('exited with status %d\n') % (proc.returncode,)) +else: + if not stderr: +message = _('exited with status %d\n') % (proc.returncode,) +showstderr(ui, fixctx.rev(), fixername, message) +checktoolfailureaction( + ui, _('no fixes will be applied'), + hint=_('use --config fix.failure=continue to apply any ' + 'successful fixes anyway')) This runs after fork(), but it should work as long as no user interaction is required. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5200 To: hooper, #hg-reviewers Cc: yuja, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: D5200: fix: add a config to abort when a fixer tool fails
Looks good, but test-check-config.t failed probably because the doc couldn't be found by the checker. > @@ -464,9 +488,14 @@ > showstderr(ui, fixctx.rev(), fixername, stderr) > if proc.returncode == 0: > newdata = newerdata > -elif not stderr: > -showstderr(ui, fixctx.rev(), fixername, > - _('exited with status %d\n') % (proc.returncode,)) > +else: > +if not stderr: > +message = _('exited with status %d\n') % > (proc.returncode,) > +showstderr(ui, fixctx.rev(), fixername, message) > +checktoolfailureaction( > +ui, _('no fixes will be applied'), > +hint=_('use --config fix.failure=continue to apply any ' > + 'successful fixes anyway')) This runs after fork(), but it should work as long as no user interaction is required. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5210: statprof: clean up unicode/bytes a little
yuja added a comment. Queued, thanks. > - sitelabel = '%s:%d:%s' % (pycompat.fsencode(site.filename()), + sitelabel = '%s:%d:%s' % (site.filename(), Maybe missing b'' ? > - pycompat.sysbytes(site.function)) + site.function) fp.write(b'%6.2f %9.2f %9.2f %s\n' % ( stat.selfpercent(), stat.totalseconds(), stat.selfseconds(), sitelabel)) REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5210 To: durin42, #hg-reviewers Cc: yuja, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: D5210: statprof: clean up unicode/bytes a little
Queued, thanks. > -sitelabel = '%s:%d:%s' % (pycompat.fsencode(site.filename()), > +sitelabel = '%s:%d:%s' % (site.filename(), Maybe missing b'' ? > - pycompat.sysbytes(site.function)) > + site.function) > fp.write(b'%6.2f %9.2f %9.2f %s\n' % ( > stat.selfpercent(), stat.totalseconds(), > stat.selfseconds(), sitelabel)) ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
mercurial@40460: 6 new changesets (2 on stable)
6 new changesets (2 on stable) in mercurial: https://www.mercurial-scm.org/repo/hg/rev/88702fd208ce changeset: 40455:88702fd208ce parent: 40443:909c31805f54 user:Yuya Nishihara date:Wed Oct 24 21:28:03 2018 +0900 summary: py3: convert revlog stats to a dict of (bytes, int) pairs https://www.mercurial-scm.org/repo/hg/rev/24cb8a6d4c20 changeset: 40456:24cb8a6d4c20 user:Yuya Nishihara date:Wed Oct 24 21:29:04 2018 +0900 summary: py3: do not stringify integers in revlog stats by '%s' https://www.mercurial-scm.org/repo/hg/rev/c2a0bc6412db changeset: 40457:c2a0bc6412db user:Danny Hooper date:Sat Oct 13 01:55:40 2018 -0700 summary: beautifygraph: don't substitute anything for 'X' in rendered graphs https://www.mercurial-scm.org/repo/hg/rev/8de8d4b0781c changeset: 40458:8de8d4b0781c branch: stable parent: 40454:a91a2837150b user:Augie Fackler date:Fri Nov 02 14:18:26 2018 -0400 summary: Added tag 4.8 for changeset a91a2837150b https://www.mercurial-scm.org/repo/hg/rev/5eaa5eb0db4e changeset: 40459:5eaa5eb0db4e branch: stable user:Augie Fackler date:Fri Nov 02 14:18:29 2018 -0400 summary: Added signature for changeset a91a2837150b https://www.mercurial-scm.org/repo/hg/rev/4fe63b573791 changeset: 40460:4fe63b573791 bookmark:@ tag: tip parent: 40457:c2a0bc6412db parent: 40459:5eaa5eb0db4e user:Augie Fackler date:Fri Nov 02 14:24:29 2018 -0400 summary: merge with stable -- Repository URL: https://www.mercurial-scm.org/repo/hg ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D4362: zsh_completion: complete merge tools for -t/--tool
av6 added projects: hg, hg-reviewers. av6 added a comment. Changing project tags, please ignore. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D4362 To: av6, #hg-reviewers, spectral Cc: spectral, mercurial-devel, namenlos, dsp, pulkit, durham, akushner ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5218: resolve: when resolve.mark-check=abort, downgrade to warning if pats specified
spectral added a comment. Note: This is meant for 'stable' REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5218 To: spectral, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5218: resolve: when resolve.mark-check=abort, downgrade to warning if pats specified
spectral created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Previously, with --config resolve.mark-check=abort, running `hg resolve -m foo` would abort and emit a message saying to use --all. This command does not work, though: `hg resolve -m foo --all`, and it's really weird for --all to be the "--force" flag. My original goal with the option was to make it so that `hg resolve -m` (no filename arguments) was safer, which is why --all is used; in my mind, `hg resolve -m foo` should always mark it as resolved, and `--all` is how you specify "all the files", so that's why I chose `hg resolve -m --all` as the way out of `hg resolve -m` aborting. This commit makes all of this work the way it was meant to in my head :) REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5218 AFFECTED FILES mercurial/commands.py tests/test-resolve.t CHANGE DETAILS diff --git a/tests/test-resolve.t b/tests/test-resolve.t --- a/tests/test-resolve.t +++ b/tests/test-resolve.t @@ -445,6 +445,19 @@ $ hg resolve -l R file1 R file2 +Test with marking an explicit file as resolved, this should not abort (since +there's no --force flag, we have no way of combining --all with a filename) + $ hg resolve --unmark + $ hg resolve -l + U file1 + U file2 +(This downgrades to a warning since an explicit file was specified). + $ hg --config commands.resolve.mark-check=abort resolve -m file2 + warning: the following files still have conflict markers: +file2 + $ hg resolve -l + U file1 + R file2 Testing the --re-merge flag $ hg resolve --unmark file1 $ hg resolve -l diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -4912,7 +4912,7 @@ if hasconflictmarkers: ui.warn(_('warning: the following files still have conflict ' 'markers:\n ') + '\n '.join(hasconflictmarkers) + '\n') -if markcheck == 'abort' and not all: +if markcheck == 'abort' and not all and not pats: raise error.Abort(_('conflict markers detected'), hint=_('use --all to mark anyway')) To: spectral, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
mercurial@40454: 3 new changesets (3 on stable)
3 new changesets (3 on stable) in mercurial: https://www.mercurial-scm.org/repo/hg/rev/683e99f0b30c changeset: 40452:683e99f0b30c branch: stable user:Anton Shestakov date:Fri Oct 19 22:09:53 2018 +0800 summary: relnotes: various tweaks for release notes https://www.mercurial-scm.org/repo/hg/rev/1bf3e6041e2c changeset: 40453:1bf3e6041e2c branch: stable user:Yuya Nishihara date:Fri Nov 02 21:25:35 2018 +0900 summary: tests: require SQLite 3.8.3+ as sqlitestore relies on "WITH" clause https://www.mercurial-scm.org/repo/hg/rev/a91a2837150b changeset: 40454:a91a2837150b branch: stable tag: tip user:Yuya Nishihara date:Sun Oct 28 21:16:36 2018 +0900 summary: rust: fix signature of rustlazyancestors_init() function -- Repository URL: https://www.mercurial-scm.org/repo/hg ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
mercurial@40451: new changeset (1 on stable)
New changeset (1 on stable) in mercurial: https://www.mercurial-scm.org/repo/hg/rev/324ba8b14d78 changeset: 40451:324ba8b14d78 branch: stable tag: tip user:Boris Feld date:Thu Nov 01 12:52:16 2018 +0100 summary: delta: skip "empty delta" optimisation for non-general case (issue6006) -- Repository URL: https://www.mercurial-scm.org/repo/hg ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5194: wireprotov2: add an extension to cache wireproto v2 responses in S3
sheehan abandoned this revision. sheehan added a comment. > Either way, we'll be deploying this to Mozilla's hg servers in the next few months and testing it out. Perhaps after it's been in production for some time we will have a stronger case for inclusion in core. :) Going to deploy and maintain this at Mozilla for the time being and consider moving into core at a later time. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5194 To: sheehan, #hg-reviewers Cc: martinvonz, indygreg, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH] relnotes: various tweaks for release notes
# HG changeset patch # User Anton Shestakov # Date 1539958193 -28800 # Fri Oct 19 22:09:53 2018 +0800 # Node ID 4db7723d4f4c9a90fe917787cc1afe7e3db74ee3 # Parent 8c124d10ae02790e0e33fbc2a5af463e97f2d5b3 # EXP-Topic relnotes relnotes: various tweaks for release notes Stop filtering out commits that are expected to be covered by releasenotes extension: now we want two lists, one for WhatsNew and one for ReleaseX.Y. Use `only(stoprev, startrev)` to make `relnotes -h` output be actually true about what revisions are included. More filter rules, mostly obvious. More classifying rules to have less things in "unsorted". Looks like nargs=1 was just making args.startrev and args.stoprev be lists for no reason. BC and API sections are renamed to what we're using on the WhatsNew page, and also just skipped if empty. diff --git a/contrib/relnotes b/contrib/relnotes --- a/contrib/relnotes +++ b/contrib/relnotes @@ -9,11 +9,6 @@ import argparse import re import subprocess -# Regenerate this list with -# hg export 'grep("\.\. [a-z]+::")' | grep '^\.\.' | \ -# sed 's/.. //;s/::.*//' | sort -u -rnsections = ["api", "bc", "container", "feature", "fix", "note", "perf"] - rules = { # keep r"\(issue": 100, @@ -26,27 +21,37 @@ rules = { r"(mq|shelve|rebase):": 20, # newsy r": deprecate": 20, -r"(option|feature|command|support)": 10, +r"( ability|command|feature|option|support)": 10, +# experimental +r"hg-experimental": 20, +r"(from|graduate).*experimental": 15, +r"(hide|mark).*experimental": -10, # bug-like? r"(fix|don't break|improve)": 7, +r"(not|n't|avoid|fix|prevent).*crash": 10, # boring stuff, bump down r"^contrib": -5, r"debug": -5, r"help": -5, -r"(doc|bundle2|obsolete|obsmarker|rpm|setup|debug\S+:)": -15, -r"(check-code|check-commit|import-checker)": -20, +r"(doc|metavar|bundle2|obsolete|obsmarker|rpm|setup|debug\S+:)": -15, +r"(check-code|check-commit|check-config|import-checker)": -20, +r"(flake8|lintian|pyflakes|pylint)": -20, # cleanups and refactoring -r"(cleanup|whitespace|nesting|indent|spelling|comment)": -20, -r"(typo|hint|note|style:|correct doc)": -20, +r"(cleanup|white ?space|spelling|quoting)": -20, +r"(flatten|dedent|indent|nesting|unnest)": -20, +r"(typo|hint|note|comment|TODO|FIXME)": -20, +r"(style:|convention|one-?liner)": -20, r"_": -10, r"(argument|absolute_import|attribute|assignment|mutable)": -15, -r"(unused|useless|unnecessary|duplicate|deprecated|scope|True|False)": -10, +r"(scope|True|False)": -10, +r"(unused|useless|unnecessary|superfluous|duplicate|deprecated)": -10, r"(redundant|pointless|confusing|uninitialized|meaningless|dead)": -10, -r": (drop|remove|inherit|rename|simplify|naming|inline)": -10, -r"(docstring|document .* method)": -20, -r"(factor|extract|prepare|split|replace| import)": -20, -r": add.*(function|method|implementation|test|example)": -10, -r": (move|extract) .* (to|into|from)": -20, +r": (drop|remove|delete|rip out)": -10, +r": (inherit|rename|simplify|naming|inline)": -10, +r"(correct doc|docstring|document .* method)": -20, +r"(abstract|factor|extract|prepare|split|replace| import)": -20, +r": add.*(function|method|implementation|example)": -10, +r": (move|extract) .* (to|into|from|out of)": -20, r": implement ": -5, r": use .* implementation": -20, r"\S\S\S+\.\S\S\S\S+": -5, @@ -55,15 +60,20 @@ rules = { # dumb keywords r"\S+/\S+:": -10, r"\S+\.\S+:": -10, +# python compatibility +r"[Pp]y(|thon) ?[23]": -20, +r"pycompat": -20, +r"(coerce|convert|encode) .*to (byte|sys|)(s|str|string)": -20, +# tests +r"^test(|s|ing|runner|-\S+):": -20, +r"^(f|hghave|run-tests):": -20, +r"add.* tests?": -20, +r"(buildbot|fuzz|mock|ratchet)": -10, # drop r"^i18n-": -50, r"^i18n:.*(hint|comment)": -50, r"perf:": -50, -r"check-code:": -50, r"Added.*for changeset": -50, -r"tests?:": -50, -r"test-": -50, -r"add.* tests": -50, r"^_": -50, } @@ -72,9 +82,9 @@ commits = [] groupings = [ (r"util|parsers|repo|ctx|context|revlog|filelog|alias|cmdutil", "core"), -(r"revset|templater|ui|dirstate|hook|i18n|transaction|wire", "core"), -(r"color|pager", "core"), -(r"hgweb|paper|coal|gitweb", "hgweb"), +(r"revset|template|ui|dirstate|hook|i18n|transaction|wire|vfs", "core"), +(r"dispatch|exchange|localrepo|streamclone|color|pager", "core"), +(r"hgweb|paper|coal|gitweb|monoblue|spartan", "hgweb"), (r"pull|push|revert|resolve|annotate|bookmark|branch|clone", "commands"), (r"commands|commit|config|files|graft|import|log|merge|patch", "commands"), (r"phases|status|summary|amend|tag|help|verify", "commands"), @@ -83,12 +93,12 @@ groupings = [ ] def main(): -ap = argparse.ArgumentParser() +desc = "example:
D5094: merge-tools: when calling external merge tool, describe the resolve inputs
yuja added a comment. > > class mappingdict(mappable, _mappingsequence): > > """Wrapper for a single template mapping > > > > This isn't a sequence in a way that the underlying dict won't be iterated > > as a dict, but shares most of the _mappingsequence functions. > > """ > > > > def __init__(self, mapping, name=None, tmpl=None): > > super(mappingdict, self).__init__(name, tmpl) > > self._mapping = mapping > > > > def tomap(self, context): > > return self._mapping > > > > def tobool(self, context, mapping): > > # no idea when a template mapping should be considered an empty, but > > # a mapping dict should have at least one item in practice, so always > > # mark this as non-empty. > > return True > > > > def tovalue(self, context, mapping): > > return super(mappingdict, self).tovalue(context, mapping)[0] > > I copy/pasted this to https://phab.mercurial-scm.org/D5211. :) I sent my version with `{p1}/{p2}` example. You don't need to update this series. I'll queue it once my patches are accepted. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D5094 To: spectral, #hg-reviewers Cc: yuja, mjpieters, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: D5094: merge-tools: when calling external merge tool, describe the resolve inputs
> > class mappingdict(mappable, _mappingsequence): > > """Wrapper for a single template mapping > > > > This isn't a sequence in a way that the underlying dict won't be > iterated > > as a dict, but shares most of the _mappingsequence functions. > > """ > > > > def __init__(self, mapping, name=None, tmpl=None): > > super(mappingdict, self).__init__(name, tmpl) > > self._mapping = mapping > > > > def tomap(self, context): > > return self._mapping > > > > def tobool(self, context, mapping): > > # no idea when a template mapping should be considered an > empty, but > > # a mapping dict should have at least one item in practice, so > always > > # mark this as non-empty. > > return True > > > > def tovalue(self, context, mapping): > > return super(mappingdict, self).tovalue(context, mapping)[0] > > I copy/pasted this to https://phab.mercurial-scm.org/D5211. :) I sent my version with `{p1}/{p2}` example. You don't need to update this series. I'll queue it once my patches are accepted. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH 4 of 4] templatekw: deprecate p1rev/p2rev/p1node/p2node in favor of p1/p2
# HG changeset patch # User Yuya Nishihara # Date 1540557997 -32400 # Fri Oct 26 21:46:37 2018 +0900 # Node ID 50c57f7f27b047e8f60d7e2b1a18b0da392c5db9 # Parent cd356034a839f6cfd0e64c894d9696e79e3c25f7 templatekw: deprecate p1rev/p2rev/p1node/p2node in favor of p1/p2 diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py --- a/mercurial/templatekw.py +++ b/mercurial/templatekw.py @@ -708,14 +708,14 @@ def showp2(context, mapping): @templatekeyword('p1rev', requires={'ctx'}) def showp1rev(context, mapping): """Integer. The repository-local revision number of the changeset's -first parent, or -1 if the changeset has no parents.""" +first parent, or -1 if the changeset has no parents. (DEPRECATED)""" ctx = context.resource(mapping, 'ctx') return ctx.p1().rev() @templatekeyword('p2rev', requires={'ctx'}) def showp2rev(context, mapping): """Integer. The repository-local revision number of the changeset's -second parent, or -1 if the changeset has no second parent.""" +second parent, or -1 if the changeset has no second parent. (DEPRECATED)""" ctx = context.resource(mapping, 'ctx') return ctx.p2().rev() @@ -723,7 +723,7 @@ def showp2rev(context, mapping): def showp1node(context, mapping): """String. The identification hash of the changeset's first parent, as a 40 digit hexadecimal string. If the changeset has no parents, all -digits are 0.""" +digits are 0. (DEPRECATED)""" ctx = context.resource(mapping, 'ctx') return ctx.p1().hex() @@ -731,7 +731,7 @@ def showp1node(context, mapping): def showp2node(context, mapping): """String. The identification hash of the changeset's second parent, as a 40 digit hexadecimal string. If the changeset has no second -parent, all digits are 0.""" +parent, all digits are 0. (DEPRECATED)""" ctx = context.resource(mapping, 'ctx') return ctx.p2().hex() ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH 3 of 4] templatekw: add p1/p2 keywords which switches the current ctx
# HG changeset patch # User Yuya Nishihara # Date 1540557800 -32400 # Fri Oct 26 21:43:20 2018 +0900 # Node ID cd356034a839f6cfd0e64c894d9696e79e3c25f7 # Parent 49a6ece003a203da3e4a74fb60256f811fd2f32b templatekw: add p1/p2 keywords which switches the current ctx This is just an example of mappingdict. I have no idea what should be displayed as {p1|json}. Currently it is an empty dict since {'ctx'} isn't displayable, which is clearly useless and should be changed later. diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py --- a/mercurial/templatekw.py +++ b/mercurial/templatekw.py @@ -691,6 +691,20 @@ def showsuccsandmarkers(context, mapping return templateutil.mappinglist(data) +@templatekeyword('p1', requires={'ctx'}) +def showp1(context, mapping): +"""Changeset. The changeset's first parent. ``{p1.rev}`` for the revision +number, and ``{p1.node}`` for the identification hash.""" +ctx = context.resource(mapping, 'ctx') +return templateutil.mappingdict({'ctx': ctx.p1()}, tmpl=_changeidtmpl) + +@templatekeyword('p2', requires={'ctx'}) +def showp2(context, mapping): +"""Changeset. The changeset's second parent. ``{p2.rev}`` for the revision +number, and ``{p2.node}`` for the identification hash.""" +ctx = context.resource(mapping, 'ctx') +return templateutil.mappingdict({'ctx': ctx.p2()}, tmpl=_changeidtmpl) + @templatekeyword('p1rev', requires={'ctx'}) def showp1rev(context, mapping): """Integer. The repository-local revision number of the changeset's diff --git a/tests/test-template-keywords.t b/tests/test-template-keywords.t --- a/tests/test-template-keywords.t +++ b/tests/test-template-keywords.t @@ -836,6 +836,25 @@ Test index keyword: 0 default 1 foo +p1/p2 keywords: + + $ hg log -r4:7 -GT '{rev} p1:{p1} p2:{p2} p1.rev:{p1.rev} p2.node:{p2.node}\n' + o 7 p1:-1: p2:-1: p1.rev:-1 p2.node: + + o6 p1:5:13207e5a10d9 p2:4:bbe44766e73d p1.rev:5 p2.node:bbe44766e73d5f11ed2177f1838de10c53ef3e74 + |\ + | o 5 p1:3:10e46f2dcbf4 p2:-1: p1.rev:3 p2.node: + | | + | ~ + o 4 p1:3:10e46f2dcbf4 p2:-1: p1.rev:3 p2.node: + | + ~ + +TODO: no idea what should be displayed as a JSON representation + $ hg log -r6 -T 'p1:{p1|json}\np2:{p2|json}\n' + p1:{} + p2:{} + ui verbosity: $ hg log -l1 -T '{verbosity}\n' ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH 2 of 4] templater: add wrapper for a single template mapping
# HG changeset patch # User Yuya Nishihara # Date 1539951090 -32400 # Fri Oct 19 21:11:30 2018 +0900 # Node ID 49a6ece003a203da3e4a74fb60256f811fd2f32b # Parent 276558285cd47fc388aed7861eaf7237c6d184e3 templater: add wrapper for a single template mapping This can be used to nest template mappings without inserting a sequence-like layer. See the next patch for example. diff --git a/mercurial/templater.py b/mercurial/templater.py --- a/mercurial/templater.py +++ b/mercurial/templater.py @@ -49,6 +49,10 @@ mappinggenerator, mappinglist represents mappings (i.e. a list of dicts), which may have default output format. +mappingdict +represents a single mapping (i.e. a dict), which may have default output +format. + mappedgenerator a lazily-evaluated list of byte strings, which is e.g. a result of % operation. diff --git a/mercurial/templateutil.py b/mercurial/templateutil.py --- a/mercurial/templateutil.py +++ b/mercurial/templateutil.py @@ -472,6 +472,29 @@ class mappinglist(_mappingsequence): def tobool(self, context, mapping): return bool(self._mappings) +class mappingdict(mappable, _mappingsequence): +"""Wrapper for a single template mapping + +This isn't a sequence in a way that the underlying dict won't be iterated +as a dict, but shares most of the _mappingsequence functions. +""" + +def __init__(self, mapping, name=None, tmpl=None): +super(mappingdict, self).__init__(name, tmpl) +self._mapping = mapping + +def tomap(self, context): +return self._mapping + +def tobool(self, context, mapping): +# no idea when a template mapping should be considered an empty, but +# a mapping dict should have at least one item in practice, so always +# mark this as non-empty. +return True + +def tovalue(self, context, mapping): +return super(mappingdict, self).tovalue(context, mapping)[0] + class mappedgenerator(wrapped): """Wrapper for generator of strings which acts as a list ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH 1 of 4] templatekw: extract internal "{rev}:{node|formatnode}" template to constant
# HG changeset patch # User Yuya Nishihara # Date 1540556900 -32400 # Fri Oct 26 21:28:20 2018 +0900 # Node ID 276558285cd47fc388aed7861eaf7237c6d184e3 # Parent c2a0bc6412dbbcbba20517e250b0fcd2fc79b0e7 templatekw: extract internal "{rev}:{node|formatnode}" template to constant This will be used later. diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py --- a/mercurial/templatekw.py +++ b/mercurial/templatekw.py @@ -153,10 +153,13 @@ def getlogcolumns(): return dict(zip([s.split(':', 1)[0] for s in columns.splitlines()], i18n._(columns).splitlines(True))) +# basic internal templates +_changeidtmpl = '{rev}:{node|formatnode}' + # default templates internally used for rendering of lists defaulttempl = { -'parent': '{rev}:{node|formatnode} ', -'manifest': '{rev}:{node|formatnode}', +'parent': _changeidtmpl + ' ', +'manifest': _changeidtmpl, 'file_copy': '{name} ({source})', 'envvar': '{key}={value}', 'extra': '{key}={value|stringescape}' ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH STABLE] tests: require SQLite 3.8.3+ as sqlitestore relies on "WITH" clause
# HG changeset patch # User Yuya Nishihara # Date 1541161535 -32400 # Fri Nov 02 21:25:35 2018 +0900 # Branch stable # Node ID d12b6941f9ac56cebc165fa83ad982db202335a2 # Parent 41f48262b845632a1fca09e79d72fdb8eb1eb624 tests: require SQLite 3.8.3+ as sqlitestore relies on "WITH" clause The test fails on gcc112 because the SQLite is too old. https://sqlite.org/changes.html#version_3_8_3 diff --git a/tests/hghave.py b/tests/hghave.py --- a/tests/hghave.py +++ b/tests/hghave.py @@ -791,10 +791,14 @@ def has_repofncache(): def has_sqlite(): try: import sqlite3 -sqlite3.sqlite_version +version = sqlite3.sqlite_version_info except ImportError: return False +if version < (3, 8, 3): +# WITH clause not supported +return False + return matchoutput('sqlite3 -version', b'^3\.\d+') @check('vcr', 'vcr http mocking library') diff --git a/tests/test-storage.py b/tests/test-storage.py --- a/tests/test-storage.py +++ b/tests/test-storage.py @@ -25,6 +25,14 @@ except ImportError: sqlitestore = None try: +import sqlite3 +if sqlite3.sqlite_version_info < (3, 8, 3): +# WITH clause not supported +sqlitestore = None +except ImportError: +pass + +try: from mercurial import zstd zstd.__version__ except ImportError: ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH STABLE RESEND] rust: fix signature of rustlazyancestors_init() function
# HG changeset patch # User Yuya Nishihara # Date 1540728996 -32400 # Sun Oct 28 21:16:36 2018 +0900 # Branch stable # Node ID 41f48262b845632a1fca09e79d72fdb8eb1eb624 # Parent 324ba8b14d7836a5cd4c5586f270391725168c0a rust: fix signature of rustlazyancestors_init() function Obviously, sizeof(int) != mem::size_of::() on amd64, though the argument would be passed in 64-bit register anyway. diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c --- a/mercurial/cext/revlog.c +++ b/mercurial/cext/revlog.c @@ -2311,7 +2311,7 @@ rustlazyancestorsObject *rustlazyancesto /* to pass index_get_parents() */ int (*)(indexObject *, Py_ssize_t, int*, int), /* intrevs vector */ - int initrevslen, long *initrevs, + Py_ssize_t initrevslen, long *initrevs, long stoprev, int inclusive); void rustlazyancestors_drop(rustlazyancestorsObject *self); diff --git a/rust/hg-direct-ffi/src/ancestors.rs b/rust/hg-direct-ffi/src/ancestors.rs --- a/rust/hg-direct-ffi/src/ancestors.rs +++ b/rust/hg-direct-ffi/src/ancestors.rs @@ -60,15 +60,16 @@ impl Graph for Index { pub extern "C" fn rustlazyancestors_init( index: IndexPtr, parents: IndexParentsFn, -initrevslen: usize, +initrevslen: ssize_t, initrevs: *mut c_long, stoprev: c_long, inclusive: c_int, ) -> *mut AncestorsIterator { +assert!(initrevslen >= 0); unsafe { raw_init( Index::new(index, parents), -initrevslen, +initrevslen as usize, initrevs, stoprev, inclusive, ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D5201: delta: skip "empty delta" optimisation for non-general case (issue6006)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG324ba8b14d78: delta: skip empty delta optimisation for non-general case (issue6006) (authored by lothiraldan, committed by ). CHANGED PRIOR TO COMMIT https://phab.mercurial-scm.org/D5201?vs=12356=12378#toc REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5201?vs=12356=12378 REVISION DETAIL https://phab.mercurial-scm.org/D5201 AFFECTED FILES mercurial/revlogutils/deltas.py CHANGE DETAILS diff --git a/mercurial/revlogutils/deltas.py b/mercurial/revlogutils/deltas.py --- a/mercurial/revlogutils/deltas.py +++ b/mercurial/revlogutils/deltas.py @@ -593,7 +593,10 @@ group = [] for rev in temptative: # skip over empty delta (no need to include them in a chain) -while not (rev == nullrev or rev in tested or deltalength(rev)): +while (revlog._generaldelta + and not (rev == nullrev +or rev in tested +or deltalength(rev))): tested.add(rev) rev = deltaparent(rev) # filter out revision we tested already To: lothiraldan, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
mercurial@40450: 4 new changesets (4 on stable)
4 new changesets (4 on stable) in mercurial: https://www.mercurial-scm.org/repo/hg/rev/f1c1b4d0e695 changeset: 40447:f1c1b4d0e695 branch: stable user:Martin von Zweigbergk date:Thu Nov 01 11:24:45 2018 -0700 summary: tests: demonstrate broken copies.pathcopies() https://www.mercurial-scm.org/repo/hg/rev/873f3682c8af changeset: 40448:873f3682c8af branch: stable user:Martin von Zweigbergk date:Thu Nov 01 13:20:12 2018 -0700 summary: narrow: make copies.pathcopies() filter with narrowspec again https://www.mercurial-scm.org/repo/hg/rev/d049ee8eee00 changeset: 40449:d049ee8eee00 branch: stable user:Martin von Zweigbergk date:Thu Nov 01 16:28:11 2018 -0700 summary: tests: demonstrate broken copies._fullcopytracing() https://www.mercurial-scm.org/repo/hg/rev/07a66c1387d1 changeset: 40450:07a66c1387d1 branch: stable tag: tip user:Martin von Zweigbergk date:Thu Nov 01 16:32:16 2018 -0700 summary: narrow: fix copies._fullcopytracing() narrowspec filtering in graft case -- Repository URL: https://www.mercurial-scm.org/repo/hg ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH 7 of 8] run-tests: define the default merge tool through configuration
# HG changeset patch # User Boris Feld # Date 1541078961 -3600 # Thu Nov 01 14:29:21 2018 +0100 # Node ID 6f27a7b59488df033a80006b552e56c16f6acb44 # Parent b95aef679522bd42e7041373b5af9ca4ab9ce004 # EXP-Topic run-tests # Available At https://bitbucket.org/octobus/mercurial-devel/ # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 6f27a7b59488 run-tests: define the default merge tool through configuration Using the `HGMERGE` environment variable generates confusion as it overrides any value set through configuration. By setting the default value through the default HGRC, the usual overriding rules apply and it should reduce confusion. diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -1078,7 +1078,6 @@ class Test(unittest.TestCase): b'daemon.pids')) env["HGEDITOR"] = ('"' + sys.executable + '"' + ' -c "import sys; sys.exit(0)"') -env["HGMERGE"] = "internal:merge" env["HGUSER"] = "test" env["HGENCODING"] = "ascii" env["HGENCODINGMODE"] = "strict" @@ -1116,6 +1115,7 @@ class Test(unittest.TestCase): 'EDITOR', 'GREP_OPTIONS', 'HG', +'HGMERGE', 'HGPLAIN', 'HGPLAINEXCEPT', 'HGPROF', @@ -1146,6 +1146,7 @@ class Test(unittest.TestCase): hgrc.write(b'[ui]\n') hgrc.write(b'slash = True\n') hgrc.write(b'interactive = False\n') +hgrc.write(b'merge = internal:merge\n') hgrc.write(b'mergemarkers = detailed\n') hgrc.write(b'promptecho = True\n') hgrc.write(b'[defaults]\n') diff --git a/tests/test-basic.t b/tests/test-basic.t --- a/tests/test-basic.t +++ b/tests/test-basic.t @@ -9,6 +9,7 @@ Create a repository: lfs.usercache=$TESTTMP/.cache/lfs ui.slash=True ui.interactive=False + ui.merge=internal:merge ui.mergemarkers=detailed ui.promptecho=True web.address=localhost diff --git a/tests/test-commandserver.t b/tests/test-commandserver.t --- a/tests/test-commandserver.t +++ b/tests/test-commandserver.t @@ -211,6 +211,7 @@ check that local configs for the cached lfs.usercache=$TESTTMP/.cache/lfs ui.slash=True ui.interactive=False + ui.merge=internal:merge ui.mergemarkers=detailed ui.foo=bar ui.nontty=true @@ -221,6 +222,7 @@ check that local configs for the cached *** runcommand -R foo showconfig ui defaults ui.slash=True ui.interactive=False + ui.merge=internal:merge ui.mergemarkers=detailed ui.nontty=true #endif ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH 8 of 8] test: remove changes preparing the drop of `HGMERGE`
# HG changeset patch # User Boris Feld # Date 1541079318 -3600 # Thu Nov 01 14:35:18 2018 +0100 # Node ID 3c8e7922f5caef98c092f88a5d5b622326e44a38 # Parent 6f27a7b59488df033a80006b552e56c16f6acb44 # EXP-Topic run-tests # Available At https://bitbucket.org/octobus/mercurial-devel/ # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 3c8e7922f5ca test: remove changes preparing the drop of `HGMERGE` These changes are no longer necessary so we better drop them. diff --git a/tests/test-largefiles-update.t b/tests/test-largefiles-update.t --- a/tests/test-largefiles-update.t +++ b/tests/test-largefiles-update.t @@ -3,7 +3,6 @@ This file focuses mainly on updating largefiles in the working directory (and ".hg/largefiles/dirstate") - $ unset HGMERGE $ cat >> $HGRCPATH < [ui] > merge = internal:merge diff --git a/tests/test-lfconvert.t b/tests/test-lfconvert.t --- a/tests/test-lfconvert.t +++ b/tests/test-lfconvert.t @@ -124,7 +124,7 @@ add some changesets to rename/remove/mer created new head $ hg rm large normal3 $ hg commit -q -m"remove large, normal3" - $ HGMERGE= hg merge --config ui.merge=internal:merge + $ hg merge tool internal:merge (for pattern stuff/maybelarge.dat) can't handle binary no tool found to merge stuff/maybelarge.dat keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for stuff/maybelarge.dat? u diff --git a/tests/test-merge-types.t b/tests/test-merge-types.t --- a/tests/test-merge-types.t +++ b/tests/test-merge-types.t @@ -1,10 +1,5 @@ #require symlink execbit - $ unset HGMERGE - $ cat >> $HGRCPATH << EOF - > [ui] - > merge=:merge - > EOF $ tellmeabout() { > if [ -h $1 ]; then > echo $1 is a symlink: @@ -41,7 +36,7 @@ Symlink is local parent, executable is o ancestor: c334dc3be0da, local: 521a1e40188f+, remote: 3574f3e69b1c preserving a for resolve of a a: versions differ -> m (premerge) - tool :merge (for pattern a) can't handle symlinks + tool internal:merge (for pattern a) can't handle symlinks couldn't find merge tool hgmerge no tool found to merge a picked tool ':prompt' for a (binary False symlink True changedelete False) @@ -212,7 +207,7 @@ where that was what happened. $ ln -s base f $ hg ci -qm2 $ hg merge - tool :merge (for pattern f) can't handle symlinks + tool internal:merge (for pattern f) can't handle symlinks no tool found to merge f keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f? u 0 files updated, 0 files merged, 0 files removed, 1 files unresolved @@ -224,7 +219,7 @@ where that was what happened. $ hg up -Cqr1 $ hg merge - tool :merge (for pattern f) can't handle symlinks + tool internal:merge (for pattern f) can't handle symlinks no tool found to merge f keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f? u 0 files updated, 0 files merged, 0 files removed, 1 files unresolved @@ -251,7 +246,7 @@ Test removed 'x' flag merged with change $ ln -s dangling f $ hg ci -qm2 $ hg merge - tool :merge (for pattern f) can't handle symlinks + tool internal:merge (for pattern f) can't handle symlinks no tool found to merge f keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f? u 0 files updated, 0 files merged, 0 files removed, 1 files unresolved @@ -263,7 +258,7 @@ Test removed 'x' flag merged with change $ hg up -Cqr1 $ hg merge - tool :merge (for pattern f) can't handle symlinks + tool internal:merge (for pattern f) can't handle symlinks no tool found to merge f keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f? u 0 files updated, 0 files merged, 0 files removed, 1 files unresolved @@ -346,13 +341,13 @@ h: l vs l, different merging b merging bx warning: cannot merge flags for c without common ancestor - keeping local flags - tool :merge (for pattern d) can't handle symlinks + tool internal:merge (for pattern d) can't handle symlinks no tool found to merge d keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for d? u - tool :merge (for pattern f) can't handle symlinks + tool internal:merge (for pattern f) can't handle symlinks no tool found to merge f keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f? u - tool :merge (for pattern h) can't handle symlinks + tool internal:merge (for pattern h) can't handle symlinks no tool found to merge h keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for h? u warning: conflicts while merging a! (edit, then use 'hg resolve --mark') @@ -408,13 +403,13 @@ h: l vs l, different merging b merging bx warning: cannot merge flags for c without common ancestor - keeping local flags - tool :merge (for pattern d) can't handle symlinks + tool internal:merge (for pattern d) can't handle
[PATCH 6 of 8] run-tests: explicitly declare the list of dropped environment variable
# HG changeset patch # User Boris Feld # Date 1539906736 -7200 # Fri Oct 19 01:52:16 2018 +0200 # Node ID b95aef679522bd42e7041373b5af9ca4ab9ce004 # Parent 063a0cb2cb31f0071c764035953fb8c3bc9bbdbc # EXP-Topic run-tests # Available At https://bitbucket.org/octobus/mercurial-devel/ # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r b95aef679522 run-tests: explicitly declare the list of dropped environment variable It will make the list clearer and more maintainable. diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -1110,9 +1110,23 @@ class Test(unittest.TestCase): env['COLUMNS'] = '80' env['TERM'] = 'xterm' -for k in ('HG HGPROF CDPATH GREP_OPTIONS http_proxy no_proxy ' + - 'HGPLAIN HGPLAINEXCEPT EDITOR VISUAL PAGER ' + - 'NO_PROXY CHGDEBUG').split(): +dropped = [ +'CDPATH', +'CHGDEBUG', +'EDITOR', +'GREP_OPTIONS', +'HG', +'HGPLAIN', +'HGPLAINEXCEPT', +'HGPROF', +'http_proxy', +'no_proxy', +'NO_PROXY', +'PAGER', +'VISUAL', +] + +for k in dropped: if k in env: del env[k] ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH 5 of 8] test: drop usage of `HGMERGE` in `test-lfconvert.t`
# HG changeset patch # User Boris Feld # Date 1541078954 -3600 # Thu Nov 01 14:29:14 2018 +0100 # Node ID 063a0cb2cb31f0071c764035953fb8c3bc9bbdbc # Parent 05fcb3400a879d518b51bb470d9b4517bbbfaa75 # EXP-Topic run-tests # Available At https://bitbucket.org/octobus/mercurial-devel/ # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 063a0cb2cb31 test: drop usage of `HGMERGE` in `test-lfconvert.t` Using configuration instead of environment variable has a strange effect on the output, but no impact on the end result. diff --git a/tests/test-lfconvert.t b/tests/test-lfconvert.t --- a/tests/test-lfconvert.t +++ b/tests/test-lfconvert.t @@ -124,11 +124,11 @@ add some changesets to rename/remove/mer created new head $ hg rm large normal3 $ hg commit -q -m"remove large, normal3" - $ hg merge - merging sub/maybelarge.dat and stuff/maybelarge.dat to stuff/maybelarge.dat + $ HGMERGE= hg merge --config ui.merge=internal:merge + tool internal:merge (for pattern stuff/maybelarge.dat) can't handle binary + no tool found to merge stuff/maybelarge.dat + keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for stuff/maybelarge.dat? u merging sub/normal2 and stuff/normal2 to stuff/normal2 - warning: stuff/maybelarge.dat looks like a binary file. - warning: conflicts while merging stuff/maybelarge.dat! (edit, then use 'hg resolve --mark') 0 files updated, 1 files merged, 0 files removed, 1 files unresolved use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon [1] ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH 4 of 8] test: drop usage of `HGMERGE` in `test-merge-types.t`
# HG changeset patch # User Boris Feld # Date 1541078790 -3600 # Thu Nov 01 14:26:30 2018 +0100 # Node ID 05fcb3400a879d518b51bb470d9b4517bbbfaa75 # Parent 9de8e01ffb96120d41a48f0ca8748ed3a77a75b7 # EXP-Topic run-tests # Available At https://bitbucket.org/octobus/mercurial-devel/ # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 05fcb3400a87 test: drop usage of `HGMERGE` in `test-merge-types.t` Using configuration instead of environment variable has a strange effect on the output, but no impact on the end result. diff --git a/tests/test-merge-types.t b/tests/test-merge-types.t --- a/tests/test-merge-types.t +++ b/tests/test-merge-types.t @@ -1,5 +1,10 @@ #require symlink execbit + $ unset HGMERGE + $ cat >> $HGRCPATH << EOF + > [ui] + > merge=:merge + > EOF $ tellmeabout() { > if [ -h $1 ]; then > echo $1 is a symlink: @@ -36,11 +41,11 @@ Symlink is local parent, executable is o ancestor: c334dc3be0da, local: 521a1e40188f+, remote: 3574f3e69b1c preserving a for resolve of a a: versions differ -> m (premerge) - picked tool ':merge' for a (binary False symlink True changedelete False) - merging a - my a@521a1e40188f+ other a@3574f3e69b1c ancestor a@c334dc3be0da - warning: internal :merge cannot merge symlinks for a - warning: conflicts while merging a! (edit, then use 'hg resolve --mark') + tool :merge (for pattern a) can't handle symlinks + couldn't find merge tool hgmerge + no tool found to merge a + picked tool ':prompt' for a (binary False symlink True changedelete False) + keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for a? u 0 files updated, 0 files merged, 0 files removed, 1 files unresolved use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon [1] @@ -164,7 +169,7 @@ Update to link with local change should $ hg up -Cq 0 $ echo data > a - $ HGMERGE= hg up -y --debug + $ HGMERGE= hg up -y --debug --config ui.merge= searching for copies back to rev 2 resolving manifests branchmerge: False, force: False, partial: False @@ -207,9 +212,9 @@ where that was what happened. $ ln -s base f $ hg ci -qm2 $ hg merge - merging f - warning: internal :merge cannot merge symlinks for f - warning: conflicts while merging f! (edit, then use 'hg resolve --mark') + tool :merge (for pattern f) can't handle symlinks + no tool found to merge f + keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f? u 0 files updated, 0 files merged, 0 files removed, 1 files unresolved use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon [1] @@ -219,9 +224,9 @@ where that was what happened. $ hg up -Cqr1 $ hg merge - merging f - warning: internal :merge cannot merge symlinks for f - warning: conflicts while merging f! (edit, then use 'hg resolve --mark') + tool :merge (for pattern f) can't handle symlinks + no tool found to merge f + keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f? u 0 files updated, 0 files merged, 0 files removed, 1 files unresolved use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon [1] @@ -246,9 +251,9 @@ Test removed 'x' flag merged with change $ ln -s dangling f $ hg ci -qm2 $ hg merge - merging f - warning: internal :merge cannot merge symlinks for f - warning: conflicts while merging f! (edit, then use 'hg resolve --mark') + tool :merge (for pattern f) can't handle symlinks + no tool found to merge f + keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f? u 0 files updated, 0 files merged, 0 files removed, 1 files unresolved use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon [1] @@ -258,9 +263,9 @@ Test removed 'x' flag merged with change $ hg up -Cqr1 $ hg merge - merging f - warning: internal :merge cannot merge symlinks for f - warning: conflicts while merging f! (edit, then use 'hg resolve --mark') + tool :merge (for pattern f) can't handle symlinks + no tool found to merge f + keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for f? u 0 files updated, 0 files merged, 0 files removed, 1 files unresolved use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon [1] @@ -341,15 +346,15 @@ h: l vs l, different merging b merging bx warning: cannot merge flags for c without common ancestor - keeping local flags - merging d - warning: internal :merge cannot merge symlinks for d - warning: conflicts while merging d! (edit, then use 'hg resolve --mark') - merging f - warning: internal :merge cannot merge symlinks for f - warning: conflicts while merging f! (edit, then use 'hg resolve --mark') - merging h - warning: internal :merge cannot merge symlinks for h - warning: conflicts while merging h! (edit,
[PATCH 3 of 8] test: use the "correct" merge tool in `test-rebase-detach.t`
# HG changeset patch # User Boris Feld # Date 1541078674 -3600 # Thu Nov 01 14:24:34 2018 +0100 # Node ID 9de8e01ffb96120d41a48f0ca8748ed3a77a75b7 # Parent 1f02b29ed5c6637cfa8e844f1b7019f3d90af107 # EXP-Topic run-tests # Available At https://bitbucket.org/octobus/mercurial-devel/ # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 9de8e01ffb96 test: use the "correct" merge tool in `test-rebase-detach.t` The value of `HGMERGE` overrides the value passed through --config. We are about to drop this `HGMERGE` environment variable so we update the value used in config to match what is currently in use. This is another example of confusion introduced by the `HGMERGE` environment variable. diff --git a/tests/test-rebase-detach.t b/tests/test-rebase-detach.t --- a/tests/test-rebase-detach.t +++ b/tests/test-rebase-detach.t @@ -293,7 +293,7 @@ Ensure --continue restores a correct sta $ hg ci -A -m 'B2' adding B $ hg phase --force --secret . - $ hg rebase -s . -d B --config ui.merge=internal:fail + $ hg rebase -s . -d B --config ui.merge=internal:merge rebasing 3:17b4880d2402 "B2" (tip) merging B warning: conflicts while merging B! (edit, then use 'hg resolve --mark') ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH 1 of 8] tests: adjust merge tool config in test-largefiles-update.t
# HG changeset patch # User Boris Feld # Date 1541007836 -3600 # Wed Oct 31 18:43:56 2018 +0100 # Node ID d01a6df50fa2c5432f2040afe686e05062e02cce # Parent 909c31805f54628ab5bf22cd92418c8ac9c09277 # EXP-Topic run-tests # Available At https://bitbucket.org/octobus/mercurial-devel/ # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r d01a6df50fa2 tests: adjust merge tool config in test-largefiles-update.t Previously, the `ui.merge=internal:fail` configuration was shadowed by the the `HGMERGE=internal:merge` environment variable. We would like to remove this usage of `HGMERGE` variable because it is error-prone (eg: this very test). We start by cleaning up test independently to avoid large churn when the change happens. diff --git a/tests/test-largefiles-update.t b/tests/test-largefiles-update.t --- a/tests/test-largefiles-update.t +++ b/tests/test-largefiles-update.t @@ -3,9 +3,10 @@ This file focuses mainly on updating largefiles in the working directory (and ".hg/largefiles/dirstate") + $ unset HGMERGE $ cat >> $HGRCPATH < [ui] - > merge = internal:fail + > merge = internal:merge > [extensions] > largefiles = > [extdiff] ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH 2 of 8] test: also deactivate `ui.merge` when testing merge tool
# HG changeset patch # User Boris Feld # Date 1541009552 -3600 # Wed Oct 31 19:12:32 2018 +0100 # Node ID 1f02b29ed5c6637cfa8e844f1b7019f3d90af107 # Parent d01a6df50fa2c5432f2040afe686e05062e02cce # EXP-Topic run-tests # Available At https://bitbucket.org/octobus/mercurial-devel/ # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 1f02b29ed5c6 test: also deactivate `ui.merge` when testing merge tool We are about to introduce a default config for `ui.merge`. Since `test-merge-tools.t` is about testing merge configuration, we need to make sure it won't interfere. diff --git a/tests/test-merge-tools.t b/tests/test-merge-tools.t --- a/tests/test-merge-tools.t +++ b/tests/test-merge-tools.t @@ -1,6 +1,10 @@ test merge-tools configuration - mostly exercising filemerge.py $ unset HGMERGE # make sure HGMERGE doesn't interfere with the test + $ cat >> $HGRCPATH << EOF + > [ui] + > merge= + > EOF $ hg init repo $ cd repo ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH] extensions: include current version in "invalid version" message
# HG changeset patch # User Boris Feld # Date 1524240534 -7200 # Fri Apr 20 18:08:54 2018 +0200 # Node ID 6bfa530c2f37d1d66058486aaa661d00dff45f83 # Parent e0dea186ab6edfab124b1dfd84237a4b8142f13b # EXP-Topic better-version-check # Available At https://bitbucket.org/octobus/mercurial-devel/ # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 6bfa530c2f37 extensions: include current version in "invalid version" message It is "not so rare" for the mercurial version to be badly detected at build time. In such case, version check for extensions gets confused. To help pinpoint the error, we now include the Mercurial's version number in the error message. diff --git a/mercurial/extensions.py b/mercurial/extensions.py --- a/mercurial/extensions.py +++ b/mercurial/extensions.py @@ -189,8 +189,9 @@ def load(ui, name, path, log=lambda *a: # of Mercurial. minver = getattr(mod, 'minimumhgversion', None) if minver and util.versiontuple(minver, 2) > util.versiontuple(n=2): -ui.warn(_('(third party extension %s requires version %s or newer ' - 'of Mercurial; disabling)\n') % (shortname, minver)) +msg = _('(third party extension %s requires version %s or newer ' +'of Mercurial (current: %s); disabling)\n') +ui.warn(msg % (shortname, minver, util.version())) return log('- validating extension tables: %r\n', shortname) _validatetables(ui, mod) diff --git a/tests/test-extension.t b/tests/test-extension.t --- a/tests/test-extension.t +++ b/tests/test-extension.t @@ -1509,7 +1509,7 @@ Refuse to load extensions with minimum v > minimumhgversion = b'3.6' > EOF $ hg --config extensions.minversion=minversion1.py version - (third party extension minversion requires version 3.6 or newer of Mercurial; disabling) + (third party extension minversion requires version 3.6 or newer of Mercurial (current: 3.5.2); disabling) Mercurial Distributed SCM (version 3.5.2) (see https://mercurial-scm.org for more information) @@ -1523,7 +1523,7 @@ Refuse to load extensions with minimum v > minimumhgversion = b'3.7' > EOF $ hg --config extensions.minversion=minversion2.py version 2>&1 | egrep '\(third' - (third party extension minversion requires version 3.7 or newer of Mercurial; disabling) + (third party extension minversion requires version 3.7 or newer of Mercurial (current: 3.6); disabling) Can load version that is only off by point release diff --git a/tests/test-extensions-afterloaded.t b/tests/test-extensions-afterloaded.t --- a/tests/test-extensions-afterloaded.t +++ b/tests/test-extensions-afterloaded.t @@ -87,7 +87,7 @@ configured but fails the minimum version $ echo "foo = $basepath/foo.py" >> .hg/hgrc $ echo "bar = $basepath/minvers.py" >> .hg/hgrc $ hg log -r. -T'{rev}\n' - (third party extension bar requires version . or newer of Mercurial; disabling) + (third party extension bar requires version . or newer of Mercurial (current: *); disabling) (glob) foo.uisetup foo: bar loaded: False 0 @@ -107,7 +107,7 @@ for the two extensions. $ echo "bar = $basepath/minvers.py" >> .hg/hgrc $ echo "foo = $basepath/foo.py" >> .hg/hgrc $ hg log -r. -T'{rev}\n' - (third party extension bar requires version . or newer of Mercurial; disabling) + (third party extension bar requires version . or newer of Mercurial (current: *); disabling) (glob) foo.uisetup foo: bar loaded: False 0 ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH 2 of 2] obsolete: prefetch the repo.obsstore used in phasedivergence loop
# HG changeset patch # User Boris Feld # Date 1539904028 -7200 # Fri Oct 19 01:07:08 2018 +0200 # Node ID 2ba5875c72c1f3475a465c2aa7a6463ab4a31704 # Parent a2497966bf47a02572bbad448458d5a4b94fe77e # EXP-Topic bettertroubles # Available At https://bitbucket.org/octobus/mercurial-devel/ # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 2ba5875c72c1 obsolete: prefetch the repo.obsstore used in phasedivergence loop The speedup is probably quite negligible, but it cannot hurt. diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py --- a/mercurial/obsolete.py +++ b/mercurial/obsolete.py @@ -916,11 +916,12 @@ def _computephasedivergentset(repo): cl = repo.changelog torev = cl.nodemap.get tonode = cl.node +obsstore = repo.obsstore for rev in repo.revs('(not public()) and (not obsolete())'): # We only evaluate mutable, non-obsolete revision node = tonode(rev) # (future) A cache of predecessors may worth if split is very common -for pnode in obsutil.allpredecessors(repo.obsstore, [node], +for pnode in obsutil.allpredecessors(obsstore, [node], ignoreflags=bumpedfix): prev = torev(pnode) # unfiltered! but so is phasecache if (prev is not None) and (phase(repo, prev) <= public): ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH 1 of 2] obsutil: prefetch method in allpredecessors loop
# HG changeset patch # User Boris Feld # Date 1539903198 -7200 # Fri Oct 19 00:53:18 2018 +0200 # Node ID a2497966bf47a02572bbad448458d5a4b94fe77e # Parent 2c0aa02ecd5a05ae76b6345962ee3a0ef773bd8a # EXP-Topic bettertroubles # Available At https://bitbucket.org/octobus/mercurial-devel/ # hg pull https://bitbucket.org/octobus/mercurial-devel/ -r a2497966bf47 obsutil: prefetch method in allpredecessors loop We don't expect a massive speedup from this, but the change was laying around in my repository and it cannot hurt. diff --git a/mercurial/obsutil.py b/mercurial/obsutil.py --- a/mercurial/obsutil.py +++ b/mercurial/obsutil.py @@ -148,10 +148,11 @@ def allpredecessors(obsstore, nodes, ign remaining = set(nodes) seen = set(remaining) +prec = obsstore.predecessors.get while remaining: current = remaining.pop() yield current -for mark in obsstore.predecessors.get(current, ()): +for mark in prec(current, ()): # ignore marker flagged with specified flag if mark[2] & ignoreflags: continue ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel