cvs2svn-py stable port information

Info2: <<
Package: cvs2svn-py%type_pkg[python]
Version: 1.5.1
Revision: 11
Distribution: (%type_pkg[python] = 23) 10.3, (%type_pkg[python] = 23) 10.4
Type: python (2.3 2.4 2.5)
Description: Python modules for cvs2svn (Python %type_raw[python])
License: BSD
Maintainer: Christian Schaffner

# Dependencies:
Depends: svn (>= 1.4.0-1), svn-client (>= 1.4.0-1), svn-swig-py%type_pkg[python] (>= 1.4.0-1), python%type_pkg[python] (>= 1:2.3.3-23) | python%type_pkg[python]-nox (>= 1:2.3.3-23), python%type_pkg[python]-socket-ssl (>= 1:2.3.3-23) | python%type_pkg[python]-socket (>= 1:2.3.3-23) | python%type_pkg[python]-socket-nox (>= 1:2.3.3-23)
Conflicts: cvs2svn (<= 1:1.1.99-1)
Replaces: cvs2svn (<= 1:1.1.99-1)

# Patch Phase:
Patch: %{Ni}.patch

# Unpack Phase:
Source: mirror:custom:cvs2svn-%v.tar.gz
Source-MD5: d1e42ea51b373be0023f2b3f6b80ec01
CustomMirror: <<
Primary: http://cvs2svn.tigris.org/files/documents/1462/36129/
Secondary: http://chris01.users.finkproject.org/
<<

# Patch Phase:
PatchScript: <<
perl -pi -e 's;#!/usr/bin/env python;#!%p/bin/python%type_raw[python];' run-tests.py
perl -pi -e 's;#!/usr/bin/env python;#!%p/bin/python%type_raw[python];' setup.py
<<

# Compile Phase:
CompileScript: <<
python%type_raw[python] setup.py build
<<

InfoTest: <<
TestScript: make check PYTHON=python%type_raw[python] || exit 2
<<

# Install Phase:
DocFiles: BUGS CHANGES COMMITTERS COPYING HACKING README design-notes.txt
InstallScript: <<
make install DESTDIR=%d PYTHON=python%type_raw[python]

# Install verify-cvs2svn
perl -pi -e 's;#!/usr/bin/env python;#!%p/bin/python%type_raw[python];' verify-cvs2svn.py
/usr/bin/install -m 755 verify-cvs2svn.py %i/bin/verify-cvs2svn

### Install docu
/usr/bin/install -m 755 -d %i/share
/usr/bin/install -m 755 -d %i/share/doc
/usr/bin/install -m 755 -d %i/share/doc/%n
cp -r www %i/share/doc/%n
chmod ugo+r %i/share/doc/%n/www
/usr/bin/install -m 755 -d %i/share/man
/usr/bin/install -m 755 -d %i/share/man/man1
/usr/bin/install -m 644 cvs2svn.1 %i/share/man/man1
<<
SplitOff: <<
Package: %N-bin
Description: Binaries for cvs2svn (Python %type_raw[python])
Depends: %N (= %v-%r)
Conflicts: cvs2svn (<= 1:1.1.99-1), %{Ni}23-bin, %{Ni}24-bin
Replaces: cvs2svn (<= 1:1.1.99-1), %{Ni}23-bin, %{Ni}24-bin
Files: bin share/man
<<

# Additional Info:
DescDetail: <<
cvs2svn is a Python script that converts a CVS repository to a Subversion
repository. It is designed for one-time conversions, not for repeated
synchronizations between CVS and Subversion.
<<
DescUsage: <<
Type 'cvs2svn --help' or 'man cvs2svn' for help. Read the home page for more
information - also available from
/sw/share/doc/cvs2svn/www/cvs2svn.html

Check your new repository carefully after conversion. Mail
dev@cvs2svn.tigris.org if you encounter any problems. You can also ask
questions on IRC at irc.freenode.net, channel #cvs2svn.

You may use the tool 'verify-cvs2svn' to verify your conversion. But a
WARNING: The 'verify-cvs2svn' is not yet finished. It may produce false
warnings or ignore serious problems. Don't trust it!
<<
DescPort: <<
Patched the tests to not fail with Python 2.5. More info can be found at
http://cvs2svn.tigris.org/issues/show_bug.cgi?id=112
<<
Homepage: http://cvs2svn.tigris.org/cvs2svn.html

# End of Info2
<<

cvs2svn-py stable port .patch

diff -Naur cvs2svn-1.5.1_orig/svntest/main.py cvs2svn-1.5.1/svntest/main.py
--- cvs2svn-1.5.1_orig/svntest/main.py 2007-04-05 10:50:14.000000000 +0200
+++ cvs2svn-1.5.1/svntest/main.py 2007-04-05 10:51:03.000000000 +0200
@@ -285,15 +285,18 @@
errfile.close()

