Re: [PATCH STABLE] merge: respect parents order when using `graft` on a merge, this time for real

2019-09-18 Thread Yuya Nishihara
On Wed, 18 Sep 2019 19:01:57 +0700, Anton Shestakov wrote:
> # HG changeset patch
> # User Anton Shestakov 
> # Date 1568803990 -25200
> #  Wed Sep 18 17:53:10 2019 +0700
> # Branch stable
> # Node ID 085295f828459f8ce90f6f5889bac3e0405945a8
> # Parent  e26c2440a030b2c5fc43de1a2feedee37d437557
> merge: respect parents order when using `graft` on a merge, this time for real

Queued for stable, thanks.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D6871: wireprototypes: clarify documentation of getbundle argument types

2019-09-18 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  It seems like it was a mix of what the Python code would see and what
  was sent over the wire. I've tried to clarify both the type seen in
  Python and how it's transmitted.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/wireprototypes.py

CHANGE DETAILS

diff --git a/mercurial/wireprototypes.py b/mercurial/wireprototypes.py
--- a/mercurial/wireprototypes.py
+++ b/mercurial/wireprototypes.py
@@ -147,14 +147,14 @@
 
 # mapping of options accepted by getbundle and their types
 #
-# Meant to be extended by extensions. It is extensions responsibility to ensure
-# such options are properly processed in exchange.getbundle.
+# Meant to be extended by extensions. It is the extension's responsibility to
+# ensure such options are properly processed in exchange.getbundle.
 #
 # supported types are:
 #
