[arch-commits] Commit in git/repos (7 files)

2020-04-20 Thread Christian Hesse via arch-commits
Date: Monday, April 20, 2020 @ 18:37:24
  Author: eworm
Revision: 380639

archrelease: copy trunk to testing-x86_64

Added:
  git/repos/testing-x86_64/
  git/repos/testing-x86_64/0001-git-p4-python.patch
(from rev 380638, git/trunk/0001-git-p4-python.patch)
  git/repos/testing-x86_64/PKGBUILD
(from rev 380638, git/trunk/PKGBUILD)
  git/repos/testing-x86_64/git-daemon.socket
(from rev 380638, git/trunk/git-daemon.socket)
  git/repos/testing-x86_64/git-daemon@.service
(from rev 380638, git/trunk/git-daemon@.service)
  git/repos/testing-x86_64/git-sysusers.conf
(from rev 380638, git/trunk/git-sysusers.conf)
  git/repos/testing-x86_64/git.install
(from rev 380638, git/trunk/git.install)

--+
 0001-git-p4-python.patch |  631 +
 PKGBUILD |  136 +
 git-daemon.socket|9 
 git-daemon@.service  |   14 
 git-sysusers.conf|1 
 git.install  |   14 
 6 files changed, 805 insertions(+)

Copied: git/repos/testing-x86_64/0001-git-p4-python.patch (from rev 380638, 
git/trunk/0001-git-p4-python.patch)
===
--- testing-x86_64/0001-git-p4-python.patch (rev 0)
+++ testing-x86_64/0001-git-p4-python.patch 2020-04-20 18:37:24 UTC (rev 
380639)
@@ -0,0 +1,631 @@
+diff --git a/git-p4.py b/git-p4.py
+index 40d9e7c594..ca0a874501 100755
+--- a/git-p4.py
 b/git-p4.py
+@@ -8,12 +8,12 @@
+ # License: MIT 
+ #
+ import sys
+-if sys.hexversion < 0x0204:
+-# The limiter is the subprocess module
+-sys.stderr.write("git-p4: requires Python 2.4 or later.\n")
++if sys.version_info.major < 3 and sys.version_info.minor < 7:
++sys.stderr.write("git-p4: requires Python 2.7 or later.\n")
+ sys.exit(1)
+ import os
+ import optparse
++import functools
+ import marshal
+ import subprocess
+ import tempfile
+@@ -27,36 +27,15 @@
+ import ctypes
+ import errno
+ 
++# On python2.7 where raw_input() and input() are both availble,
++# we want raw_input's semantics, but aliased to input for python3
++# compatibility
+ # support basestring in python3
+ try:
+-unicode = unicode
+-except NameError:
+-# 'unicode' is undefined, must be Python 3
+-str = str
+-unicode = str
+-bytes = bytes
+-basestring = (str,bytes)
+-else:
+-# 'unicode' exists, must be Python 2
+-str = str
+-unicode = unicode
+-bytes = str
+-basestring = basestring
+-
+-try:
+-from subprocess import CalledProcessError
+-except ImportError:
+-# from python2.7:subprocess.py
+-# Exception classes used by this module.
+-class CalledProcessError(Exception):
+-"""This exception is raised when a process run by check_call() returns
+-a non-zero exit status.  The exit status will be stored in the
+-returncode attribute."""
+-def __init__(self, returncode, cmd):
+-self.returncode = returncode
+-self.cmd = cmd
+-def __str__(self):
+-return "Command '%s' returned non-zero exit status %d" % 
(self.cmd, self.returncode)
++if raw_input and input:
++input = raw_input
++except:
++pass
+ 
+ verbose = False
+ 
+@@ -105,7 +84,7 @@ def p4_build_cmd(cmd):
+ # Provide a way to not pass this option by setting git-p4.retries to 0
+ real_cmd += ["-r", str(retries)]
+ 
+-if isinstance(cmd,basestring):
++if not isinstance(cmd, list):
+ real_cmd = ' '.join(real_cmd) + ' ' + cmd
+ else:
+ real_cmd += cmd
+@@ -175,18 +154,48 @@ def prompt(prompt_text):
+ """
+ choices = set(m.group(1) for m in re.finditer(r"\[(.)\]", prompt_text))
+ while True:
+-response = raw_input(prompt_text).strip().lower()
++response = input(prompt_text).strip().lower()
+ if not response:
+ continue
+ response = response[0]
+ if response in choices:
+ return response
+ 
++# We need different encoding/decoding strategies for text data being passed
++# around in pipes depending on python version
++if bytes is not str:
++# For python3, always encode and decode as appropriate
++def decode_text_stream(s):
++return s.decode() if isinstance(s, bytes) else s
++def encode_text_stream(s):
++return s.encode() if isinstance(s, str) else s
++else:
++# For python2.7, pass read strings as-is, but also allow writing unicode
++def decode_text_stream(s):
++return s
++def encode_text_stream(s):
++return s.encode('utf_8') if isinstance(s, unicode) else s
++
++def decode_path(path):
++"""Decode a given string (bytes or otherwise) using configured path 
encoding options
++"""
++encoding = gitConfig('git-p4.pathEncoding') or 'utf_8'
++if bytes is not str:
++return path.decode(encoding, errors='replace') if 

[arch-commits] Commit in git/repos (7 files)

2020-04-14 Thread Levente Polyak via arch-commits
Date: Tuesday, April 14, 2020 @ 18:38:12
  Author: anthraxx
Revision: 380319

archrelease: copy trunk to testing-x86_64

Added:
  git/repos/testing-x86_64/
  git/repos/testing-x86_64/0001-git-p4-python.patch
(from rev 380318, git/trunk/0001-git-p4-python.patch)
  git/repos/testing-x86_64/PKGBUILD
(from rev 380318, git/trunk/PKGBUILD)
  git/repos/testing-x86_64/git-daemon.socket
(from rev 380318, git/trunk/git-daemon.socket)
  git/repos/testing-x86_64/git-daemon@.service
(from rev 380318, git/trunk/git-daemon@.service)
  git/repos/testing-x86_64/git-sysusers.conf
(from rev 380318, git/trunk/git-sysusers.conf)
  git/repos/testing-x86_64/git.install
(from rev 380318, git/trunk/git.install)

--+
 0001-git-p4-python.patch |  631 +
 PKGBUILD |  136 +
 git-daemon.socket|9 
 git-daemon@.service  |   14 
 git-sysusers.conf|1 
 git.install  |   14 
 6 files changed, 805 insertions(+)

Copied: git/repos/testing-x86_64/0001-git-p4-python.patch (from rev 380318, 
git/trunk/0001-git-p4-python.patch)
===
--- testing-x86_64/0001-git-p4-python.patch (rev 0)
+++ testing-x86_64/0001-git-p4-python.patch 2020-04-14 18:38:12 UTC (rev 
380319)
@@ -0,0 +1,631 @@
+diff --git a/git-p4.py b/git-p4.py
+index 40d9e7c594..ca0a874501 100755
+--- a/git-p4.py
 b/git-p4.py
+@@ -8,12 +8,12 @@
+ # License: MIT 
+ #
+ import sys
+-if sys.hexversion < 0x0204:
+-# The limiter is the subprocess module
+-sys.stderr.write("git-p4: requires Python 2.4 or later.\n")
++if sys.version_info.major < 3 and sys.version_info.minor < 7:
++sys.stderr.write("git-p4: requires Python 2.7 or later.\n")
+ sys.exit(1)
+ import os
+ import optparse
++import functools
+ import marshal
+ import subprocess
+ import tempfile
+@@ -27,36 +27,15 @@
+ import ctypes
+ import errno
+ 
++# On python2.7 where raw_input() and input() are both availble,
++# we want raw_input's semantics, but aliased to input for python3
++# compatibility
+ # support basestring in python3
+ try:
+-unicode = unicode
+-except NameError:
+-# 'unicode' is undefined, must be Python 3
+-str = str
+-unicode = str
+-bytes = bytes
+-basestring = (str,bytes)
+-else:
+-# 'unicode' exists, must be Python 2
+-str = str
+-unicode = unicode
+-bytes = str
+-basestring = basestring
+-
+-try:
+-from subprocess import CalledProcessError
+-except ImportError:
+-# from python2.7:subprocess.py
+-# Exception classes used by this module.
+-class CalledProcessError(Exception):
+-"""This exception is raised when a process run by check_call() returns
+-a non-zero exit status.  The exit status will be stored in the
+-returncode attribute."""
+-def __init__(self, returncode, cmd):
+-self.returncode = returncode
+-self.cmd = cmd
+-def __str__(self):
+-return "Command '%s' returned non-zero exit status %d" % 
(self.cmd, self.returncode)
++if raw_input and input:
++input = raw_input
++except:
++pass
+ 
+ verbose = False
+ 
+@@ -105,7 +84,7 @@ def p4_build_cmd(cmd):
+ # Provide a way to not pass this option by setting git-p4.retries to 0
+ real_cmd += ["-r", str(retries)]
+ 
+-if isinstance(cmd,basestring):
++if not isinstance(cmd, list):
+ real_cmd = ' '.join(real_cmd) + ' ' + cmd
+ else:
+ real_cmd += cmd
+@@ -175,18 +154,48 @@ def prompt(prompt_text):
+ """
+ choices = set(m.group(1) for m in re.finditer(r"\[(.)\]", prompt_text))
+ while True:
+-response = raw_input(prompt_text).strip().lower()
++response = input(prompt_text).strip().lower()
+ if not response:
+ continue
+ response = response[0]
+ if response in choices:
+ return response
+ 
++# We need different encoding/decoding strategies for text data being passed
++# around in pipes depending on python version
++if bytes is not str:
++# For python3, always encode and decode as appropriate
++def decode_text_stream(s):
++return s.decode() if isinstance(s, bytes) else s
++def encode_text_stream(s):
++return s.encode() if isinstance(s, str) else s
++else:
++# For python2.7, pass read strings as-is, but also allow writing unicode
++def decode_text_stream(s):
++return s
++def encode_text_stream(s):
++return s.encode('utf_8') if isinstance(s, unicode) else s
++
++def decode_path(path):
++"""Decode a given string (bytes or otherwise) using configured path 
encoding options
++"""
++encoding = gitConfig('git-p4.pathEncoding') or 'utf_8'
++if bytes is not str:
++return path.decode(encoding, errors='replace') 

[arch-commits] Commit in git/repos (7 files)

2020-03-23 Thread Christian Hesse via arch-commits
Date: Monday, March 23, 2020 @ 06:36:21
  Author: eworm
Revision: 378389

archrelease: copy trunk to testing-x86_64

Added:
  git/repos/testing-x86_64/
  git/repos/testing-x86_64/0001-git-p4-python.patch
(from rev 378388, git/trunk/0001-git-p4-python.patch)
  git/repos/testing-x86_64/PKGBUILD
(from rev 378388, git/trunk/PKGBUILD)
  git/repos/testing-x86_64/git-daemon.socket
(from rev 378388, git/trunk/git-daemon.socket)
  git/repos/testing-x86_64/git-daemon@.service
(from rev 378388, git/trunk/git-daemon@.service)
  git/repos/testing-x86_64/git-sysusers.conf
(from rev 378388, git/trunk/git-sysusers.conf)
  git/repos/testing-x86_64/git.install
(from rev 378388, git/trunk/git.install)

--+
 0001-git-p4-python.patch |  631 +
 PKGBUILD |  136 +
 git-daemon.socket|9 
 git-daemon@.service  |   14 
 git-sysusers.conf|1 
 git.install  |   14 
 6 files changed, 805 insertions(+)

Copied: git/repos/testing-x86_64/0001-git-p4-python.patch (from rev 378388, 
git/trunk/0001-git-p4-python.patch)
===
--- testing-x86_64/0001-git-p4-python.patch (rev 0)
+++ testing-x86_64/0001-git-p4-python.patch 2020-03-23 06:36:21 UTC (rev 
378389)
@@ -0,0 +1,631 @@
+diff --git a/git-p4.py b/git-p4.py
+index 40d9e7c594..ca0a874501 100755
+--- a/git-p4.py
 b/git-p4.py