if platform_with_os_wait:
- pid, wait_code = os.wait()
+ try:
+ pid, wait_code = os.wait()

- exit_code = int(wait_code / 256)
- exit_signal = wait_code % 256
+ exit_code = int(wait_code / 256)
+ exit_signal = wait_code % 256

- if exit_signal != 0:
- sys.stdout.write("".join(stdout_lines))
- sys.stderr.write("".join(stderr_lines))
- raise SVNProcessTerminatedBySignal
+ if exit_signal != 0:
+ sys.stdout.write("".join(stdout_lines))
+ sys.stderr.write("".join(stderr_lines))
+ raise SVNProcessTerminatedBySignal
+ except OSError:
+ pass

if verbose_mode:
stop = time.time()

cvs2svn-py _unstable_ port information

Info2: <<
Package: cvs2svn-py%type_pkg[python]
Version: 2.0.1
Revision: 12
Distribution: (%type_pkg[python] = 23) 10.3, (%type_pkg[python] = 23) 10.4
Type: python (2.3 2.4 2.5)
Description: Python modules for cvs2svn (Python %type_raw[python])
License: BSD
Maintainer: Christian Schaffner

# Dependencies:
Depends: svn (>= 1.4.0-1), svn-client (>= 1.4.0-1), svn-swig-py%type_pkg[python] (>= 1.4.0-1), python%type_pkg[python] (>= 1:2.3.3-23) | python%type_pkg[python]-nox (>= 1:2.3.3-23), python%type_pkg[python]-socket-ssl (>= 1:2.3.3-23) | python%type_pkg[python]-socket (>= 1:2.3.3-23) | python%type_pkg[python]-socket-nox (>= 1:2.3.3-23)
Conflicts: cvs2svn (<= 1:1.1.99-1), %{Ni}23-bin, %{Ni}24-bin, %{Ni}25-bin
Replaces: cvs2svn (<= 1:1.1.99-1), %{Ni}23-bin, %{Ni}24-bin, %{Ni}25-bin

# Patch Phase:
Patch: %{Ni}.patch

# Unpack Phase:
Source: mirror:custom:cvs2svn-%v.tar.gz
Source-MD5: 98c010de53adb19de6f039aa733b5bbe
CustomMirror: <<
Primary: http://cvs2svn.tigris.org/files/documents/1462/39919/
Secondary: http://chris01.users.finkproject.org/
<<

# Patch Phase:
PatchScript: <<
perl -pi -e 's;#!/usr/bin/env python;#!%p/bin/python%type_raw[python];' run-tests.py
perl -pi -e 's;#!/usr/bin/env python;#!%p/bin/python%type_raw[python];' setup.py
<<

# Compile Phase:
CompileScript: <<
python%type_raw[python] setup.py build
<<

InfoTest: <<
TestScript: make check PYTHON=python%type_raw[python] || exit 2
<<

# Install Phase:
DocFiles: BUGS CHANGES COMMITTERS COPYING HACKING README
InstallScript: <<
make install DESTDIR=%d PYTHON=python%type_raw[python]
mv %i/bin/cvs2svn %i/bin/cvs2svn-py%type_pkg[python]

# Install verify-cvs2svn
perl -pi -e 's;#!/usr/bin/env python;#!%p/bin/python%type_raw[python];' verify-cvs2svn.py
/usr/bin/install -m 755 verify-cvs2svn.py %i/bin/verify-cvs2svn-py%type_pkg[python]

### Install docu
/usr/bin/install -m 755 -d %i/share
/usr/bin/install -m 755 -d %i/share/doc
/usr/bin/install -m 755 -d %i/share/doc/%n
cp -r www %i/share/doc/%n
chmod ugo+r %i/share/doc/%n/www
/usr/bin/install -m 755 -d %i/share/man
/usr/bin/install -m 755 -d %i/share/man/man1
/usr/bin/install -m 644 cvs2svn.1 %i/share/man/man1/cvs2svn.1-py%type_pkg[python]
<<
PostInstScript: <<
if [ "$1" = configure ]; then
update-alternatives --install %p/bin/cvs2svn cvs2svn %p/bin/cvs2svn-py%type_pkg[python] %type_pkg[python] --slave %p/share/man/man1/cvs2svn.1 cvs2svn.1 %p/share/man/man1/cvs2svn.1-py%type_pkg[python] --slave %p/bin/verify-cvs2svn verify-cvs2svn %p/bin/verify-cvs2svn-py%type_pkg[python]
fi
<<
PreRmScript: <<
if [ "$1" = remove ]; then
update-alternatives --remove cvs2svn %p/bin/cvs2svn-py%type_pkg[python]
fi
<<

