D6183: copies: add config option for writing copy metadata to file and/or changset
martinvonz updated this revision to Diff 14663. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6183?vs=14657&id=14663 REVISION DETAIL https://phab.mercurial-scm.org/D6183 AFFECTED FILES mercurial/changelog.py mercurial/configitems.py mercurial/localrepo.py tests/test-annotate.t tests/test-copies-in-changeset.t tests/test-fastannotate-hg.t CHANGE DETAILS diff --git a/tests/test-fastannotate-hg.t b/tests/test-fastannotate-hg.t --- a/tests/test-fastannotate-hg.t +++ b/tests/test-fastannotate-hg.t @@ -443,7 +443,7 @@ > def reposetup(ui, repo): > class legacyrepo(repo.__class__): > def _filecommit(self, fctx, manifest1, manifest2, - > linkrev, tr, changelist): + > linkrev, tr, changelist, includecopymeta): > fname = fctx.path() > text = fctx.data() > flog = self.file(fname) diff --git a/tests/test-copies-in-changeset.t b/tests/test-copies-in-changeset.t new file mode 100644 --- /dev/null +++ b/tests/test-copies-in-changeset.t @@ -0,0 +1,105 @@ + + $ cat >> $HGRCPATH << EOF + > [experimental] + > copies.write-to=changeset-only + > [alias] + > changesetcopies = log -r . -T 'files: {files} + > {extras % "{ifcontains("copies", key, "{key}: {value}\n")}"}' + > EOF + +Check that copies are recorded correctly + + $ hg init repo + $ cd repo + $ echo a > a + $ hg add a + $ hg ci -m initial + $ hg cp a b + $ hg cp a c + $ hg cp a d + $ hg ci -m 'copy a to b, c, and d' + $ hg changesetcopies + files: b c d + p1copies: b\x00a (esc) + c\x00a (esc) + d\x00a (esc) + +Check that renames are recorded correctly + + $ hg mv b b2 + $ hg ci -m 'rename b to b2' + $ hg changesetcopies + files: b b2 + p1copies: b2\x00b (esc) + +Rename onto existing file. This should get recorded in the changeset files list and in the extras, +even though there is no filelog entry. + + $ hg cp b2 c --force + $ hg st --copies + M c +b2 + $ hg debugindex c + rev linkrev nodeid p1 p2 + 0 1 b789fdd96dc2 + $ hg ci -m 'move b onto d' + $ hg changesetcopies + files: c + p1copies: c\x00b2 (esc) + $ hg debugindex c + rev linkrev nodeid p1 p2 + 0 1 b789fdd96dc2 + +Create a merge commit with copying done during merge. + + $ hg co 0 + 0 files updated, 0 files merged, 3 files removed, 0 files unresolved + $ hg cp a e + $ hg cp a f + $ hg ci -m 'copy a to e and f' + created new head + $ hg merge 3 + 3 files updated, 0 files merged, 0 files removed, 0 files unresolved + (branch merge, don't forget to commit) +File 'a' exists on both sides, so 'g' could be recorded as being from p1 or p2, but we currently +always record it as being from p1 + $ hg cp a g +File 'd' exists only in p2, so 'h' should be from p2 + $ hg cp d h +File 'f' exists only in p1, so 'i' should be from p1 + $ hg cp f i + $ hg ci -m 'merge' + $ hg changesetcopies + files: g h i + p1copies: g\x00a (esc) + i\x00f (esc) + p2copies: h\x00d (esc) + +Test writing to both changeset and filelog + + $ hg cp a j + $ hg ci -m 'copy a to j' --config experimental.copies.write-to=compatibility + $ hg changesetcopies + files: j + p1copies: j\x00a (esc) + $ hg debugdata j 0 + \x01 (esc) + copy: a + copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 + \x01 (esc) + a + +Test writing only to filelog + + $ hg cp a k + $ hg ci -m 'copy a to k' --config experimental.copies.write-to=filelog-only + $ hg changesetcopies + files: k + $ hg debugdata k 0 + \x01 (esc) + copy: a + copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 + \x01 (esc) + a + + $ cd .. diff --git a/tests/test-annotate.t b/tests/test-annotate.t --- a/tests/test-annotate.t +++ b/tests/test-annotate.t @@ -438,7 +438,7 @@ > def reposetup(ui, repo): > class legacyrepo(repo.__class__): > def _filecommit(self, fctx, manifest1, manifest2, - > linkrev, tr, changelist): + > linkrev, tr, changelist, includecopymeta): > fname = fctx.path() > text = fctx.data() > flog = self.file(fname) diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -2303,7 +2303,8 @@ """Returns the wlock if it's held, or None if it's not.""" return self._currentlock(self._wlockref) -def _filecommit(self, fctx, manifest1, manifest2, linkrev, tr, changelist): +def _filecommit(self, fctx, manifest1, manifest2, linkrev, tr, changelist, +includecopymeta): """ commit an individual file as part of a larger transaction """ @@ -2362,8 +2363,9 @@ if cnode: self.ui.debug(" %s: copy %s:%s\n" % (fname, cfname, hex(cnode))) -meta["copy"] = c
D6186: changelog: parse copy metadata if available in extras
martinvonz updated this revision to Diff 14664. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6186?vs=14634&id=14664 REVISION DETAIL https://phab.mercurial-scm.org/D6186 AFFECTED FILES mercurial/changelog.py mercurial/context.py mercurial/copies.py tests/test-copies-in-changeset.t tests/test-copies.t CHANGE DETAILS diff --git a/tests/test-copies.t b/tests/test-copies.t --- a/tests/test-copies.t +++ b/tests/test-copies.t @@ -1,4 +1,4 @@ -#testcases filelog compatibility +#testcases filelog compatibility changeset $ cat >> $HGRCPATH << EOF > [extensions] @@ -14,6 +14,14 @@ > EOF #endif +#if changeset + $ cat >> $HGRCPATH << EOF + > [experimental] + > copies.read-from = changeset-only + > copies.write-to = changeset-only + > EOF +#endif + $ REPONUM=0 $ newrepo() { > cd $TESTTMP @@ -376,11 +384,13 @@ o 0 add x on branch 1 x $ hg debugp1copies -r 2 + x -> z (changeset !) $ hg debugp2copies -r 2 - x -> z + x -> z (no-changeset !) $ hg debugpathcopies 1 2 + x -> z (changeset !) $ hg debugpathcopies 0 2 - x -> z + x -> z (no-changeset !) Copy x->y on one side of merge and copy x->z on the other side. Pathcopies from one parent of the merge to the merge should include the copy from the other side. @@ -539,6 +549,9 @@ Grafting revision 4 on top of revision 2, showing that it respect the rename: +TODO: Make this work with copy info in changesets (probably by writing a +changeset-centric version of copies.mergecopies()) +#if no-changeset $ hg up 2 -q $ hg graft -r 4 --base 3 --hidden grafting 4:af28412ec03c "added d, modified b" (tip) @@ -554,6 +567,8 @@ b +baba +#endif + Test to make sure that fullcopytracing algorithm don't fail when both the merging csets are dirty (a dirty cset is one who is not the descendant of merge base) - diff --git a/tests/test-copies-in-changeset.t b/tests/test-copies-in-changeset.t --- a/tests/test-copies-in-changeset.t +++ b/tests/test-copies-in-changeset.t @@ -2,9 +2,11 @@ $ cat >> $HGRCPATH << EOF > [experimental] > copies.write-to=changeset-only + > copies.read-from=changeset-only > [alias] > changesetcopies = log -r . -T 'files: {files} > {extras % "{ifcontains("copies", key, "{key}: {value}\n")}"}' + > showcopies = log -r . -T '{file_copies % "{source} -> {name}\n"}' > EOF Check that copies are recorded correctly @@ -23,14 +25,25 @@ p1copies: b\x00a (esc) c\x00a (esc) d\x00a (esc) + $ hg showcopies + a -> b + a -> c + a -> d + $ hg showcopies --config experimental.copies.read-from=compatibility + a -> b + a -> c + a -> d + $ hg showcopies --config experimental.copies.read-from=filelog-only Check that renames are recorded correctly $ hg mv b b2 $ hg ci -m 'rename b to b2' $ hg changesetcopies files: b b2 p1copies: b2\x00b (esc) + $ hg showcopies + b -> b2 Rename onto existing file. This should get recorded in the changeset files list and in the extras, even though there is no filelog entry. @@ -46,6 +59,8 @@ $ hg changesetcopies files: c p1copies: c\x00b2 (esc) + $ hg showcopies + b2 -> c $ hg debugindex c rev linkrev nodeid p1 p2 0 1 b789fdd96dc2 @@ -74,6 +89,10 @@ p1copies: g\x00a (esc) i\x00f (esc) p2copies: h\x00d (esc) + $ hg showcopies + a -> g + d -> h + f -> i Test writing to both changeset and filelog @@ -88,6 +107,12 @@ copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 \x01 (esc) a + $ hg showcopies + a -> j + $ hg showcopies --config experimental.copies.read-from=compatibility + a -> j + $ hg showcopies --config experimental.copies.read-from=filelog-only + a -> j Test writing only to filelog @@ -101,5 +126,10 @@ copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 \x01 (esc) a + $ hg showcopies + $ hg showcopies --config experimental.copies.read-from=compatibility + a -> k + $ hg showcopies --config experimental.copies.read-from=filelog-only + a -> k $ cd .. diff --git a/mercurial/copies.py b/mercurial/copies.py --- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -162,8 +162,8 @@ def usechangesetcentricalgo(repo): """Checks if we should use changeset-centric copy algorithms""" -return (repo.ui.config('experimental', 'copies.read-from') == -'compatibility') +return (repo.ui.config('experimental', 'copies.read-from') in +('changeset-only', 'compatibility')) def _committedforwardcopies(a, b, match): """Like _forwardcopies(), but b.rev() cannot be None (working copy)""" diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -441,6 +441,21 @@ return self._changeset.files @propertycache def _copies(self
D6200: perf: make perf.run-limits code work with Python 3
indygreg created this revision. Herald added subscribers: mercurial-devel, mjpieters. Herald added a reviewer: hg-reviewers. REVISION SUMMARY We need b'' because perf.py isn't run through the source transformer. We need to cast the exception to bytes using pycompat.bytestr() because ValueError can't be %s formatted due to built-in exceptions lacking __bytes__. We need to pycompat.sysstr() before the float() and int() cast so the ValueError message doesn't have b'' in it. Even with that, it looks like the error message for the ValueError for float casts added quotes, so we need to account for that in test output. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6200 AFFECTED FILES contrib/perf.py tests/test-contrib-perf.t CHANGE DETAILS diff --git a/tests/test-contrib-perf.t b/tests/test-contrib-perf.t --- a/tests/test-contrib-perf.t +++ b/tests/test-contrib-perf.t @@ -260,7 +260,8 @@ malformatted run limit entry, missing "-": 500 ! wall * comb * user * sys * (best of 5) (glob) $ hg perfparents --config perf.stub=no --config perf.run-limits='aaa-12, 0.1-5' - malformatted run limit entry, could not convert string to float: aaa: aaa-12 + malformatted run limit entry, could not convert string to float: aaa: aaa-12 (no-py3 !) + malformatted run limit entry, could not convert string to float: 'aaa': aaa-12 (py3 !) ! wall * comb * user * sys * (best of 5) (glob) $ hg perfparents --config perf.stub=no --config perf.run-limits='12-aa, 0.1-5' malformatted run limit entry, invalid literal for int() with base 10: 'aa': 12-aa diff --git a/contrib/perf.py b/contrib/perf.py --- a/contrib/perf.py +++ b/contrib/perf.py @@ -316,22 +316,22 @@ limitspec = ui.configlist(b"perf", b"run-limits", []) limits = [] for item in limitspec: -parts = item.split('-', 1) +parts = item.split(b'-', 1) if len(parts) < 2: -ui.warn(('malformatted run limit entry, missing "-": %s\n' +ui.warn((b'malformatted run limit entry, missing "-": %s\n' % item)) continue try: -time_limit = float(parts[0]) +time_limit = float(pycompat.sysstr(parts[0])) except ValueError as e: -ui.warn(('malformatted run limit entry, %s: %s\n' - % (e, item))) +ui.warn((b'malformatted run limit entry, %s: %s\n' + % (pycompat.bytestr(e), item))) continue try: -run_limit = int(parts[1]) +run_limit = int(pycompat.sysstr(parts[1])) except ValueError as e: -ui.warn(('malformatted run limit entry, %s: %s\n' - % (e, item))) +ui.warn((b'malformatted run limit entry, %s: %s\n' + % (pycompat.bytestr(e), item))) continue limits.append((time_limit, run_limit)) if not limits: To: indygreg, #hg-reviewers Cc: mjpieters, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6202: setup: use raw string for regular expression
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Otherwise Python 3.8 complains about the backslash. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6202 AFFECTED FILES setup.py CHANGE DETAILS diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -796,7 +796,7 @@ # This logic is duplicated in doc/Makefile. sources = {f for f in os.listdir('mercurial/help') - if re.search('[0-9]\.txt$', f)} + if re.search(r'[0-9]\.txt$', f)} # common.txt is a one-off. gentxt('common') To: indygreg, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6203: tests: add optional output for Python 2.7 deprecation
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY We already had one of these a few lines above. We need it here as well. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6203 AFFECTED FILES tests/test-install.t CHANGE DETAILS diff --git a/tests/test-install.t b/tests/test-install.t --- a/tests/test-install.t +++ b/tests/test-install.t @@ -242,6 +242,7 @@ Note: we use this weird path to run pip and hg to avoid platform differences, since it's bin on most platforms but Scripts on Windows. $ ./installenv/*/pip install --no-index $TESTDIR/.. >> pip.log + DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. (?) $ ./installenv/*/hg debuginstall || cat pip.log checking encoding (ascii)... checking Python executable (*) (glob) To: indygreg, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6201: automation: use raw strings when there are backslashes
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Otherwise Python 3.8 complains. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6201 AFFECTED FILES contrib/automation/hgautomation/aws.py contrib/automation/hgautomation/windows.py CHANGE DETAILS diff --git a/contrib/automation/hgautomation/windows.py b/contrib/automation/hgautomation/windows.py --- a/contrib/automation/hgautomation/windows.py +++ b/contrib/automation/hgautomation/windows.py @@ -114,7 +114,7 @@ commands = [ '$ErrorActionPreference = "Stop"', 'Repair-AuthorizedKeyPermission -FilePath %s -Confirm:$false' % path, -'icacls %s /remove:g "NT Service\sshd"' % path, +r'icacls %s /remove:g "NT Service\sshd"' % path, ] run_powershell(winrm_client, '\n'.join(commands)) @@ -192,7 +192,7 @@ """Find path to newest file in dist/ directory matching a pattern.""" res = winrm_client.execute_ps( -'$v = Get-ChildItem -Path C:\hgdev\src\dist -Filter "%s" ' +r'$v = Get-ChildItem -Path C:\hgdev\src\dist -Filter "%s" ' '| Sort-Object LastWriteTime -Descending ' '| Select-Object -First 1\n' '$v.name' % pattern @@ -270,8 +270,8 @@ ``test_flags`` is a str representing extra arguments to pass to ``run-tests.py``. """ -if not re.match('\d\.\d', python_version): -raise ValueError('python_version must be \d.\d; got %s' % +if not re.match(r'\d\.\d', python_version): +raise ValueError(r'python_version must be \d.\d; got %s' % python_version) if arch not in ('x86', 'x64'): diff --git a/contrib/automation/hgautomation/aws.py b/contrib/automation/hgautomation/aws.py --- a/contrib/automation/hgautomation/aws.py +++ b/contrib/automation/hgautomation/aws.py @@ -118,7 +118,7 @@ # and configure WinRM. # Inspired by the User Data script used by Packer # (from https://www.packer.io/intro/getting-started/build-image.html). -WINDOWS_USER_DATA = ''' +WINDOWS_USER_DATA = r''' # TODO enable this once we figure out what is failing. To: indygreg, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6199: zstandard: vendor python-zstandard 0.11
indygreg created this revision. Herald added subscribers: mercurial-devel, mjpieters. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The upstream source distribution from PyPI was extracted. Unwanted files were removed. The clang-format ignore list was updated to reflect the new source of files. The project contains a vendored copy of zstandard 1.3.8. The old version was 1.3.6. This should result in some minor performance wins. test-check-py3-compat.t was updated to reflect now-passing tests on Python 3.8. Some HTTP tests were updated to reflect new zstd compression output. 1. no-check-commit because 3rd party code has different style guidelines REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6199 AFFECTED FILES contrib/clang-format-ignorelist contrib/python-zstandard/MANIFEST.in contrib/python-zstandard/NEWS.rst contrib/python-zstandard/README.rst contrib/python-zstandard/c-ext/compressionchunker.c contrib/python-zstandard/c-ext/compressiondict.c contrib/python-zstandard/c-ext/compressionparams.c contrib/python-zstandard/c-ext/compressionreader.c contrib/python-zstandard/c-ext/compressionwriter.c contrib/python-zstandard/c-ext/compressobj.c contrib/python-zstandard/c-ext/compressor.c contrib/python-zstandard/c-ext/compressoriterator.c contrib/python-zstandard/c-ext/constants.c contrib/python-zstandard/c-ext/decompressionreader.c contrib/python-zstandard/c-ext/decompressionwriter.c contrib/python-zstandard/c-ext/decompressobj.c contrib/python-zstandard/c-ext/decompressor.c contrib/python-zstandard/c-ext/decompressoriterator.c contrib/python-zstandard/c-ext/python-zstandard.h contrib/python-zstandard/make_cffi.py contrib/python-zstandard/setup.py contrib/python-zstandard/setup_zstd.py contrib/python-zstandard/tests/common.py contrib/python-zstandard/tests/test_buffer_util.py contrib/python-zstandard/tests/test_compressor.py contrib/python-zstandard/tests/test_compressor_fuzzing.py contrib/python-zstandard/tests/test_data_structures.py contrib/python-zstandard/tests/test_data_structures_fuzzing.py contrib/python-zstandard/tests/test_decompressor.py contrib/python-zstandard/tests/test_decompressor_fuzzing.py contrib/python-zstandard/tests/test_module_attributes.py contrib/python-zstandard/zstandard/__init__.py contrib/python-zstandard/zstandard/cffi.py contrib/python-zstandard/zstd.c contrib/python-zstandard/zstd/common/bitstream.h contrib/python-zstandard/zstd/common/compiler.h contrib/python-zstandard/zstd/common/cpu.h contrib/python-zstandard/zstd/common/debug.h contrib/python-zstandard/zstd/common/error_private.c contrib/python-zstandard/zstd/common/fse.h contrib/python-zstandard/zstd/common/huf.h contrib/python-zstandard/zstd/common/mem.h contrib/python-zstandard/zstd/common/pool.c contrib/python-zstandard/zstd/common/zstd_common.c contrib/python-zstandard/zstd/common/zstd_errors.h contrib/python-zstandard/zstd/common/zstd_internal.h contrib/python-zstandard/zstd/compress/fse_compress.c contrib/python-zstandard/zstd/compress/hist.c contrib/python-zstandard/zstd/compress/hist.h contrib/python-zstandard/zstd/compress/huf_compress.c contrib/python-zstandard/zstd/compress/zstd_compress.c contrib/python-zstandard/zstd/compress/zstd_compress_internal.h contrib/python-zstandard/zstd/compress/zstd_double_fast.c contrib/python-zstandard/zstd/compress/zstd_fast.c contrib/python-zstandard/zstd/compress/zstd_lazy.c contrib/python-zstandard/zstd/compress/zstd_ldm.c contrib/python-zstandard/zstd/compress/zstd_ldm.h contrib/python-zstandard/zstd/compress/zstd_opt.c contrib/python-zstandard/zstd/compress/zstd_opt.h contrib/python-zstandard/zstd/compress/zstdmt_compress.c contrib/python-zstandard/zstd/compress/zstdmt_compress.h contrib/python-zstandard/zstd/decompress/huf_decompress.c contrib/python-zstandard/zstd/decompress/zstd_ddict.c contrib/python-zstandard/zstd/decompress/zstd_ddict.h contrib/python-zstandard/zstd/decompress/zstd_decompress.c contrib/python-zstandard/zstd/decompress/zstd_decompress_block.c contrib/python-zstandard/zstd/decompress/zstd_decompress_block.h contrib/python-zstandard/zstd/decompress/zstd_decompress_internal.h contrib/python-zstandard/zstd/dictBuilder/cover.c contrib/python-zstandard/zstd/dictBuilder/fastcover.c contrib/python-zstandard/zstd/dictBuilder/zdict.c contrib/python-zstandard/zstd/zstd.h contrib/python-zstandard/zstd_cffi.py tests/test-check-py3-compat.t tests/test-http-api-httpv2.t tests/test-http-protocol.t To: indygreg, #hg-reviewers Cc: mjpieters, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6183: copies: add config option for writing copy metadata to file and/or changset
martinvonz updated this revision to Diff 14657. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6183?vs=14624&id=14657 REVISION DETAIL https://phab.mercurial-scm.org/D6183 AFFECTED FILES mercurial/changelog.py mercurial/configitems.py mercurial/localrepo.py tests/test-annotate.t tests/test-copies-in-changeset.t tests/test-fastannotate-hg.t CHANGE DETAILS diff --git a/tests/test-fastannotate-hg.t b/tests/test-fastannotate-hg.t --- a/tests/test-fastannotate-hg.t +++ b/tests/test-fastannotate-hg.t @@ -443,7 +443,7 @@ > def reposetup(ui, repo): > class legacyrepo(repo.__class__): > def _filecommit(self, fctx, manifest1, manifest2, - > linkrev, tr, changelist): + > linkrev, tr, changelist, includecopymeta): > fname = fctx.path() > text = fctx.data() > flog = self.file(fname) diff --git a/tests/test-copies-in-changeset.t b/tests/test-copies-in-changeset.t new file mode 100644 --- /dev/null +++ b/tests/test-copies-in-changeset.t @@ -0,0 +1,113 @@ + + $ cat >> $HGRCPATH << EOF + > [experimental] + > copies.write-to=changeset-only + > [alias] + > changesetcopies = log -r . -T "files: {files} + > p1copies: {get(extras,'p1copies')} + > p2copies: {get(extras,'p2copies')} + > " + > EOF + +Check that copies are recorded correctly + + $ hg init repo + $ cd repo + $ echo a > a + $ hg add a + $ hg ci -m initial + $ hg cp a b + $ hg cp a c + $ hg cp a d + $ hg ci -m 'copy a to b, c, and d' + $ hg changesetcopies + files: b c d + p1copies: b\x00a (esc) + c\x00a (esc) + d\x00a (esc) + p2copies: + +Check that renames are recorded correctly + + $ hg mv b b2 + $ hg ci -m 'rename b to b2' + $ hg changesetcopies + files: b b2 + p1copies: b2\x00b (esc) + p2copies: + +Rename onto existing file. This should get recorded in the changeset files list and in the extras, +even though there is no filelog entry. + + $ hg cp b2 c --force + $ hg st --copies + M c +b2 + $ hg debugindex c + rev linkrev nodeid p1 p2 + 0 1 b789fdd96dc2 + $ hg ci -m 'move b onto d' + $ hg changesetcopies + files: c + p1copies: c\x00b2 (esc) + p2copies: + $ hg debugindex c + rev linkrev nodeid p1 p2 + 0 1 b789fdd96dc2 + +Create a merge commit with copying done during merge. + + $ hg co 0 + 0 files updated, 0 files merged, 3 files removed, 0 files unresolved + $ hg cp a e + $ hg cp a f + $ hg ci -m 'copy a to e and f' + created new head + $ hg merge 3 + 3 files updated, 0 files merged, 0 files removed, 0 files unresolved + (branch merge, don't forget to commit) +File 'a' exists on both sides, so 'g' could be recorded as being from p1 or p2, but we currently +always record it as being from p1 + $ hg cp a g +File 'd' exists only in p2, so 'h' should be from p2 + $ hg cp d h +File 'f' exists only in p1, so 'i' should be from p1 + $ hg cp f i + $ hg ci -m 'merge' + $ hg changesetcopies + files: g h i + p1copies: g\x00a (esc) + i\x00f (esc) + p2copies: h\x00d (esc) + +Test writing to both changeset and filelog + + $ hg cp a j + $ hg ci -m 'copy a to j' --config experimental.copies.write-to=compatibility + $ hg changesetcopies + files: j + p1copies: j\x00a (esc) + p2copies: + $ hg debugdata j 0 + \x01 (esc) + copy: a + copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 + \x01 (esc) + a + +Test writing only to filelog + + $ hg cp a k + $ hg ci -m 'copy a to k' --config experimental.copies.write-to=filelog-only + $ hg changesetcopies + files: k + p1copies: + p2copies: + $ hg debugdata k 0 + \x01 (esc) + copy: a + copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 + \x01 (esc) + a + + $ cd .. diff --git a/tests/test-annotate.t b/tests/test-annotate.t --- a/tests/test-annotate.t +++ b/tests/test-annotate.t @@ -438,7 +438,7 @@ > def reposetup(ui, repo): > class legacyrepo(repo.__class__): > def _filecommit(self, fctx, manifest1, manifest2, - > linkrev, tr, changelist): + > linkrev, tr, changelist, includecopymeta): > fname = fctx.path() > text = fctx.data() > flog = self.file(fname) diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -2303,7 +2303,8 @@ """Returns the wlock if it's held, or None if it's not.""" return self._currentlock(self._wlockref) -def _filecommit(self, fctx, manifest1, manifest2, linkrev, tr, changelist): +def _filecommit(self, fctx, manifest1, manifest2, linkrev, tr, changelist, +includecopymeta): """ commit an individual file as part of a larger transaction """ @@ -2362,8 +2363,9 @@ if cnode:
D6181: localrepo: rename crev in _filecommit() to cnode, since it's a node
This revision was automatically updated to reflect the committed changes. Closed by commit rHG8de1b5a009ee: localrepo: rename crev in _filecommit() to cnode, since it's a node (authored by martinvonz, committed by ). CHANGED PRIOR TO COMMIT https://phab.mercurial-scm.org/D6181?vs=14619&id=14656#toc REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6181?vs=14619&id=14656 REVISION DETAIL https://phab.mercurial-scm.org/D6181 AFFECTED FILES mercurial/localrepo.py CHANGE DETAILS diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -2342,13 +2342,13 @@ #\- 2 --- 4as the merge base # -crev = manifest1.get(cfname) +cnode = manifest1.get(cfname) newfparent = fparent2 if manifest2: # branch merge -if fparent2 == nullid or crev is None: # copied on remote side +if fparent2 == nullid or cnode is None: # copied on remote side if cfname in manifest2: -crev = manifest2[cfname] +cnode = manifest2[cfname] newfparent = fparent1 # Here, we used to search backwards through history to try to find @@ -2360,10 +2360,10 @@ # expect this outcome it can be fixed, but this is the correct # behavior in this circumstance. -if crev: -self.ui.debug(" %s: copy %s:%s\n" % (fname, cfname, hex(crev))) +if cnode: +self.ui.debug(" %s: copy %s:%s\n" % (fname, cfname, hex(cnode))) meta["copy"] = cfname -meta["copyrev"] = hex(crev) +meta["copyrev"] = hex(cnode) fparent1, fparent2 = nullid, newfparent else: self.ui.warn(_("warning: can't find ancestor for '%s' " To: martinvonz, #hg-reviewers, pulkit Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6195: test/test-revset2.t: Unset environment variable P (issue6109)
This revision was automatically updated to reflect the committed changes. Closed by commit rHGf3365065ef1d: tests: unset environment variable P in test-revset2.t (issue6109) (authored by jerry.montfort, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6195?vs=14651&id=14655 REVISION DETAIL https://phab.mercurial-scm.org/D6195 AFFECTED FILES tests/test-revset2.t CHANGE DETAILS diff --git a/tests/test-revset2.t b/tests/test-revset2.t --- a/tests/test-revset2.t +++ b/tests/test-revset2.t @@ -1627,6 +1627,7 @@ > printprevset = $TESTTMP/printprevset.py > EOF + $ unset P $ hg --config revsetalias.P=1 printprevset P=[1] $ P=3 hg --config revsetalias.P=2 printprevset To: jerry.montfort, #hg-reviewers, pulkit Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: [PATCH 1 of 3] [py3] packaging: allow to run make with python3
On Thu, Apr 4, 2019 at 10:12 AM Philippe Pepiot wrote: > # HG changeset patch > # User Philippe Pepiot > # Date 1554397608 -7200 > # Thu Apr 04 19:06:48 2019 +0200 > # Node ID c9030c811fdff71908344bb17f05bb71d314acc7 > # Parent 4ee906aa7b60fb6b113e4dc187fbb5a8f42e557c > [py3] packaging: allow to run make with python3 > Queued this series, thanks. > > Use "?=", otherwise the variable cannot be set from environment. > > diff --git a/Makefile b/Makefile > --- a/Makefile > +++ b/Makefile > @@ -5,7 +5,7 @@ > # % make PREFIX=/opt/ install > > export PREFIX=/usr/local > -PYTHON=python > +PYTHON?=python > $(eval HGROOT := $(shell pwd)) > HGPYTHONS ?= $(HGROOT)/build/pythons > PURE= > diff --git a/doc/Makefile b/doc/Makefile > --- a/doc/Makefile > +++ b/doc/Makefile > @@ -6,7 +6,7 @@ GENDOC=gendoc.py ../mercurial/commands.p > PREFIX=/usr/local > MANDIR=$(PREFIX)/share/man > INSTALL=install -c -m 644 > -PYTHON=python > +PYTHON?=python > RSTARGS= > > export HGENCODING=UTF-8 > ___ > Mercurial-devel mailing list > Mercurial-devel@mercurial-scm.org > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel > ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6198: cext: make osutil.c PY_SSIZE_T_CLEAN
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This is needed to avoid a deprecation warning on Python 3.8. With this change, we no longer see deprecation warnings for this issue on Python 3.8. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6198 AFFECTED FILES mercurial/cext/osutil.c CHANGE DETAILS diff --git a/mercurial/cext/osutil.c b/mercurial/cext/osutil.c --- a/mercurial/cext/osutil.c +++ b/mercurial/cext/osutil.c @@ -8,6 +8,7 @@ */ #define _ATFILE_SOURCE +#define PY_SSIZE_T_CLEAN #include #include #include @@ -227,7 +228,7 @@ kind, py_st); } -static PyObject *_listdir(char *path, int plen, int wantstat, char *skip) +static PyObject *_listdir(char *path, Py_ssize_t plen, int wantstat, char *skip) { PyObject *rval = NULL; /* initialize - return value */ PyObject *list; @@ -1181,7 +1182,8 @@ PyObject *statobj = NULL; /* initialize - optional arg */ PyObject *skipobj = NULL; /* initialize - optional arg */ char *path, *skip = NULL; - int wantstat, plen; + Py_ssize_t plen; + int wantstat; static char *kwlist[] = {"path", "stat", "skip", NULL}; To: indygreg, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6197: cext: make parsers.c PY_SSIZE_T_CLEAN
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY This is needed to avoid a deprecation warning in Python 3.8. I believe the conversion of int to Py_ssize_t is harmless in the changed locations. But this being C code, it should be audited with care. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6197 AFFECTED FILES mercurial/cext/parsers.c CHANGE DETAILS diff --git a/mercurial/cext/parsers.c b/mercurial/cext/parsers.c --- a/mercurial/cext/parsers.c +++ b/mercurial/cext/parsers.c @@ -7,6 +7,7 @@ the GNU General Public License, incorporated herein by reference. */ +#define PY_SSIZE_T_CLEAN #include #include #include @@ -164,8 +165,9 @@ PyObject *fname = NULL, *cname = NULL, *entry = NULL; char state, *cur, *str, *cpos; int mode, size, mtime; - unsigned int flen, len, pos = 40; - int readlen; + unsigned int flen, pos = 40; + Py_ssize_t len = 40; + Py_ssize_t readlen; if (!PyArg_ParseTuple( args, PY23("O!O!s#:parse_dirstate", "O!O!y#:parse_dirstate"), @@ -585,8 +587,7 @@ static PyObject *fm1readmarkers(PyObject *self, PyObject *args) { const char *data, *dataend; - int datalen; - Py_ssize_t offset, stop; + Py_ssize_t datalen, offset, stop; PyObject *markers = NULL; if (!PyArg_ParseTuple(args, PY23("s#nn", "y#nn"), &data, &datalen, To: indygreg, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6196: cext: make revlog.c PY_SSIZE_T_CLEAN
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Without this, Python 3.8 emits a deprecation warning, as using int for # values is deprecated. Many existing modules use PY_SSIZE_T_CLEAN, so this shouldn't be contentious. I audited the file for all # formatters and verified we are using Py_ssize_t everywhere now. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6196 AFFECTED FILES mercurial/cext/revlog.c CHANGE DETAILS diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c --- a/mercurial/cext/revlog.c +++ b/mercurial/cext/revlog.c @@ -7,6 +7,7 @@ the GNU General Public License, incorporated herein by reference. */ +#define PY_SSIZE_T_CLEAN #include #include #include @@ -1947,7 +1948,7 @@ static PyObject *index_partialmatch(indexObject *self, PyObject *args) { const char *fullnode; - int nodelen; + Py_ssize_t nodelen; char *node; int rev, i; To: indygreg, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[Bug 6112] New: Shell completions for `hg` should work for `chg` too
https://bz.mercurial-scm.org/show_bug.cgi?id=6112 Bug ID: 6112 Summary: Shell completions for `hg` should work for `chg` too Product: Mercurial Version: unspecified Hardware: All OS: Linux Status: UNCONFIRMED Severity: feature Priority: wish Component: chg Assignee: bugzi...@mercurial-scm.org Reporter: galago3...@gmx.com CC: mercurial-devel@mercurial-scm.org Currently no completions are shown when calling mercurial with chg. Chg is just a layer to hg, so the completions should be the same, and can be reused. -- You are receiving this mail because: You are on the CC list for the bug. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6163: copies: extract function for deciding whether to use changeset-centric algos
pulkit added inline comments. INLINE COMMENTS > martinvonz wrote in copies.py:163 > Does that mean you're okay with the current form of this patch? Yes. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6163 To: martinvonz, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH 2 of 3] [py3] hgmanpage: use range instead of xrange
# HG changeset patch # User Philippe Pepiot # Date 1554397685 -7200 # Thu Apr 04 19:08:05 2019 +0200 # Node ID 1cfe2d1794ee65647bc95615e5d032cc6e54352c # Parent c9030c811fdff71908344bb17f05bb71d314acc7 [py3] hgmanpage: use range instead of xrange diff --git a/doc/hgmanpage.py b/doc/hgmanpage.py --- a/doc/hgmanpage.py +++ b/doc/hgmanpage.py @@ -263,7 +263,7 @@ class Translator(nodes.NodeVisitor): # ensure we get a ".TH" as viewers require it. self.head.append(self.header()) # filter body -for i in xrange(len(self.body) - 1, 0, -1): +for i in range(len(self.body) - 1, 0, -1): # remove superfluous vertical gaps. if self.body[i] == '.sp\n': if self.body[i - 1][:4] in ('.BI ','.IP '): ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH 3 of 3] [py3] hgmanpage: use a py2 and py3 compatible iterable protocol
# HG changeset patch # User Philippe Pepiot # Date 1554397717 -7200 # Thu Apr 04 19:08:37 2019 +0200 # Node ID c180963580407113ef801ebf98a3f799b9b8cef5 # Parent 1cfe2d1794ee65647bc95615e5d032cc6e54352c [py3] hgmanpage: use a py2 and py3 compatible iterable protocol diff --git a/doc/hgmanpage.py b/doc/hgmanpage.py --- a/doc/hgmanpage.py +++ b/doc/hgmanpage.py @@ -335,7 +335,7 @@ class Translator(nodes.NodeVisitor): elif style.endswith('roman'): self._indent = 5 -def next(self): +def __next__(self): if self._style == 'bullet': return self.enum_style[self._style] elif self._style == 'emdash': @@ -353,6 +353,9 @@ class Translator(nodes.NodeVisitor): return res.lower() else: return "%d." % self._cnt + +next = __next__ + def get_width(self): return self._indent def __repr__(self): ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH 1 of 3] [py3] packaging: allow to run make with python3
# HG changeset patch # User Philippe Pepiot # Date 1554397608 -7200 # Thu Apr 04 19:06:48 2019 +0200 # Node ID c9030c811fdff71908344bb17f05bb71d314acc7 # Parent 4ee906aa7b60fb6b113e4dc187fbb5a8f42e557c [py3] packaging: allow to run make with python3 Use "?=", otherwise the variable cannot be set from environment. diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ # % make PREFIX=/opt/ install export PREFIX=/usr/local -PYTHON=python +PYTHON?=python $(eval HGROOT := $(shell pwd)) HGPYTHONS ?= $(HGROOT)/build/pythons PURE= diff --git a/doc/Makefile b/doc/Makefile --- a/doc/Makefile +++ b/doc/Makefile @@ -6,7 +6,7 @@ GENDOC=gendoc.py ../mercurial/commands.p PREFIX=/usr/local MANDIR=$(PREFIX)/share/man INSTALL=install -c -m 644 -PYTHON=python +PYTHON?=python RSTARGS= export HGENCODING=UTF-8 ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH] chistedit: properly show verbose diffs
# HG changeset patch # User Jordi Gutiérrez Hermoso # Date 1554388915 14400 # Thu Apr 04 10:41:55 2019 -0400 # Node ID 704f79617827ab0c19a788715b797fcfe8557cea # Parent 4ee906aa7b60fb6b113e4dc187fbb5a8f42e557c chistedit: properly show verbose diffs I'm not sure if that ever worked and it's an internal API breakage, but `"verbose": True` is not correctly parsed, as most of these options are parsed by diffopts, whereas verbose is a global option. Setting the UI to verbose instead does work and does show a verbose patch, with full commit message. It also shows all files, which unfortunately are a bit hard to read on a single line in the default verbose template. Thus, we also change the default template to use the status template, which shows one file per line as well as its modification state. diff --git a/hgext/histedit.py b/hgext/histedit.py --- a/hgext/histedit.py +++ b/hgext/histedit.py @@ -1230,8 +1230,9 @@ def addln(win, y, x, line, color=None): def patchcontents(state): repo = state['repo'] rule = state['rules'][state['pos']] +repo.ui.verbose = True displayer = logcmdutil.changesetdisplayer(repo.ui, repo, { -'patch': True, 'verbose': True +"patch": True, "template": "status" }, buffered=True) displayer.show(rule.ctx) displayer.close() ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6195: test/test-revset2.t: Unset environment variable P (issue6109)
jerry.montfort added a comment. Note: I had a typo in the issue number: I used the line number which happens to have the exact same digits as the issue number (must be destiny). To fix the typo I used the "Edit Revision" button on this web page. If that's the wrong way, I'll resend the patch if required. For the record: The issue number is issue6109 (and the line number 1609). REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6195 To: jerry.montfort, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: [PATCH] setup: fix a possible NameError on rust build
On 4/4/19 3:43 PM, Philippe Pepiot wrote: > # HG changeset patch > # User Philippe Pepiot > # Date 1554385248 -7200 > # Thu Apr 04 15:40:48 2019 +0200 > # Node ID f7c8453060138de8ab1f56b760d84157d3f0a064 > # Parent 4ee906aa7b60fb6b113e4dc187fbb5a8f42e557c > setup: fix a possible NameError on rust build > > File "setup.py", line 975, in rustbuild > "command: %r, environment: %r" % (self.rustsrcdir, cmd, env)) > NameError: global name 'cmd' is not defined > > diff --git a/setup.py b/setup.py > --- a/setup.py > +++ b/setup.py > @@ -1084,7 +1084,7 @@ class RustExtension(Extension): > except subprocess.CalledProcessError: > raise RustCompilationError( > "Cargo failed. Working directory: %r, " > -"command: %r, environment: %r" % (self.rustsrcdir, cmd, env)) > +"command: %r, environment: %r" % (self.rustsrcdir, cargocmd, > env)) Ah yes, indeed that seems right, thanks. As a side note, I can't get pyflakes (flake8) not pylint to catch this, even if running explicitely on setup.py; this is a bit puzzling. -- Georges Racinet https://octobus.net GPG: BF5456F4DC625443849B6E58EE20CA44EF691D39, sur serveurs publics signature.asc Description: OpenPGP digital signature ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6188: test/test-revset2.t: Unset environment variable P
jerry.montfort added a comment. Hi, Used hg phasbsend which created https://phab.mercurial-scm.org/D6195. I've no clue how to merge/handle these two, so feel free to intervene. Also added issueNNN to the commit description as suggested. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6188 To: jerry.montfort, #hg-reviewers Cc: pulkit, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D6195: test/test-revset2.t: Unset environment variable P (issue1609)
jerry.montfort created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY The test tests/test-revset2.t fails the test case "Test repo.anyrevs with customized revset overrides" (line 1609) if the environment variable P is set. The test implicitly expects that the environment, in which it is started, does not export the variable 'P'. To solve this issue, unset 'P' right before the test commands are run. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6195 AFFECTED FILES tests/test-revset2.t CHANGE DETAILS diff --git a/tests/test-revset2.t b/tests/test-revset2.t --- a/tests/test-revset2.t +++ b/tests/test-revset2.t @@ -1627,6 +1627,7 @@ > printprevset = $TESTTMP/printprevset.py > EOF + $ unset P $ hg --config revsetalias.P=1 printprevset P=[1] $ P=3 hg --config revsetalias.P=2 printprevset To: jerry.montfort, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: [PATCH] repoview: introduce "served-obsolete" filter for serving obsolete changesets
On Tue, Mar 5, 2019 at 9:00 AM Anton Shestakov wrote: > # HG changeset patch > # User Anton Shestakov > # Date 1551763152 -28800 > # Tue Mar 05 13:19:12 2019 +0800 > # Node ID b6636687c713bf3c4b4c246b0e8759061d6e6742 > # Parent 82d9728ace9535057d77df6c920385861ec00072 > repoview: introduce "served-obsolete" filter for serving obsolete > changesets > > This filter allows viewing and pulling obsolete changesets (e.g. through > hgweb), but still doesn't allow secret commits to be seen. In other words, > this > is "served" plus obsolete commits, hence the name. > > Based on a patch by Boris Feld. > This looks fine to me. I will queue this in couple of days if no-one has any concerns. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH] setup: fix a possible NameError on rust build
# HG changeset patch # User Philippe Pepiot # Date 1554385248 -7200 # Thu Apr 04 15:40:48 2019 +0200 # Node ID f7c8453060138de8ab1f56b760d84157d3f0a064 # Parent 4ee906aa7b60fb6b113e4dc187fbb5a8f42e557c setup: fix a possible NameError on rust build File "setup.py", line 975, in rustbuild "command: %r, environment: %r" % (self.rustsrcdir, cmd, env)) NameError: global name 'cmd' is not defined diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -1084,7 +1084,7 @@ class RustExtension(Extension): except subprocess.CalledProcessError: raise RustCompilationError( "Cargo failed. Working directory: %r, " -"command: %r, environment: %r" % (self.rustsrcdir, cmd, env)) +"command: %r, environment: %r" % (self.rustsrcdir, cargocmd, env)) class RustEnhancedExtension(RustExtension): """A C Extension, conditionally enhanced with Rust code. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: [PATCH] chistedit: add basic colours to diff view
On Wed, 2019-04-03 at 23:56 -0400, Jordi Gutiérrez Hermoso wrote: > # HG changeset patch > # User Jordi Gutiérrez Hermoso > # Date 1554350103 14400 > # Wed Apr 03 23:55:03 2019 -0400 > # Node ID d0a4c3ae200ffdfc247f5e2f1897196512615087 > # Parent 4ee906aa7b60fb6b113e4dc187fbb5a8f42e557c > chistedit: add basic colours to diff view I didn't realise this, but this patch seems to depend on the patch I sent before this to use default colours. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[Bug 6111] New: remotefilelog and fsannotate extensions do not work on Solaris because of flock
https://bz.mercurial-scm.org/show_bug.cgi?id=6111 Bug ID: 6111 Summary: remotefilelog and fsannotate extensions do not work on Solaris because of flock Product: Mercurial Version: 4.9 Hardware: PC OS: Linux Status: UNCONFIRMED Severity: feature Priority: wish Component: Mercurial Assignee: bugzi...@mercurial-scm.org Reporter: vlmare...@gmail.com CC: mercurial-devel@mercurial-scm.org Created attachment 2040 --> https://bz.mercurial-scm.org/attachment.cgi?id=2040&action=edit Opening the files used for locking in readwrite rather than readonly mode Hi, The Mercurial test suite is failing on Solaris and so are the two modules I believe. The problem is that remotefilelog and fsannotate extensions are using fcntl.flock(lockfd, fcntl.LOCK_EX) flock is not implemented on Solaris, so python is emulating the behavior via fcntl F_SETLKW. https://github.com/python/cpython/blob/master/Modules/fcntlmodule.c 420 ret = fcntl(fd, (code & LOCK_NB) ? F_SETLK : F_SETLKW, &l); But fcntl needs to have the lockfd file opened for writing as documented in fcntl(2): An exclusive lock will prevent any other process from setting a shared lock or an exclusive lock on any portion of the protected area. A request for an exclusive lock will fail if the file descriptor was not opened with write access. The extensions are opening the file as O_RDONLY. Changing that to O_RDWR makes the test suite to pass. The fcntl module is not opening the files but rather it's getting the fd from caller, so I believe that the fix should go to mercurial. I am attaching the patch Thank you __ Vlad -- You are receiving this mail because: You are on the CC list for the bug. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel