D3964: macosx: fixing macOS version generation after db9d1dd01bf0

2018-07-18 Thread glandium (Mike Hommey)
glandium added a comment.


  This is python code, why is it parsing the version file instead of importing 
it?

REPOSITORY
  rHG Mercurial

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

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


D3958: Allow to run setup.py with python 3 without a mercurial checkout

2018-07-16 Thread glandium (Mike Hommey)
glandium created this revision.
glandium added a reviewer: indygreg.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Some people may want to test mercurial in a python 3 environment through e.g. 
pip, in which case setup.py doesn't run in a mercurial checkout, so the hack in 
setup.py to allow python 3 cannot be overcome.
  
  This change allows a manual override with the HGPYTHON3 environment variable.
  
  Additionally, when for some reason the version is unknown (for crazy people 
like me, who have a git checkout of the mercurial repo), the version variable 
ends up being an unicode string, which fails the `isinstance(version, bytes)` 
assertion. So fix that at the same time.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  setup.py

CHANGE DETAILS

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -74,7 +74,7 @@
 badpython = True
 
 # Allow Python 3 from source checkouts.
-if os.path.isdir('.hg'):
+if os.path.isdir('.hg') or 'HGPYTHON3' in os.environ:
 badpython = False
 
 if badpython:
@@ -369,7 +369,7 @@
 from mercurial import __version__
 version = __version__.version
 except ImportError:
-version = 'unknown'
+version = b'unknown'
 finally:
 if oldpolicy is None:
 del os.environ['HGMODULEPOLICY']



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


D2057: rust implementation of hg status

2018-03-07 Thread glandium (Mike Hommey)
glandium added a comment.


  Doesn't mononoke have code to read revlogs already?

REPOSITORY
  rHG Mercurial

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

To: Ivzhh, #hg-reviewers
Cc: glandium, krbullock, indygreg, durin42, kevincox, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D1846: rust: avoid redundant 'static lifetime

2018-01-11 Thread glandium (Mike Hommey)
glandium added a comment.


  > but it's okay to depend on backports or rustup to /build/ packages
  
  The only exception where it's okay is, essentially, Firefox. With a backport 
of the rust compiler landing in stable about once a year, and even then it 
won't replace the version in stable. See the gcc-mozilla package in Debian 
wheezy.

REPOSITORY
  rHG Mercurial

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

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


D1846: rust: avoid redundant 'static lifetime

2018-01-11 Thread glandium (Mike Hommey)
glandium added a comment.


  >   To my understanding, as long as we're only using the stable channel, we 
should be fine for the binaries we're building being packageable even on 
slower-moving distros like Debian.
  
  Slow-moving distros like Debian don't update the rust compiler. Debian stable 
is stuck on rustc 1.14 until Debian buster (next year?).

REPOSITORY
  rHG Mercurial

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

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


D329: setup: Fix installing in a mingw environment

2017-08-12 Thread glandium (Mike Hommey)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG7686cbb0ba41: setup: fix installing in a mingw environment 
(authored by glandium).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D329?vs=751=828

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

AFFECTED FILES
  setup.py

CHANGE DETAILS

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -784,11 +784,11 @@
 from distutils import cygwinccompiler
 
 # the -mno-cygwin option has been deprecated for years
-compiler = cygwinccompiler.Mingw32CCompiler
+mingw32compilerclass = cygwinccompiler.Mingw32CCompiler
 
 class HackedMingw32CCompiler(cygwinccompiler.Mingw32CCompiler):
 def __init__(self, *args, **kwargs):
-compiler.__init__(self, *args, **kwargs)
+mingw32compilerclass.__init__(self, *args, **kwargs)
 for i in 'compiler compiler_so linker_exe linker_so'.split():
 try:
 getattr(self, i).remove('-mno-cygwin')
@@ -809,11 +809,11 @@
 # effect.
 from distutils import msvccompiler
 
-compiler = msvccompiler.MSVCCompiler
+msvccompilerclass = msvccompiler.MSVCCompiler
 
 class HackedMSVCCompiler(msvccompiler.MSVCCompiler):
 def initialize(self):
-compiler.initialize(self)
+msvccompilerclass.initialize(self)
 # "warning LNK4197: export 'func' specified multiple times"
 self.ldflags_shared.append('/ignore:4197')
 self.ldflags_shared_debug.append('/ignore:4197')



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


D329: setup: Fix installing in a mingw environment

2017-08-11 Thread glandium (Mike Hommey)
glandium added a comment.


  4.3.1 can't currently be installed with MINGW64 python currently because of 
this, so I'd say yes.

REPOSITORY
  rHG Mercurial

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

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


D330: Backed out changeset c34532365b38

2017-08-10 Thread glandium (Mike Hommey)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG1814ca418b30: branchmap: revert c34532365b38 for Python 2.7 
compatibility (authored by glandium).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D330?vs=752=755

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

AFFECTED FILES
  mercurial/branchmap.py

CHANGE DETAILS

diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py
--- a/mercurial/branchmap.py
+++ b/mercurial/branchmap.py
@@ -406,7 +406,8 @@
 
 # fast path: extract data from cache, use it if node is matching
 reponode = changelog.node(rev)[:_rbcnodelen]
-cachenode, branchidx = unpack_from(_rbcrecfmt, self._rbcrevs, 
rbcrevidx)
+cachenode, branchidx = unpack_from(
+_rbcrecfmt, util.buffer(self._rbcrevs), rbcrevidx)
 close = bool(branchidx & _rbccloseflag)
 if close:
 branchidx &= _rbcbranchidxmask



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


D330: Backed out changeset c34532365b38

2017-08-10 Thread glandium (Mike Hommey)
glandium created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Old versions of python 2.7 don't like that the second argument to
  struct.unpack_from is a bytearray, so the change removing the util.buffer
  around that argument in branchmap broke running on older versions of python
  2.7.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/branchmap.py

CHANGE DETAILS

diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py
--- a/mercurial/branchmap.py
+++ b/mercurial/branchmap.py
@@ -406,7 +406,8 @@
 
 # fast path: extract data from cache, use it if node is matching
 reponode = changelog.node(rev)[:_rbcnodelen]
-cachenode, branchidx = unpack_from(_rbcrecfmt, self._rbcrevs, 
rbcrevidx)
+cachenode, branchidx = unpack_from(
+_rbcrecfmt, util.buffer(self._rbcrevs), rbcrevidx)
 close = bool(branchidx & _rbccloseflag)
 if close:
 branchidx &= _rbcbranchidxmask



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


D328: setup: Fix installing in a mingw environment

2017-08-10 Thread glandium (Mike Hommey)
glandium added a comment.


  Sorry, I rebased to stable, and that created a new differential: 
https://phab.mercurial-scm.org/D329, even though I updated the local tag.

REPOSITORY
  rHG Mercurial

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

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


D329: setup: Fix installing in a mingw environment

2017-08-10 Thread glandium (Mike Hommey)
glandium created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The addition, in 
https://phab.mercurial-scm.org/rHG9a4adc76c88a1a217983f051766b3009c0bca3aa, of 
a hack for the MSVC compiler class was
  overwriting the original class for the Mingw32CCompiler class, leading to an
  error when the HackedMingw32CCompiler is instantiated.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  setup.py

CHANGE DETAILS

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -784,11 +784,11 @@
 from distutils import cygwinccompiler
 
 # the -mno-cygwin option has been deprecated for years
-compiler = cygwinccompiler.Mingw32CCompiler
+mingw32compilerclass = cygwinccompiler.Mingw32CCompiler
 
 class HackedMingw32CCompiler(cygwinccompiler.Mingw32CCompiler):
 def __init__(self, *args, **kwargs):
-compiler.__init__(self, *args, **kwargs)
+mingw32compilerclass.__init__(self, *args, **kwargs)
 for i in 'compiler compiler_so linker_exe linker_so'.split():
 try:
 getattr(self, i).remove('-mno-cygwin')
@@ -809,11 +809,11 @@
 # effect.
 from distutils import msvccompiler
 
-compiler = msvccompiler.MSVCCompiler
+msvccompilerclass = msvccompiler.MSVCCompiler
 
 class HackedMSVCCompiler(msvccompiler.MSVCCompiler):
 def initialize(self):
-compiler.initialize(self)
+msvccompilerclass.initialize(self)
 # "warning LNK4197: export 'func' specified multiple times"
 self.ldflags_shared.append('/ignore:4197')
 self.ldflags_shared_debug.append('/ignore:4197')



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


D328: setup: Fix installing in a mingw environment

2017-08-10 Thread glandium (Mike Hommey)
glandium created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The addition, in 
https://phab.mercurial-scm.org/rHG9a4adc76c88a1a217983f051766b3009c0bca3aa, of 
a hack for the MSVC compiler class was
  overwriting the original class for the Mingw32CCompiler class, leading to an
  error when the HackedMingw32CCompiler is instantiated.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  setup.py

CHANGE DETAILS

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -784,11 +784,11 @@
 from distutils import cygwinccompiler
 
 # the -mno-cygwin option has been deprecated for years
-compiler = cygwinccompiler.Mingw32CCompiler
+mingw32_compiler_class = cygwinccompiler.Mingw32CCompiler
 
 class HackedMingw32CCompiler(cygwinccompiler.Mingw32CCompiler):
 def __init__(self, *args, **kwargs):
-compiler.__init__(self, *args, **kwargs)
+mingw32_compiler_class.__init__(self, *args, **kwargs)
 for i in 'compiler compiler_so linker_exe linker_so'.split():
 try:
 getattr(self, i).remove('-mno-cygwin')
@@ -809,11 +809,11 @@
 # effect.
 from distutils import msvccompiler
 
-compiler = msvccompiler.MSVCCompiler
+msvc_compiler_class = msvccompiler.MSVCCompiler
 
 class HackedMSVCCompiler(msvccompiler.MSVCCompiler):
 def initialize(self):
-compiler.initialize(self)
+msvc_compiler_class.initialize(self)
 # "warning LNK4197: export 'func' specified multiple times"
 self.ldflags_shared.append('/ignore:4197')
 self.ldflags_shared_debug.append('/ignore:4197')



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