# Additional Info:
DescDetail: <<
cvs2svn is a program that can be used to migrate a CVS repository to
Subversion (otherwise known as "SVN"). The primary goal of cvs2svn is to
migrate as much information as possible from your old CVS repository to your
new Subversion repository.

But unfortunately, CVS doesn't record complete information about your
project's history. For example, CVS doesn't record what file modifications
took place within the same CVS commit. Therefore, cvs2svn attempts to infer
from CVS's incomplete information what really happened in the history of your
repository. So the second goal of cvs2svn is to reconstruct as much of your
CVS repository's history as possible.
<<
DescUsage: <<
Type 'cvs2svn --help' or 'man cvs2svn' for help. Read the home page for more
information - also available from
%p/share/doc/%n/www/cvs2svn.html

Check your new repository carefully after conversion. Mail
users@cvs2svn.tigris.org if you encounter any problems. You can also ask
questions on IRC at irc.freenode.net, channel #cvs2svn.

You may use the tool 'verify-cvs2svn' to verify your conversion. But a
WARNING: The 'verify-cvs2svn' is not yet finished. It may produce false
warnings or ignore serious problems. Don't trust it!
<<
DescPort: <<
Patched the tests to not fail with Python 2.5. More info can be found at
http://cvs2svn.tigris.org/issues/show_bug.cgi?id=112

Patched to fix a bug in the tests, where cvs an co output slightly
different date formats (e.g. 2007-09-13 vs. 2007/09/13)
<<
DescPackaging: <<
The old cvs2svn-pyXX-bin packages are re-incorporated
into the cvs2svn-pyXX packages as of 2.0.1-11.
<<
Homepage: http://cvs2svn.tigris.org/cvs2svn.html

# End of Info2
<<

cvs2svn-py _unstable_ port .patch

diff -Naur cvs2svn-2.0.1-orig/svntest/main.py cvs2svn-2.0.1/svntest/main.py
--- cvs2svn-2.0.1-orig/svntest/main.py 2007-10-05 07:35:27.000000000 +0200
+++ cvs2svn-2.0.1/svntest/main.py 2007-10-05 07:42:49.000000000 +0200
@@ -325,21 +325,24 @@
exit_code = 0

if platform_with_os_wait:
- pid, wait_code = os.wait()
+ try:
+ pid, wait_code = os.wait()

- if os.WIFSIGNALED(wait_code):
- exit_signal = os.WTERMSIG(wait_code)
- sys.stdout.write("".join(stdout_lines))
- sys.stderr.write("".join(stderr_lines))
- if verbose_mode:
- # show the whole path to make it easier to start a debugger
- sys.stderr.write("CMD: %s terminated by signal %d\n"
- % (command, exit_signal))
- raise SVNProcessTerminatedBySignal
- else:
- exit_code = os.WEXITSTATUS(wait_code)
- if exit_code and verbose_mode:
- sys.stderr.write("CMD: %s exited with %d\n" % (command, exit_code))
+ if os.WIFSIGNALED(wait_code):
+ exit_signal = os.WTERMSIG(wait_code)
+ sys.stdout.write("".join(stdout_lines))
+ sys.stderr.write("".join(stderr_lines))
+ if verbose_mode:
+ # show the whole path to make it easier to start a debugger
+ sys.stderr.write("CMD: %s terminated by signal %d\n"
+ % (command, exit_signal))
+ raise SVNProcessTerminatedBySignal
+ else:
+ exit_code = os.WEXITSTATUS(wait_code)
+ if exit_code and verbose_mode:
+ sys.stderr.write("CMD: %s exited with %d\n" % (command, exit_code))
+ except OSError:
+ pass

return exit_code, stdout_lines, stderr_lines

diff -Naur cvs2svn-2.0.1_orig/run-tests.py cvs2svn-2.0.1/run-tests.py
--- cvs2svn-2.0.1_orig/run-tests.py 2007-10-09 22:38:22.000000000 +0200
+++ cvs2svn-2.0.1/run-tests.py 2007-10-09 22:40:22.000000000 +0200
@@ -2696,7 +2696,12 @@
raise Failure()
if kk_ic != kk_cvs:
raise Failure()
- if kv_ic != kv_cvs:
+
+ # The date format changed between cvs and co ('/' instead of '-').
+ # Accept either one:
+ date_substitution_re = re.compile(r' ([0-9]*)-([0-9]*)-([0-9]*) ')
+ if kv_ic != kv_cvs \
+ and date_substitution_re.sub(r' \1/\2/\3 ', kv_ic) != kv_cvs:
raise Failure()