+@@ -8,12 +8,12 @@
+ # License: MIT 
+ #
+ import sys
+-if sys.hexversion < 0x0204:
+-# The limiter is the subprocess module
+-sys.stderr.write("git-p4: requires Python 2.4 or later.\n")
++if sys.version_info.major < 3 and sys.version_info.minor < 7:
++sys.stderr.write("git-p4: requires Python 2.7 or later.\n")
+ sys.exit(1)
+ import os
+ import optparse
++import functools
+ import marshal
+ import subprocess
+ import tempfile
+@@ -27,36 +27,15 @@
+ import ctypes
+ import errno
+ 
++# On python2.7 where raw_input() and input() are both availble,
++# we want raw_input's semantics, but aliased to input for python3
++# compatibility
+ # support basestring in python3
+ try:
+-unicode = unicode
+-except NameError:
+-# 'unicode' is undefined, must be Python 3
+-str = str
+-unicode = str
+-bytes = bytes
+-basestring = (str,bytes)
+-else:
+-# 'unicode' exists, must be Python 2
+-str = str
+-unicode = unicode
+-bytes = str
+-basestring = basestring
+-
+-try:
+-from subprocess import CalledProcessError
+-except ImportError:
+-# from python2.7:subprocess.py
+-# Exception classes used by this module.
+-class CalledProcessError(Exception):
+-"""This exception is raised when a process run by check_call() returns
+-a non-zero exit status.  The exit status will be stored in the
+-returncode attribute."""
+-def __init__(self, returncode, cmd):
+-self.returncode = returncode
+-self.cmd = cmd
+-def __str__(self):
+-return "Command '%s' returned non-zero exit status %d" % 
(self.cmd, self.returncode)
++if raw_input and input:
++input = raw_input
++except:
++pass
+ 
+ verbose = False
+ 
+@@ -105,7 +84,7 @@ def p4_build_cmd(cmd):
+ # Provide a way to not pass this option by setting git-p4.retries to 0
+ real_cmd += ["-r", str(retries)]
+ 
+-if isinstance(cmd,basestring):
++if not isinstance(cmd, list):
+ real_cmd = ' '.join(real_cmd) + ' ' + cmd
+ else:
+ real_cmd += cmd
+@@ -175,18 +154,48 @@ def prompt(prompt_text):
+ """
+ choices = set(m.group(1) for m in re.finditer(r"\[(.)\]", prompt_text))
+ while True:
+-response = raw_input(prompt_text).strip().lower()
++response = input(prompt_text).strip().lower()
+ if not response:
+ continue
+ response = response[0]
+ if response in choices:
+ return response
+ 
++# We need different encoding/decoding strategies for text data being passed
++# around in pipes depending on python version
++if bytes is not str:
++# For python3, always encode and decode as appropriate
++def decode_text_stream(s):
++return s.decode() if isinstance(s, bytes) else s
++def encode_text_stream(s):
++return s.encode() if isinstance(s, str) else s
++else:
++# For python2.7, pass read strings as-is, but also allow writing unicode
++def decode_text_stream(s):
++return s
++def encode_text_stream(s):
++return s.encode('utf_8') if isinstance(s, unicode) else s
++
++def decode_path(path):
++"""Decode a given string (bytes or otherwise) using configured path 
encoding options
++"""
++encoding = gitConfig('git-p4.pathEncoding') or 'utf_8'
++if bytes is not str:
++return path.decode(encoding, errors='replace') if 

[arch-commits] Commit in git/repos (7 files)

2020-02-17 Thread Christian Hesse via arch-commits
Date: Monday, February 17, 2020 @ 08:01:42
  Author: eworm
Revision: 375734

archrelease: copy trunk to testing-x86_64

Added:
  git/repos/testing-x86_64/
  git/repos/testing-x86_64/0001-git-p4-python.patch
(from rev 375732, git/trunk/0001-git-p4-python.patch)
  git/repos/testing-x86_64/PKGBUILD
(from rev 375732, git/trunk/PKGBUILD)
  git/repos/testing-x86_64/git-daemon.socket
(from rev 375732, git/trunk/git-daemon.socket)
  git/repos/testing-x86_64/git-daemon@.service
(from rev 375732, git/trunk/git-daemon@.service)
  git/repos/testing-x86_64/git-sysusers.conf
(from rev 375732, git/trunk/git-sysusers.conf)
  git/repos/testing-x86_64/git.install
(from rev 375732, git/trunk/git.install)

--+
 0001-git-p4-python.patch |  631 +
 PKGBUILD |  136 +
 git-daemon.socket|9 
 git-daemon@.service  |   14 
 git-sysusers.conf|1 
 git.install  |   14 
 6 files changed, 805 insertions(+)

Copied: git/repos/testing-x86_64/0001-git-p4-python.patch (from rev 375732, 
git/trunk/0001-git-p4-python.patch)
===
--- testing-x86_64/0001-git-p4-python.patch (rev 0)
+++ testing-x86_64/0001-git-p4-python.patch 2020-02-17 08:01:42 UTC (rev 
375734)
@@ -0,0 +1,631 @@
+diff --git a/git-p4.py b/git-p4.py
+index 40d9e7c594..ca0a874501 100755
+--- a/git-p4.py
 b/git-p4.py
+@@ -8,12 +8,12 @@
+ # License: MIT 
+ #
+ import sys
+-if sys.hexversion < 0x0204:
+-# The limiter is the subprocess module
+-sys.stderr.write("git-p4: requires Python 2.4 or later.\n")
++if sys.version_info.major < 3 and sys.version_info.minor < 7:
++sys.stderr.write("git-p4: requires Python 2.7 or later.\n")
+ sys.exit(1)
+ import os
+ import optparse
++import functools
+ import marshal
+ import subprocess
+ import tempfile
+@@ -27,36 +27,15 @@
+ import ctypes
+ import errno
+ 
++# On python2.7 where raw_input() and input() are both availble,
++# we want raw_input's semantics, but aliased to input for python3
++# compatibility
+ # support basestring in python3
+ try:
+-unicode = unicode
+-except NameError:
+-# 'unicode' is undefined, must be Python 3
+-str = str
+-unicode = str
+-bytes = bytes
+-basestring = (str,bytes)
+-else:
+-# 'unicode' exists, must be Python 2
+-str = str
+-unicode = unicode
+-bytes = str
+-basestring = basestring
+-
+-try:
+-from subprocess import CalledProcessError
+-except ImportError:
+-# from python2.7:subprocess.py
+-# Exception classes used by this module.
+-class CalledProcessError(Exception):
+-"""This exception is raised when a process run by check_call() returns
+-a non-zero exit status.  The exit status will be stored in the
+-returncode attribute."""
+-def __init__(self, returncode, cmd):
+-self.returncode = returncode
+-self.cmd = cmd
+-def __str__(self):
+-return "Command '%s' returned non-zero exit status %d" % 
(self.cmd, self.returncode)
++if raw_input and input:
++input = raw_input
++except:
++pass
+ 
+ verbose = False
+ 
+@@ -105,7 +84,7 @@ def p4_build_cmd(cmd):
+ # Provide a way to not pass this option by setting git-p4.retries to 0
+ real_cmd += ["-r", str(retries)]
+ 
+-if isinstance(cmd,basestring):
++if not isinstance(cmd, list):
+ real_cmd = ' '.join(real_cmd) + ' ' + cmd
+ else:
+ real_cmd += cmd
+@@ -175,18 +154,48 @@ def prompt(prompt_text):
+ """
+ choices = set(m.group(1) for m in re.finditer(r"\[(.)\]", prompt_text))
+ while True:
+-response = raw_input(prompt_text).strip().lower()
++response = input(prompt_text).strip().lower()
+ if not response:
+ continue
+ response = response[0]
+ if response in choices:
+ return response
+ 
++# We need different encoding/decoding strategies for text data being passed
++# around in pipes depending on python version
++if bytes is not str:
++# For python3, always encode and decode as appropriate
++def decode_text_stream(s):
++return s.decode() if isinstance(s, bytes) else s
++def encode_text_stream(s):
++return s.encode() if isinstance(s, str) else s
++else:
++# For python2.7, pass read strings as-is, but also allow writing unicode
++def decode_text_stream(s):
++return s
++def encode_text_stream(s):
++return s.encode('utf_8') if isinstance(s, unicode) else s
++
++def decode_path(path):
++"""Decode a given string (bytes or otherwise) using configured path 
encoding options
++"""
++encoding = gitConfig('git-p4.pathEncoding') or 'utf_8'
++if bytes is not str:
++return path.decode(encoding, errors='replace') if 

[arch-commits] Commit in git/repos (7 files)

2020-01-13 Thread Christian Hesse via arch-commits
Date: Monday, January 13, 2020 @ 19:27:06
  Author: eworm
Revision: 373448

archrelease: copy trunk to testing-x86_64

