Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Jul 2009 18:06:12 +0200
From:      Lapo Luchini <lapo@lapo.it>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/137000: [PATCH] devel/qct: add support for svn 1.6.x
Message-ID:  <4A6738F4.9050903@lapo.it>
Resent-Message-ID: <200907221610.n6MGA5ZG082594@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         137000
>Category:       ports
>Synopsis:       [PATCH] devel/qct: add support for svn 1.6.x
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 22 16:10:05 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Lapo Luchini
>Release:        FreeBSD 7.2-RELEASE-p2 amd64
>Organization:
>Environment:
System: FreeBSD lapo.andxor.it 7.2-RELEASE-p2 FreeBSD 7.2-RELEASE-p2 #0:
Wed Jun 24 00:14:35 UTC 2009
>Description:

qct-1.7 doesn't work with svn 1.6.x as "svn status" format has changed.
The following patch is taked from upstream:
https://sourceforge.net/tracker/?func=detail&aid=2825427&group_id=188871&atid=927052
http://bitbucket.org/sborho/qct/changeset/8f96c7e60786/

Also moved WRKSRC to silence lint.

Added file(s):
- files/patch-qctlib_vcs_svn.py

Port maintainer (bsam@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:

Simply execute qct in a workspace which has some unversioned file.

>Fix:

--- qct-1.7.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/devel/qct.orig/Makefile
/usr/ports/devel/qct/Makefile
--- /usr/ports/devel/qct.orig/Makefile	2009-04-07 18:26:03.000000000 +0200
+++ /usr/ports/devel/qct/Makefile	2009-07-22 18:01:42.000000000 +0200
@@ -10,7 +10,6 @@
 CATEGORIES=	devel python
 MASTER_SITES=	http://qct.sourceforge.net/ \
 		ftp://ftp.ipt.ru/pub/download/${PORTNAME}/
-WRKSRC=		${WRKDIR}/qct

 MAINTAINER=	bsam@FreeBSD.org
 COMMENT=	QCT GUI commit tool
@@ -19,6 +18,7 @@

 USE_PYTHON=	2.5+
 USE_PYDISTUTILS=yes
+WRKSRC=		${WRKDIR}/qct

 post-install:
 .if !defined(NOPORTDOCS)
diff -ruN --exclude=CVS
/usr/ports/devel/qct.orig/files/patch-qctlib_vcs_svn.py
/usr/ports/devel/qct/files/patch-qctlib_vcs_svn.py
--- /usr/ports/devel/qct.orig/files/patch-qctlib_vcs_svn.py	1970-01-01
01:00:00.000000000 +0100
+++ /usr/ports/devel/qct/files/patch-qctlib_vcs_svn.py	2009-07-22
17:58:43.000000000 +0200
@@ -0,0 +1,36 @@
+--- qctlib/vcs/svn.py.orig	2009-02-15 23:49:32.000000000 +0100
++++ qctlib/vcs/svn.py	2009-07-22 17:58:33.000000000 +0200
+@@ -84,6 +84,8 @@ class qctVcsSvn:
+
+         if showIgnored:  extra = ['--no-ignore']
+         else:            extra = []
++        versionOutput = runProgram([self.svn_exe, '--version', '--quiet'])
++        version = [int(s) for s in
versionOutput.split(os.linesep)[0].split('.')]
+         statusOutput = runProgram([self.svn_exe, '--ignore-externals']
+ extra + ['status'])
+         recs = statusOutput.split(os.linesep)
+         recs.pop() # remove last entry (which is '')
+@@ -91,11 +93,19 @@ class qctVcsSvn:
+         if pb: pb.setValue(2)
+
+         for line in recs:
+-            if len(line) < 7:
+-                continue
+-            status = line[0]
+-            fname = line[7:]
+-            self.fileStatus[ fname ] = line[0:6]
++            # a 7th column was added in svn 1.6, see
http://subversion.tigris.org/svn_1.6_releasenotes.html#svn-status
++            if version[0]>1 or version[0]==1 and version[1]>=6:
++                if len(line) < 8:
++                    continue
++                status = line[0]
++                fname = line[8:]
++                self.fileStatus[ fname ] = line[0:7]
++            else:
++                if len(line) < 7:
++                    continue
++                status = line[0]
++                fname = line[7:]
++                self.fileStatus[ fname ] = line[0:6]
+             if status == 'M':  # modified
+                 itemList.append('M ' + fname)
+             elif status == 'A':  # added
--- qct-1.7.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A6738F4.9050903>