-# :nodes: list of binary nodes
-# :csv:   list of comma-separated values
-# :scsv:  list of comma-separated values return as set
+# :nodes: list of binary nodes, transmitted as space-separated hex nodes
+# :csv:   list of values, transmitted as comma-separated values
+# :scsv:  set of values, transmitted as comma-separated values
 # :plain: string with no transformation needed.
 GETBUNDLE_ARGUMENTS = {
 'heads':  'nodes',



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


mercurial@42952: 4 new changesets

2019-09-18 Thread Mercurial Commits
4 new changesets in mercurial:

https://www.mercurial-scm.org/repo/hg/rev/3355e0c2845f
changeset:   42949:3355e0c2845f
user:Ian Moody 
date:Wed Sep 18 00:05:52 2019 +0100
summary: py3: add test demonstrating TypeError when phabsending skips 
unchanged commits

https://www.mercurial-scm.org/repo/hg/rev/6fb281f39c25
changeset:   42950:6fb281f39c25
user:Ian Moody 
date:Wed Sep 18 00:20:43 2019 +0100
summary: py3: pass a bytestring into querydrev instead of a string that'll 
TypeError

https://www.mercurial-scm.org/repo/hg/rev/04c6de38734d
changeset:   42951:04c6de38734d
user:Ian Moody 
date:Tue Sep 17 21:06:07 2019 +0100
summary: py3: byte-prefix sanitisation regexes in phabricator.py

https://www.mercurial-scm.org/repo/hg/rev/44be33cf7a57
changeset:   42952:44be33cf7a57
bookmark:@
tag: tip
user:Martin von Zweigbergk 
date:Tue Sep 17 15:35:16 2019 -0700
summary: py3: don't double-convert "opts" to bytes

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


D6864: py3: don't double-convert "opts" to bytes

2019-09-18 Thread martinvonz (Martin von Zweigbergk)
Closed by commit rHG44be33cf7a57: py3: dont double-convert 
opts to bytes (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6864?vs=16575=16585

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6864/new/

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

AFFECTED FILES
  hgext/uncommit.py

CHANGE DETAILS

diff --git a/hgext/uncommit.py b/hgext/uncommit.py
--- a/hgext/uncommit.py
+++ b/hgext/uncommit.py
@@ -177,7 +177,7 @@
 with repo.transaction('uncommit'):
 if not (opts[b'message'] or opts[b'logfile']):
 opts[b'message'] = old.description()
-message = cmdutil.logmessage(ui, pycompat.byteskwargs(opts))
+message = cmdutil.logmessage(ui, opts)
 
 keepcommit = pats
 if not keepcommit:



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


[PATCH STABLE] merge: respect parents order when using `graft` on a merge, this time for real

2019-09-18 Thread Anton Shestakov
# HG changeset patch
# User Anton Shestakov 
# Date 1568803990 -25200
#  Wed Sep 18 17:53:10 2019 +0700
# Branch stable
# Node ID 085295f828459f8ce90f6f5889bac3e0405945a8
# Parent  e26c2440a030b2c5fc43de1a2feedee37d437557
merge: respect parents order when using `graft` on a merge, this time for real

See a4ca0610c754.

potherp1 is a boolean variable that means "pother is ctx.p1", and parents is
naturally [ctx.p1, ctx.p2].

pctx is always removed from parents, so if pctx is parents[0], then we end up
using parents[1] as pother. To be true to its name, potherp1 should then be
True only when pctx is at parents[1].

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -2256,7 +2256,7 @@ def graft(repo, ctx, pctx, labels=None, 
 pother = nullid
 parents = ctx.parents()
 if keepparent and len(parents) == 2 and pctx in parents:
-if pctx == parents[0]:
+if pctx == parents[1]:
 potherp1 = True
 parents.remove(pctx)
 pother = parents[0].node()
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: [PATCH] archive: add XZ support if built with Python 3

2019-09-18 Thread David Demelier

Le 18/09/2019 à 09:26, Martin von Zweigbergk a écrit :
Yes, it's already accepted. I meant that I fixed those things in flight. 
So no follow-up needed.


Ok, thanks :-)

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


Re: [PATCH] archive: add XZ support if built with Python 3

2019-09-18 Thread Martin von Zweigbergk via Mercurial-devel
Yes, it's already accepted. I meant that I fixed those things in flight. So
no follow-up needed.

On Wed, Sep 18, 2019, 00:22 David Demelier  wrote:

> Le 17/09/2019 à 19:18, Martin von Zweigbergk a écrit :
> >
> >
> > On Tue, Sep 17, 2019 at 7:16 AM Augie Fackler  > > wrote:
> >
> >
> >
> >  > On Sep 17, 2019, at 06:48, David Demelier  > > wrote:
> >  >
> >  > # HG changeset patch
> >  > # User David Demelier  > >
> >  > # Date 1568717251 0
> >  > #  Tue Sep 17 10:47:31 2019 +
> >  > # Node ID c0398aef7f0977b5f076b15638762773dde7d5b6
> >  > # Parent  181ee2118a96c4b52bbd6d7b5a47e87f2e1d77e9
> >  > archive: add XZ support if built with Python 3
> >
> > queued, thanks
> >
> >  >
> >  > diff -r 181ee2118a96 -r c0398aef7f09 mercurial/archival.py
> >  > --- a/mercurial/archival.py   Wed Sep 11 15:03:08 2019 -0700
> >  > +++ b/mercurial/archival.py   Tue Sep 17 10:47:31 2019 +
> >  > @@ -67,6 +67,7 @@
> >  > 'tbz2': ['.tbz2', '.tar.bz2'],
> >  > 'tgz': ['.tgz', '.tar.gz'],
> >  > 'zip': ['.zip'],
> >  > +'txz': ['.txz', '.tar.xz']
> >  > }
> >  >
> >  > def guesskind(dest):
> >  > @@ -270,6 +271,7 @@
> >  > 'tar': tarit,
> >  > 'tbz2': lambda name, mtime: tarit(name, mtime, 'bz2'),
> >  > 'tgz': lambda name, mtime: tarit(name, mtime, 'gz'),
> >  > +'txz': lambda name, mtime: tarit(name, mtime, 'xz'),
> >  > 'uzip': lambda name, mtime: zipit(name, mtime, False),
> >  > 'zip': zipit,
> >  > }
> >  > @@ -295,6 +297,9 @@
> >  > subrepos tells whether to include subrepos.
> >  > '''
> >  >
> >  > +if kind == 'txz' and not pycompat.ispy3:
> >  > +raise error.Abort(_('xz compression is only available in
> > Python 3'))
> >  > +
> >  > if kind == 'files':
> >  > if prefix:
> >  > raise error.Abort(_('cannot give prefix when
> > archiving to files'))
> >  > diff -r 181ee2118a96 -r c0398aef7f09 mercurial/commands.py
> >  > --- a/mercurial/commands.py   Wed Sep 11 15:03:08 2019 -0700
> >  > +++ b/mercurial/commands.py   Tue Sep 17 10:47:31 2019 +
> >  > @@ -514,6 +514,7 @@
> >  > :``tar``:   tar archive, uncompressed
> >  > :``tbz2``:  tar archive, compressed using bzip2
> >  > :``tgz``:   tar archive, compressed using gzip
> >  > +:``txz``:   tar archive, compressed using lzma (only in
> > Python 3)
> >  > :``uzip``:  zip archive, uncompressed
> >  > :``zip``:   zip archive, compressed using deflate
> >  >
> >  > diff -r 181ee2118a96 -r c0398aef7f09 tests/test-archive.t
> >  > --- a/tests/test-archive.tWed Sep 11 15:03:08 2019 -0700
> >  > +++ b/tests/test-archive.tTue Sep 17 10:47:31 2019 +
> >  > @@ -566,6 +566,21 @@
> >  >   *172*80*00:00*old/.hg_archival.txt (glob)
> >  >   *0*80*00:00*old/old (glob)
> >  >
> >  > +test xz support only available in Python 3.4
> >  > +
> >  > +#if py3
> >  > +  $ hg archive ../archive.txz
> >  > +  $ xz -l ../archive.txz | head -n1
> >  > +  Strms  Blocks   Compressed Uncompressed  Ratio  Check
> >   Filename (py3 !)
> >
> >
> > I'll drop the "(py3 !)" here.
> >
>
> Yes, sorry I first wrote the block in one test rather than using
> #if/#endif, then I forgot to remove the (py3 !) selectors.
>
> Augie, is the patch already in place?
>
> Otherwise I'll just send a new revision which cleans up this.
>
> Regards,
>
> --
> David
>
> ___
> 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


Re: [PATCH] archive: add XZ support if built with Python 3

2019-09-18 Thread David Demelier

Le 17/09/2019 à 19:18, Martin von Zweigbergk a écrit :



On Tue, Sep 17, 2019 at 7:16 AM Augie Fackler > wrote:




 > On Sep 17, 2019, at 06:48, David Demelier mailto:mark...@malikania.fr>> wrote:
 >
 > # HG changeset patch
 > # User David Demelier mailto:mark...@malikania.fr>>
 > # Date 1568717251 0
 > #      Tue Sep 17 10:47:31 2019 +
 > # Node ID c0398aef7f0977b5f076b15638762773dde7d5b6
 > # Parent  181ee2118a96c4b52bbd6d7b5a47e87f2e1d77e9
 > archive: add XZ support if built with Python 3

queued, thanks

 >
 > diff -r 181ee2118a96 -r c0398aef7f09 mercurial/archival.py
 > --- a/mercurial/archival.py   Wed Sep 11 15:03:08 2019 -0700
 > +++ b/mercurial/archival.py   Tue Sep 17 10:47:31 2019 +
 > @@ -67,6 +67,7 @@
 >     'tbz2': ['.tbz2', '.tar.bz2'],
 >     'tgz': ['.tgz', '.tar.gz'],
 >     'zip': ['.zip'],
 > +    'txz': ['.txz', '.tar.xz']
 >     }
 >
 > def guesskind(dest):
 > @@ -270,6 +271,7 @@
 >     'tar': tarit,
 >     'tbz2': lambda name, mtime: tarit(name, mtime, 'bz2'),
 >     'tgz': lambda name, mtime: tarit(name, mtime, 'gz'),
 > +    'txz': lambda name, mtime: tarit(name, mtime, 'xz'),
 >     'uzip': lambda name, mtime: zipit(name, mtime, False),
 >     'zip': zipit,
 >     }
 > @@ -295,6 +297,9 @@
 >     subrepos tells whether to include subrepos.
 >     '''
 >
 > +    if kind == 'txz' and not pycompat.ispy3:
 > +        raise error.Abort(_('xz compression is only available in
Python 3'))
 > +
 >     if kind == 'files':
 >         if prefix:
 >             raise error.Abort(_('cannot give prefix when
archiving to files'))
 > diff -r 181ee2118a96 -r c0398aef7f09 mercurial/commands.py
 > --- a/mercurial/commands.py   Wed Sep 11 15:03:08 2019 -0700
 > +++ b/mercurial/commands.py   Tue Sep 17 10:47:31 2019 +
 > @@ -514,6 +514,7 @@
 >     :``tar``:   tar archive, uncompressed
 >     :``tbz2``:  tar archive, compressed using bzip2
 >     :``tgz``:   tar archive, compressed using gzip
 > +    :``txz``:   tar archive, compressed using lzma (only in
Python 3)
 >     :``uzip``:  zip archive, uncompressed
 >     :``zip``:   zip archive, compressed using deflate
 >
 > diff -r 181ee2118a96 -r c0398aef7f09 tests/test-archive.t
 > --- a/tests/test-archive.t    Wed Sep 11 15:03:08 2019 -0700
 > +++ b/tests/test-archive.t    Tue Sep 17 10:47:31 2019 +
 > @@ -566,6 +566,21 @@
 >   *172*80*00:00*old/.hg_archival.txt (glob)
 >   *0*80*00:00*old/old (glob)
 >
 > +test xz support only available in Python 3.4
 > +
 > +#if py3
 > +  $ hg archive ../archive.txz
 > +  $ xz -l ../archive.txz | head -n1
 > +  Strms  Blocks   Compressed Uncompressed  Ratio  Check 
  Filename (py3 !)



I'll drop the "(py3 !)" here.



Yes, sorry I first wrote the block in one test rather than using 
#if/#endif, then I forgot to remove the (py3 !) selectors.


Augie, is the patch already in place?

Otherwise I'll just send a new revision which cleans up this.

Regards,

--
David

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


D6267: incoming: detect if server send partial replies

2019-09-18 Thread joerg.sonnenberger (Joerg Sonnenberger)
joerg.sonnenberger added a comment.
joerg.sonnenberger abandoned this revision.


  Will be implemented properly.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6267/new/

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

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