Added:
  git/repos/testing-x86_64/
  git/repos/testing-x86_64/0001-git-p4-python.patch
(from rev 373447, git/trunk/0001-git-p4-python.patch)
  git/repos/testing-x86_64/PKGBUILD
(from rev 373447, git/trunk/PKGBUILD)
  git/repos/testing-x86_64/git-daemon.socket
(from rev 373447, git/trunk/git-daemon.socket)
  git/repos/testing-x86_64/git-daemon@.service
(from rev 373447, git/trunk/git-daemon@.service)
  git/repos/testing-x86_64/git-sysusers.conf
(from rev 373447, git/trunk/git-sysusers.conf)
  git/repos/testing-x86_64/git.install
(from rev 373447, git/trunk/git.install)

--+
 0001-git-p4-python.patch |  631 +
 PKGBUILD |  136 +
 git-daemon.socket|9 
 git-daemon@.service  |   14 
 git-sysusers.conf|1 
 git.install  |   14 
 6 files changed, 805 insertions(+)

Copied: git/repos/testing-x86_64/0001-git-p4-python.patch (from rev 373447, 
git/trunk/0001-git-p4-python.patch)
===
--- testing-x86_64/0001-git-p4-python.patch (rev 0)
+++ testing-x86_64/0001-git-p4-python.patch 2020-01-13 19:27:06 UTC (rev 
373448)
@@ -0,0 +1,631 @@
+diff --git a/git-p4.py b/git-p4.py
+index 40d9e7c594..ca0a874501 100755
+--- a/git-p4.py
 b/git-p4.py
