D12375: tests: fix formatting issue in run-tests.py after c194e93d1ebc

2022-03-14 Thread spectral (Kyle Lippincott)
spectral created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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
@@ -241,8 +241,11 @@
 except (socket.error, OSError) as exc:
 if exc.errno == errno.EADDRINUSE:
 return True
-elif exc.errno in (errno.EADDRNOTAVAIL, errno.EPROTONOSUPPORT,
-   errno.EAFNOSUPPORT):
+elif exc.errno in (
+errno.EADDRNOTAVAIL,
+errno.EPROTONOSUPPORT,
+errno.EAFNOSUPPORT,
+):
 return False
 else:
 raise



To: spectral, #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


D12374: revlog: fix wrong type of rank_unknown variable

2022-03-14 Thread jcristau (Julien Cristau)
jcristau created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  We treat "rank" as an int everywhere, but declare rank_unknown as a
  char.  On architectures where char is signed, that works out ok, but
  when char is unsigned, rank_unknown is 255 instead of -1.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

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

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
@@ -179,7 +179,7 @@
 /* next free offset: 73 */
 
 static const char comp_mode_inline = 2;
-static const char rank_unknown = -1;
+static const int rank_unknown = -1;
 
 static void raise_revlog_error(void)
 {



To: jcristau, #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


[PATCH evolve-ext] evolve: support hg continue and hg abort

2022-03-14 Thread Luke Granger-Brown
# HG changeset patch
# User Luke Granger-Brown 
# Date 1647196527 0
#  Sun Mar 13 18:35:27 2022 +
# Node ID f1d7992cefc201ed029723b1666328d77ff7000e
# Parent  9e0aa8929206db3080cc434089978384077c03fe
evolve: support hg continue and hg abort

`hg evolve` and `hg pick` both already support `hg abort`, but neither of them
support `hg continue`, and `hg fixup` supports neither `hg continue` nor `hg
abort`.

To make the UX a little more consistent with Mercurial core, add support for
continue and abort to all three commands.

diff --git a/hgext3rd/evolve/__init__.py b/hgext3rd/evolve/__init__.py
--- a/hgext3rd/evolve/__init__.py
+++ b/hgext3rd/evolve/__init__.py
@@ -1167,13 +1167,17 @@ def setupevolveunfinished(ui):
 statemod.addunfinished(b'evolve', fname=b'evolvestate',
continueflag=True, stopflag=True,
statushint=_msg,
-   abortfunc=evolvecmd.hgabortevolve)
+   abortfunc=evolvecmd.hgabortevolve,
+   continuefunc=evolvecmd.hgcontinueevolve)
 statemod.addunfinished(b'pick', fname=b'pickstate', continueflag=True,
-   abortfunc=cmdrewrite.hgabortpick)
+   abortfunc=cmdrewrite.hgabortpick,
+   continuefunc=cmdrewrite.hgcontinuepick)
 _fixup_msg = _(b'To continue:hg fixup --continue\n'
b'To abort:   hg fixup --abort\n')
 statemod.addunfinished(b'fixup', fname=b'fixup-state',
-   continueflag=True, statushint=_fixup_msg)
+   continueflag=True, statushint=_fixup_msg,
+   abortfunc=cmdrewrite.hgabortfixup,
+   continuefunc=cmdrewrite.hgcontinuefixup)
 else:
 # hg <= 5.0 (5f2f6912c9e6)
 estate = (b'evolvestate', False, False, _(b'evolve in progress'),
diff --git a/hgext3rd/evolve/cmdrewrite.py b/hgext3rd/evolve/cmdrewrite.py
--- a/hgext3rd/evolve/cmdrewrite.py
+++ b/hgext3rd/evolve/cmdrewrite.py
@@ -1403,28 +1403,41 @@ def cmdpick(ui, repo, *revs, **opts):
 pickstate.save()
 raise error.InterventionRequired(_(b"unresolved merge 
conflicts"
b" (see hg help resolve)"))
-overrides = {(b'phases', b'new-commit'): origctx.phase()}
-with repo.ui.configoverride(overrides, b'pick'):
-newnode = repo.commit(text=origctx.description(),
-  user=origctx.user(),
-  date=origctx.date(), extra=origctx.extra())
-repo.dirstate.setbranch(origctx.branch())
+return _dopick(ui, repo, pickstate, origctx)
+
+def _dopick(ui, repo, pickstate, origctx):
+"""shared logic for performing or continuing a pick"""
+overrides = {(b'phases', b'new-commit'): origctx.phase()}
+with repo.ui.configoverride(overrides, b'pick'):
+newnode = repo.commit(text=origctx.description(),
+  user=origctx.user(),
+  date=origctx.date(), extra=origctx.extra())
+repo.dirstate.setbranch(origctx.branch())
 
-if pickstate:
-pickstate.delete()
-if newnode is None:
-replacements = {(origctx.node(),): []}
-else:
-newctx = repo[newnode]
-replacements = {(origctx.node(),): [newctx.node()]}
-compat.cleanupnodes(repo, replacements, operation=b"pick")
+if pickstate:
+pickstate.delete()
+if newnode is None:
+replacements = {(origctx.node(),): []}
+else:
+newctx = repo[newnode]
+replacements = {(origctx.node(),): [newctx.node()]}
+compat.cleanupnodes(repo, replacements, operation=b"pick")
 
-if newnode is None:
-ui.warn(_(b"note: picking %d:%s created no changes to commit\n") %
-(origctx.rev(), origctx))
-return 0
+if newnode is None:
+ui.warn(_(b"note: picking %d:%s created no changes to commit\n") %
+(origctx.rev(), origctx))
+return 0
+
+return 0
 
-return 0
+def hgcontinuepick(ui, repo):
+"""logic to continue pick using 'hg continue'"""
+with repo.wlock(), repo.lock():
+pickstate = state.cmdstate(repo, path=b'pickstate')
+pickstate.load()
+orignode = pickstate[b'orignode']
+origctx = repo[orignode]
+return _dopick(ui, repo, pickstate, orignode, origctx)
 
 def abortpick(ui, repo, pickstate, abortcmd=False):
 """logic to abort pick"""
@@ -1576,6 +1589,13 @@ def continuefixup(ui, repo, fixup_state)
 compat.update(repo.unfiltered()[tempnode])
 return 0
 
+def hgcontinuefixup(ui, repo):
+"""logic for handling `hg continue' for fixup"""
+with repo.wlock(), repo.lock():
+fixup_state = 

mercurial-devel | Failed pipeline for branch/default | 252873d3

2022-03-14 Thread Heptapod


Pipeline #46274 has failed!

Project: mercurial-devel ( https://foss.heptapod.net/mercurial/mercurial-devel )
Branch: branch/default ( 
https://foss.heptapod.net/mercurial/mercurial-devel/-/commits/branch/default )

Commit: 252873d3 ( 
https://foss.heptapod.net/mercurial/mercurial-devel/-/commit/252873d35d2aadba9f0f274d93c929f79f6f7439
 )
Commit Message: import-checker: allow symbol imports from typin...
Commit Author: Gregory Szorc ( https://foss.heptapod.net/indygreg )

Pipeline #46274 ( 
https://foss.heptapod.net/mercurial/mercurial-devel/-/pipelines/46274 ) 
triggered by Administrator ( https://foss.heptapod.net/root )
had 1 failed job.

Job #459584 ( 
https://foss.heptapod.net/mercurial/mercurial-devel/-/jobs/459584/raw )

Stage: tests
Name: checks

-- 
You're receiving this email because of your account on foss.heptapod.net.



___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


mercurial-devel | Failed pipeline for branch/default | 03042dfa

2022-03-14 Thread Heptapod


Pipeline #46271 has failed!

Project: mercurial-devel ( https://foss.heptapod.net/mercurial/mercurial-devel )
Branch: branch/default ( 
https://foss.heptapod.net/mercurial/mercurial-devel/-/commits/branch/default )

Commit: 03042dfa ( 
https://foss.heptapod.net/mercurial/mercurial-devel/-/commit/03042dfa6d591c4573f42ee5795b92500d9b42de
 )
Commit Message: rust-hg-core: use correct type for libc hostnam...
Commit Author: Luke Granger-Brown ( https://foss.heptapod.net/lukegb )

Pipeline #46271 ( 
https://foss.heptapod.net/mercurial/mercurial-devel/-/pipelines/46271 ) 
triggered by Administrator ( https://foss.heptapod.net/root )
had 1 failed job.

Job #459557 ( 
https://foss.heptapod.net/mercurial/mercurial-devel/-/jobs/459557/raw )

Stage: tests
Name: checks

-- 
You're receiving this email because of your account on foss.heptapod.net.



___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D12373: rust-hg-core: use correct type for libc hostname buffer

2022-03-14 Thread lukegb (Luke Granger-Brown)
lukegb created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  The type of libc::c_char is u8 on aarch64 rather than i8, which causes
  the use of a specifically-typed constant to fail.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  rust/hg-core/src/lock.rs

CHANGE DETAILS

diff --git a/rust/hg-core/src/lock.rs b/rust/hg-core/src/lock.rs
--- a/rust/hg-core/src/lock.rs
+++ b/rust/hg-core/src/lock.rs
@@ -145,7 +145,7 @@
 
 /// Same as 
https://github.com/python/cpython/blob/v3.10.0/Modules/socketmodule.c#L5414
 const BUFFER_SIZE: usize = 1024;
-let mut buffer = [0_i8; BUFFER_SIZE];
+let mut buffer = [libc::c_char::default(); BUFFER_SIZE];
 let hostname_bytes = unsafe {
 let result = libc::gethostname(buffer.as_mut_ptr(), BUFFER_SIZE);
 if result != 0 {



To: lukegb, #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


mercurial@48961: 7 new changesets

2022-03-14 Thread Mercurial Commits
7 new changesets in mercurial:

https://www.mercurial-scm.org/repo/hg/rev/db960032d522
changeset:   48955:db960032d522
user:Pierre-Yves David 
date:Wed Mar 09 16:44:48 2022 +0100
summary: debugdiscovery: fix a typo in the help

https://www.mercurial-scm.org/repo/hg/rev/c194e93d1ebc
changeset:   48956:c194e93d1ebc
user:Kyle Lippincott 
date:Wed Mar 09 21:26:58 2022 -0800
summary: tests: support another error case when detecting ipv4/ipv6 support

https://www.mercurial-scm.org/repo/hg/rev/edab75a4c1da
changeset:   48957:edab75a4c1da
user:Gregory Szorc 
date:Tue Mar 08 19:08:35 2022 -0800
summary: hg: always import hgdemandimport

https://www.mercurial-scm.org/repo/hg/rev/b8eb29ab3906
changeset:   48958:b8eb29ab3906
user:Gregory Szorc 
date:Tue Mar 08 19:09:35 2022 -0800
summary: hgdemandimport: delete check for Python 3.5

https://www.mercurial-scm.org/repo/hg/rev/9ac1a4507bb3
changeset:   48959:9ac1a4507bb3
user:Gregory Szorc 
date:Tue Mar 08 19:10:19 2022 -0800
summary: pycompat: remove check for Python >= 3.6

https://www.mercurial-scm.org/repo/hg/rev/c3a48dd506da
changeset:   48960:c3a48dd506da
user:Gregory Szorc 
date:Tue Mar 08 19:11:03 2022 -0800
summary: pycompat: remove json.loads polyfill for Python 3.5

https://www.mercurial-scm.org/repo/hg/rev/8dec9abf2669
changeset:   48961:8dec9abf2669
bookmark:@
tag: tip
user:Gregory Szorc 
date:Wed Mar 09 15:41:39 2022 -0800
summary: import-checker: allow symbol imports from typing module

-- 
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-devel | Failed pipeline for branch/default | 252873d3

2022-03-14 Thread Heptapod


Pipeline #46256 has failed!

Project: mercurial-devel ( https://foss.heptapod.net/mercurial/mercurial-devel )
Branch: branch/default ( 
https://foss.heptapod.net/mercurial/mercurial-devel/-/commits/branch/default )

Commit: 252873d3 ( 
https://foss.heptapod.net/mercurial/mercurial-devel/-/commit/252873d35d2aadba9f0f274d93c929f79f6f7439
 )
Commit Message: import-checker: allow symbol imports from typin...
Commit Author: Gregory Szorc ( https://foss.heptapod.net/indygreg )

Pipeline #46256 ( 
https://foss.heptapod.net/mercurial/mercurial-devel/-/pipelines/46256 ) 
triggered by Administrator ( https://foss.heptapod.net/root )
had 1 failed job.

Job #459350 ( 
https://foss.heptapod.net/mercurial/mercurial-devel/-/jobs/459350/raw )

Stage: tests
Name: checks

-- 
You're receiving this email because of your account on foss.heptapod.net.



___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel