D9928: tests: drop pip test on the client

2021-01-30 Thread joerg.sonnenberger (Joerg Sonnenberger)
joerg.sonnenberger created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  The PIP testing is fragile, various hacks are included already. It has
  been failing persistently in the CI and locally on OpenSuSE. Since
  general PIP use requires network access, it is better done during CI
  anyway.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9928

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
@@ -170,93 +170,3 @@
   $ hg debuginstall --config extensions.fsmonitor= --config 
fsmonitor.watchman_exe=false -Tjson | grep atchman
 "fsmonitor-watchman": "false",
 "fsmonitor-watchman-error": "warning: Watchman unavailable: watchman 
exited with code 1",
-
-Verify that Mercurial is installable with pip. Note that this MUST be
-the last test in this file, because we do some nasty things to the
-shell environment in order to make the virtualenv work reliably.
-
-On Python 3, we use the venv module, which is part of the standard library.
-But some Linux distros strip out this module's functionality involving pip,
-so we have to look for the ensurepip module, which these distros strip out
-completely.
-On Python 2, we use the 3rd party virtualenv module, if available.
-
-  $ cd $TESTTMP
-  $ unset PYTHONPATH
-
-#if py3 ensurepip
-  $ "$PYTHON" -m venv installenv >> pip.log
-
-Hack: Debian does something a bit different in ensurepip.bootstrap. This makes
-it so that pip thinks the 'wheel' wheel is installed so it can build wheels;
-when it goes to try, however, it shells out to run `python3 -u `,
-that *doesn't* get the 'wheel' wheel, and it fails with an invalid command
-'bdist_wheel'. To fix this, we just delete the wheel from where Debian put it 
in
-our virtual env. Then pip doesn't think it's installed and doesn't try to 
build.
-  $ rm installenv/share/python-wheels/wheel-*.whl >/dev/null 2>&1 || true
-
-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
-Failed building wheel for mercurial (?)
-  $ ./installenv/*/hg debuginstall || cat pip.log
-  checking encoding (ascii)...
-  checking Python executable (*) (glob)
-  checking Python implementation (*) (glob)
-  checking Python version (3.*) (glob)
-  checking Python lib (*)... (glob)
-  checking Python security support (*) (glob)
-  checking Rust extensions \((installed|missing)\) (re)
-  checking Mercurial version (*) (glob)
-  checking Mercurial custom build (*) (glob)
-  checking module policy (*) (glob)
-  checking installed modules (*/mercurial)... (glob)
-  checking registered compression engines (*) (glob)
-  checking available compression engines (*) (glob)
-  checking available compression engines for wire protocol (*) (glob)
-  checking "re2" regexp engine \((available|missing)\) (re)
-  checking templates 
($TESTTMP/installenv/*/site-packages/mercurial/templates)... (glob)
-  checking default template 
($TESTTMP/installenv/*/site-packages/mercurial/templates/map-cmdline.default) 
(glob)
-  checking commit editor... (*) (glob)
-  checking username (test)
-  no problems detected
-#endif
-
-#if virtualenv no-py3
-
-Note: --no-site-packages is the default for all versions enabled by hghave
-
-  $ "$PYTHON" -m virtualenv --never-download installenv >> 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. (?)
-  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. More details about 
Python 2 support in pip, can be found at 
https://pip.pypa.io/en/latest/development/release-process/#python-2-support (?)
-
-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. (?)
-  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. More details about 
Python 2 support in pip, can be found at 
https://pip.pypa.io/en/latest/development/release-process/#python-2-support (?)
-  DEPRECATION: Python 2.7 reached the end of its life on J

D9929: churn: count lines that look like diff headers but are not

2021-01-30 Thread aayjaychan (Aay Jay Chan)
aayjaychan created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Previously, churn cannot count added lines that start with "++ " or removed
  lines that start with "-- ".

REPOSITORY
  rHG Mercurial

BRANCH
  stable

REVISION DETAIL
  https://phab.mercurial-scm.org/D9929

AFFECTED FILES
  hgext/churn.py
  tests/test-churn.t

CHANGE DETAILS

diff --git a/tests/test-churn.t b/tests/test-churn.t
--- a/tests/test-churn.t
+++ b/tests/test-churn.t
@@ -195,3 +195,22 @@
   alltogether 11 *
 
   $ cd ..
+
+count lines that look like headings but are not
+
+  $ hg init not-headers
+  $ cd not-headers
+  $ cat > a < diff
+  > @@ -195,3 +195,21 @@
+  > -- a/tests/test-churn.t
+  > ++ b/tests/test-churn.t
+  > EOF
+  $ hg ci -Am adda -u user1
+  adding a
+  $ hg churn --diffstat
+  user1   +4/-0 ++
+  $ hg rm a
+  $ hg ci -Am removea -u user1
+  $ hg churn --diffstat
+  user1   +4/-4 +++---
diff --git a/hgext/churn.py b/hgext/churn.py
--- a/hgext/churn.py
+++ b/hgext/churn.py
@@ -38,11 +38,16 @@
 def changedlines(ui, repo, ctx1, ctx2, fmatch):
 added, removed = 0, 0
 diff = b''.join(patch.diff(repo, ctx1.node(), ctx2.node(), fmatch))
+inhunk = False
 for l in diff.split(b'\n'):
-if l.startswith(b"+") and not l.startswith(b"+++ "):
+if inhunk and l.startswith(b"+"):
 added += 1
-elif l.startswith(b"-") and not l.startswith(b"--- "):
+elif inhunk and l.startswith(b"-"):
 removed += 1
+elif l.startswith(b"@"):
+inhunk = True
+elif l.startswith(b"d"):
+inhunk = False
 return (added, removed)
 
 



To: aayjaychan, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


[Bug 6477] New: Tracking down the status of `HGMERGE=internal:local hg evolve`

2021-01-30 Thread mercurial-bugs
https://bz.mercurial-scm.org/show_bug.cgi?id=6477

Bug ID: 6477
   Summary: Tracking down the status of `HGMERGE=internal:local hg
evolve`
   Product: Mercurial
   Version: unspecified
  Hardware: PC
OS: Mac OS
Status: UNCONFIRMED
  Severity: feature
  Priority: wish
 Component: evolution
  Assignee: bugzi...@mercurial-scm.org
  Reporter: jw...@jwatt.org
CC: mercurial-devel@mercurial-scm.org,
pierre-yves.da...@ens-lyon.org
Python Version: ---

The document:

https://www.mercurial-scm.org/doc/evolution/sharing.html#bug

links to:

https://bitbucket.org/marmoute/mutable-history/issues/48

which appears to be long gone. Would anyone still remember what that issue is
about? Is it still an issue? If so, would someone be able to file a bug here
and update the documentation to link to it?

-- 
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