+@@ -8,12 +8,12 @@
+ # License: MIT 
+ #
+ import sys
+-if sys.hexversion < 0x0204:
+-# The limiter is the subprocess module
+-sys.stderr.write("git-p4: requires Python 2.4 or later.\n")
++if sys.version_info.major < 3 and sys.version_info.minor < 7:
++sys.stderr.write("git-p4: requires Python 2.7 or later.\n")
+ sys.exit(1)
+ import os
+ import optparse
++import functools
+ import marshal
+ import subprocess
+ import tempfile
+@@ -27,36 +27,15 @@
+ import ctypes
+ import errno
+ 
++# On python2.7 where raw_input() and input() are both availble,
++# we want raw_input's semantics, but aliased to input for python3
++# compatibility
+ # support basestring in python3
+ try:
+-unicode = unicode
+-except NameError:
+-# 'unicode' is undefined, must be Python 3
+-str = str
+-unicode = str
+-bytes = bytes
+-basestring = (str,bytes)
+-else:
+-# 'unicode' exists, must be Python 2
+-str = str
+-unicode = unicode
+-bytes = str
+-basestring = basestring
+-
+-try:
+-from subprocess import CalledProcessError
+-except ImportError:
+-# from python2.7:subprocess.py
+-# Exception classes used by this module.
+-class CalledProcessError(Exception):
+-"""This exception is raised when a process run by check_call() returns
+-a non-zero exit status.  The exit status will be stored in the
+-returncode attribute."""
+-def __init__(self, returncode, cmd):
+-self.returncode = returncode
+-self.cmd = cmd
+-def __str__(self):
+-return "Command '%s' returned non-zero exit status %d" % 
(self.cmd, self.returncode)
++if raw_input and input:
++input = raw_input
++except:
++pass
+ 
+ verbose = False
+ 
+@@ -105,7 +84,7 @@ def p4_build_cmd(cmd):
+ # Provide a way to not pass this option by setting git-p4.retries to 0
+ real_cmd += ["-r", str(retries)]
+ 
+-if isinstance(cmd,basestring):
++if not isinstance(cmd, list):
+ real_cmd = ' '.join(real_cmd) + ' ' + cmd
+ else:
+ real_cmd += cmd
+@@ -175,18 +154,48 @@ def prompt(prompt_text):
+ """
+ choices = set(m.group(1) for m in re.finditer(r"\[(.)\]", prompt_text))
+ while True:
+-response = raw_input(prompt_text).strip().lower()
++response = input(prompt_text).strip().lower()
+ if not response:
+ continue
+ response = response[0]
+ if response in choices:
+ return response
+ 
++# We need different encoding/decoding strategies for text data being passed
++# around in pipes depending on python version
++if bytes is not str:
++# For python3, always encode and decode as appropriate
++def decode_text_stream(s):
++return s.decode() if isinstance(s, bytes) else s
++def encode_text_stream(s):
++return s.encode() if isinstance(s, str) else s
++else:
++# For python2.7, pass read strings as-is, but also allow writing unicode
++def decode_text_stream(s):
++return s
++def encode_text_stream(s):
++return s.encode('utf_8') if isinstance(s, unicode) else s
++
++def decode_path(path):
++"""Decode a given string (bytes or otherwise) using configured path 
encoding options
++"""
++encoding = gitConfig('git-p4.pathEncoding') or 'utf_8'
++if bytes is not str:
++return path.decode(encoding, errors='replace') if 

[arch-commits] Commit in git/repos (7 files)

2019-12-29 Thread Christian Hesse via arch-commits
Date: Sunday, December 29, 2019 @ 19:43:28
  Author: eworm
Revision: 372337

archrelease: copy trunk to testing-x86_64

Added:
  git/repos/testing-x86_64/
  git/repos/testing-x86_64/0001-git-p4-python.patch
(from rev 372336, git/trunk/0001-git-p4-python.patch)
  git/repos/testing-x86_64/PKGBUILD
(from rev 372336, git/trunk/PKGBUILD)
  git/repos/testing-x86_64/git-daemon.socket
(from rev 372336, git/trunk/git-daemon.socket)
  git/repos/testing-x86_64/git-daemon@.service
(from rev 372336, git/trunk/git-daemon@.service)
  git/repos/testing-x86_64/git-sysusers.conf
(from rev 372336, git/trunk/git-sysusers.conf)
  git/repos/testing-x86_64/git.install
(from rev 372336, git/trunk/git.install)

--+
 0001-git-p4-python.patch |  762 +
 PKGBUILD |  136 
 git-daemon.socket|9 
 git-daemon@.service  |   14 
 git-sysusers.conf|1 
 git.install  |   14 
 6 files changed, 936 insertions(+)

Copied: git/repos/testing-x86_64/0001-git-p4-python.patch (from rev 372336, 
git/trunk/0001-git-p4-python.patch)
===
--- testing-x86_64/0001-git-p4-python.patch (rev 0)
+++ testing-x86_64/0001-git-p4-python.patch 2019-12-29 19:43:28 UTC (rev 
372337)
@@ -0,0 +1,762 @@
+diff --git a/git-p4.py b/git-p4.py
+index 60c73b6a37..d9df7747cb 100755
+--- a/git-p4.py
 b/git-p4.py
+@@ -8,12 +8,12 @@
+ # License: MIT 
+ #
+ import sys
+-if sys.hexversion < 0x0204:
+-# The limiter is the subprocess module
+-sys.stderr.write("git-p4: requires Python 2.4 or later.\n")
++if sys.version_info.major < 3 and sys.version_info.minor < 7:
++sys.stderr.write("git-p4: requires Python 2.7 or later.\n")
+ sys.exit(1)
+ import os
+ import optparse
++import functools
+ import marshal
+ import subprocess
+ import tempfile
+@@ -27,36 +27,15 @@
+ import ctypes
+ import errno
+ 
++# On python2.7 where raw_input() and input() are both availble,
++# we want raw_input's semantics, but aliased to input for python3
++# compatibility
+ # support basestring in python3
+ try:
+-unicode = unicode
+-except NameError:
+-# 'unicode' is undefined, must be Python 3
+-str = str
+-unicode = str
+-bytes = bytes
+-basestring = (str,bytes)
+-else:
+-# 'unicode' exists, must be Python 2
+-str = str
+-unicode = unicode
+-bytes = str
+-basestring = basestring
+-
+-try:
+-from subprocess import CalledProcessError
+-except ImportError:
+-# from python2.7:subprocess.py
+-# Exception classes used by this module.
+-class CalledProcessError(Exception):
+-"""This exception is raised when a process run by check_call() returns
+-a non-zero exit status.  The exit status will be stored in the
+-returncode attribute."""
+-def __init__(self, returncode, cmd):
+-self.returncode = returncode
+-self.cmd = cmd
+-def __str__(self):
+-return "Command '%s' returned non-zero exit status %d" % 
(self.cmd, self.returncode)
++if raw_input and input:
++input = raw_input
++except:
++pass
+ 
+ verbose = False
+ 
+@@ -105,7 +84,7 @@ def p4_build_cmd(cmd):
+ # Provide a way to not pass this option by setting git-p4.retries to 0
+ real_cmd += ["-r", str(retries)]
+ 
+-if isinstance(cmd,basestring):
++if not isinstance(cmd, list):
+ real_cmd = ' '.join(real_cmd) + ' ' + cmd
+ else:
+ real_cmd += cmd
+@@ -167,11 +146,56 @@ def die(msg):
+ sys.stderr.write(msg + "\n")
+ sys.exit(1)
+ 
++def prompt(prompt_text):
++""" Prompt the user to choose one of the choices
++
++Choices are identified in the prompt_text by square brackets around
++a single letter option.
++"""
++choices = set(m.group(1) for m in re.finditer(r"\[(.)\]", prompt_text))
++while True:
++response = input(prompt_text).strip().lower()
++if not response:
++continue
++response = response[0]
++if response in choices:
++return response
++
++# We need different encoding/decoding strategies for text data being passed
++# around in pipes depending on python version
++if bytes is not str:
++# For python3, always encode and decode as appropriate
++def decode_text_stream(s):
++return s.decode() if isinstance(s, bytes) else s
++def encode_text_stream(s):
++return s.encode() if isinstance(s, str) else s
++else:
++# For python2.7, pass read strings as-is, but also allow writing unicode
++def decode_text_stream(s):
++return s
++def encode_text_stream(s):
++return s.encode('utf_8') if isinstance(s, unicode) else s
++
++def decode_path(path):
++"""Decode a given string (bytes or otherwise) using configured 

[arch-commits] Commit in git/repos (7 files)

2018-06-21 Thread Christian Hesse via arch-commits
Date: Thursday, June 21, 2018 @ 18:45:06
  Author: eworm
Revision: 327410

archrelease: copy trunk to testing-x86_64

Added:
  git/repos/testing-x86_64/
  git/repos/testing-x86_64/0001-perl-fix-installing-modules-from-contrib.patch
(from rev 327409, 
git/trunk/0001-perl-fix-installing-modules-from-contrib.patch)
  git/repos/testing-x86_64/PKGBUILD
(from rev 327409, git/trunk/PKGBUILD)
  git/repos/testing-x86_64/git-daemon.socket
(from rev 327409, git/trunk/git-daemon.socket)
  git/repos/testing-x86_64/git-daemon@.service
(from rev 327409, git/trunk/git-daemon@.service)
  git/repos/testing-x86_64/git-sysusers.conf
(from rev 327409, git/trunk/git-sysusers.conf)
  git/repos/testing-x86_64/git.install
(from rev 327409, git/trunk/git.install)

-+
 0001-perl-fix-installing-modules-from-contrib.patch |   48 ++
 PKGBUILD|  138 ++
 git-daemon.socket   |9 +
 git-daemon@.service |   14 +
 git-sysusers.conf   |1 
 git.install |   14 +
 6 files changed, 224 insertions(+)

Copied: 
git/repos/testing-x86_64/0001-perl-fix-installing-modules-from-contrib.patch 
(from rev 327409, git/trunk/0001-perl-fix-installing-modules-from-contrib.patch)
===
--- testing-x86_64/0001-perl-fix-installing-modules-from-contrib.patch  
(rev 0)
+++ testing-x86_64/0001-perl-fix-installing-modules-from-contrib.patch  
2018-06-21 18:45:06 UTC (rev 327410)
@@ -0,0 +1,48 @@
+From cfb3a47cada99d1bdccd08426f122ded2a63834e Mon Sep 17 00:00:00 2001
+From: Christian Hesse 
+Date: Tue, 10 Apr 2018 15:36:41 +0200
+Subject: perl: fix installing modules from contrib
+
+Commit 20d2a30f (Makefile: replace perl/Makefile.PL with simple make rules)
+removed a target that allowed Makefiles from contrib/ to get the correct
+install path. This introduces a new target for main Makefile and fixes
+installation for Mediawiki module.
+
+v2: Pass prefix as that can have influence as well, add single quotes
+for _SQ variant.
+
+Signed-off-by: Christian Hesse 
+---
+ Makefile   | 2 ++
+ contrib/mw-to-git/Makefile | 5 +++--
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 2091f5f892..75b9ad3b48 100644
+--- a/Makefile
 b/Makefile
+@@ -1973,6 +1973,8 @@ GIT-PERL-DEFINES: FORCE
+   echo "$$FLAGS" >$@; \
+   fi
+ 
++perllibdir:
++  @echo '$(perllibdir_SQ)'
+ 
+ .PHONY: gitweb
+ gitweb:
+diff --git a/contrib/mw-to-git/Makefile b/contrib/mw-to-git/Makefile
+index a4b6f7a2cd..4e603512a3 100644
+--- a/contrib/mw-to-git/Makefile
 b/contrib/mw-to-git/Makefile
+@@ -21,8 +21,9 @@ HERE=contrib/mw-to-git/
+ INSTALL = install
+ 
+ SCRIPT_PERL_FULL=$(patsubst %,$(HERE)/%,$(SCRIPT_PERL))
+-INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/perl \
+--s --no-print-directory instlibdir)
++INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/ \
++-s --no-print-directory prefix=$(prefix) \
++perllibdir=$(perllibdir) perllibdir)
+ DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
+ INSTLIBDIR_SQ = $(subst ','\'',$(INSTLIBDIR))
+ 

Copied: git/repos/testing-x86_64/PKGBUILD (from rev 327409, git/trunk/PKGBUILD)
===
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2018-06-21 18:45:06 UTC (rev 327410)
@@ -0,0 +1,138 @@
+# $Id$
+# Maintainer: Christian Hesse 
+# Maintainer: Dan McGee 
+
+pkgname=git
+pkgver=2.18.0
+pkgrel=1
+pkgdesc='the fast distributed version control system'
+arch=(x86_64)
+url='https://git-scm.com/'
+license=('GPL2')
+depends=('curl' 'expat>=2.0' 'perl>=5.14.0' 'perl-error' 'perl-mailtools'
+ 'openssl' 'pcre2' 'grep' 'shadow')
+makedepends=('python2' 'libgnome-keyring' 'xmlto' 'asciidoc')
+optdepends=('tk: gitk and git gui'
+'perl-libwww: git svn'
+'perl-term-readkey: git svn'
+'perl-mime-tools: git send-email'
+'perl-net-smtp-ssl: git send-email TLS support'
+'perl-authen-sasl: git send-email TLS support'
+'perl-mediawiki-api: git mediawiki support'
+'perl-datetime-format-iso8601: git mediawiki support'
+'perl-lwp-protocol-https: git mediawiki https support'
+'perl-cgi: gitweb (web interface) support'
+'python2: various helper scripts'
+'subversion: git svn'
+'gnome-keyring: GNOME keyring credential helper')
+install=git.install
+validpgpkeys=('96E07AF25771955980DAD10020D04E5A713660A7') # Junio C Hamano
+source=("https://www.kernel.org/pub/software/scm/git/git-$pkgver.tar."{xz,sign}
+'git-daemon@.service'
+

[arch-commits] Commit in git/repos (7 files)

2018-05-29 Thread Christian Hesse via arch-commits
Date: Tuesday, May 29, 2018 @ 21:35:40
  Author: eworm
Revision: 325131

archrelease: copy trunk to testing-x86_64

Added:
  git/repos/testing-x86_64/
  git/repos/testing-x86_64/0001-perl-fix-installing-modules-from-contrib.patch
(from rev 325130, 
git/trunk/0001-perl-fix-installing-modules-from-contrib.patch)
  git/repos/testing-x86_64/PKGBUILD
(from rev 325130, git/trunk/PKGBUILD)
  git/repos/testing-x86_64/git-daemon.socket
(from rev 325130, git/trunk/git-daemon.socket)
  git/repos/testing-x86_64/git-daemon@.service
(from rev 325130, git/trunk/git-daemon@.service)
  git/repos/testing-x86_64/git-sysusers.conf
(from rev 325130, git/trunk/git-sysusers.conf)
  git/repos/testing-x86_64/git.install
(from rev 325130, git/trunk/git.install)

-+
 0001-perl-fix-installing-modules-from-contrib.patch |   48 +
 PKGBUILD|  146 ++
 git-daemon.socket   |9 +
 git-daemon@.service |   14 +
 git-sysusers.conf   |1 
 git.install |   14 +
 6 files changed, 232 insertions(+)

Copied: 
git/repos/testing-x86_64/0001-perl-fix-installing-modules-from-contrib.patch 
(from rev 325130, git/trunk/0001-perl-fix-installing-modules-from-contrib.patch)
===
--- testing-x86_64/0001-perl-fix-installing-modules-from-contrib.patch  
(rev 0)
+++ testing-x86_64/0001-perl-fix-installing-modules-from-contrib.patch  
2018-05-29 21:35:40 UTC (rev 325131)
@@ -0,0 +1,48 @@
+From cfb3a47cada99d1bdccd08426f122ded2a63834e Mon Sep 17 00:00:00 2001
+From: Christian Hesse 
+Date: Tue, 10 Apr 2018 15:36:41 +0200
+Subject: perl: fix installing modules from contrib
+
+Commit 20d2a30f (Makefile: replace perl/Makefile.PL with simple make rules)
+removed a target that allowed Makefiles from contrib/ to get the correct
+install path. This introduces a new target for main Makefile and fixes
+installation for Mediawiki module.
+
+v2: Pass prefix as that can have influence as well, add single quotes
+for _SQ variant.
+
+Signed-off-by: Christian Hesse 
+---
+ Makefile   | 2 ++
+ contrib/mw-to-git/Makefile | 5 +++--
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 2091f5f892..75b9ad3b48 100644
+--- a/Makefile
 b/Makefile
+@@ -1973,6 +1973,8 @@ GIT-PERL-DEFINES: FORCE
+   echo "$$FLAGS" >$@; \
+   fi
+ 
++perllibdir:
++  @echo '$(perllibdir_SQ)'
+ 
+ .PHONY: gitweb
+ gitweb:
+diff --git a/contrib/mw-to-git/Makefile b/contrib/mw-to-git/Makefile
+index a4b6f7a2cd..4e603512a3 100644
+--- a/contrib/mw-to-git/Makefile
 b/contrib/mw-to-git/Makefile
+@@ -21,8 +21,9 @@ HERE=contrib/mw-to-git/
+ INSTALL = install
+ 
+ SCRIPT_PERL_FULL=$(patsubst %,$(HERE)/%,$(SCRIPT_PERL))
+-INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/perl \
+--s --no-print-directory instlibdir)
++INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/ \
++-s --no-print-directory prefix=$(prefix) \
++perllibdir=$(perllibdir) perllibdir)
+ DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
+ INSTLIBDIR_SQ = $(subst ','\'',$(INSTLIBDIR))
+ 

Copied: git/repos/testing-x86_64/PKGBUILD (from rev 325130, git/trunk/PKGBUILD)
===
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2018-05-29 21:35:40 UTC (rev 325131)
@@ -0,0 +1,146 @@
+# $Id$
+# Maintainer: Christian Hesse 
+# Maintainer: Dan McGee 
+
+pkgname=git
+pkgver=2.17.1
+pkgrel=1
+pkgdesc="the fast distributed version control system"
+arch=(x86_64)
+url="http://git-scm.com/;
+license=('GPL2')
+depends=('curl' 'expat>=2.0' 'perl>=5.14.0' 'perl-error' 'perl-mailtools'
+ 'openssl' 'pcre2' 'grep' 'shadow')
+makedepends=('python2' 'emacs' 'libgnome-keyring' 'xmlto' 'asciidoc')
+optdepends=('tk: gitk and git gui'
+'perl-libwww: git svn'
+'perl-term-readkey: git svn'
+'perl-mime-tools: git send-email'
+'perl-net-smtp-ssl: git send-email TLS support'
+'perl-authen-sasl: git send-email TLS support'
+'perl-mediawiki-api: git mediawiki support'
+'perl-datetime-format-iso8601: git mediawiki support'
+'perl-lwp-protocol-https: git mediawiki https support'
+'perl-cgi: gitweb (web interface) support'
+'python2: various helper scripts'
+'subversion: git svn'
+'gnome-keyring: GNOME keyring credential helper')
+install=git.install
+validpgpkeys=('96E07AF25771955980DAD10020D04E5A713660A7') # Junio C Hamano
+source=("https://www.kernel.org/pub/software/scm/git/git-$pkgver.tar."{xz,sign}
+