#! /bin/sh /usr/share/dpatch/dpatch-run ## 07_svn_externals.dpatch by > ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: No description. @DPATCH@ diff -urNad xxdiff-3.2~/lib/python/xxdiff/scm/subversion.py xxdiff-3.2/lib/python/xxdiff/scm/subversion.py --- xxdiff-3.2~/lib/python/xxdiff/scm/subversion.py 2006-06-11 18:31:29.000000000 -0500 +++ xxdiff-3.2/lib/python/xxdiff/scm/subversion.py 2008-09-09 20:31:21.000000000 -0500 @@ -88,6 +88,72 @@ Status result for a file in a subversion repository. """ +def _parse_status_line(line): + status = SvnStatus() + status.parsed_line = line + + # The first six columns in the output are each one character wide: + lc = iter(line) + + # First column: Says if item was added, deleted, or otherwise + # changed + # ' ' no modifications + # 'A' Added + # 'C' Conflicted + # 'D' Deleted + # 'G' Merged + # 'I' Ignored + # 'M' Modified + # 'R' Replaced + # 'X' item is unversioned, but is used by an externals + # definition + # '?' item is not under version control + # '!' item is missing (removed by non-svn command) or incomplete + # '~' versioned item obstructed by some item of a different kind + status.status = lc.next() + + # Second column: Modifications of a file's or directory's + # properties + # ' ' no modifications + # 'C' Conflicted + # 'M' Modified + status.modprops = lc.next() + + # Third column: Whether the working copy directory is locked + # ' ' not locked + # 'L' locked + status.dirlocked = lc.next() + + # Fourth column: Scheduled commit will contain + # addition-with-history + # ' ' no history scheduled with commit + # '+' history scheduled with commit + status.withhist = lc.next() + + # Fifth column: Whether the item is switched relative to its + # parent + # ' ' normal + # 'S' switched + status.switched = lc.next() + + # Sixth column: Repository lock token + # (without -u) + # ' ' no lock token + # 'K' lock token present + # (with -u) + # ' ' not locked in repository, no lock token + # 'K' locked in repository, lock toKen present + # 'O' locked in repository, lock token in some Other working + # copy + # 'T' locked in repository, lock token present but sTolen + # 'B' not locked in repository, lock token present but Broken + status.locktoken = lc.next() + + # There is a space and the rest is a filename: + status.filename = line[7:].strip() + assert isabs(status.filename) + return status + def status(rootdirs): """ Obtains the status from all the given root directories. @@ -106,72 +172,14 @@ statii = [] for line in stdout.splitlines(): - status = SvnStatus() - status.parsed_line = line - - # The first six columns in the output are each one character wide: - lc = iter(line) - - # First column: Says if item was added, deleted, or otherwise - # changed - # ' ' no modifications - # 'A' Added - # 'C' Conflicted - # 'D' Deleted - # 'G' Merged - # 'I' Ignored - # 'M' Modified - # 'R' Replaced - # 'X' item is unversioned, but is used by an externals - # definition - # '?' item is not under version control - # '!' item is missing (removed by non-svn command) or incomplete - # '~' versioned item obstructed by some item of a different kind - status.status = lc.next() - - # Second column: Modifications of a file's or directory's - # properties - # ' ' no modifications - # 'C' Conflicted - # 'M' Modified - status.modprops = lc.next() - - # Third column: Whether the working copy directory is locked - # ' ' not locked - # 'L' locked - status.dirlocked = lc.next() - - # Fourth column: Scheduled commit will contain - # addition-with-history - # ' ' no history scheduled with commit - # '+' history scheduled with commit - status.withhist = lc.next() - - # Fifth column: Whether the item is switched relative to its - # parent - # ' ' normal - # 'S' switched - status.switched = lc.next() - - # Sixth column: Repository lock token - # (without -u) - # ' ' no lock token - # 'K' lock token present - # (with -u) - # ' ' not locked in repository, no lock token - # 'K' locked in repository, lock toKen present - # 'O' locked in repository, lock token in some Other working - # copy - # 'T' locked in repository, lock token present but sTolen - # 'B' not locked in repository, lock token present but Broken - status.locktoken = lc.next() - - # There is a space and the rest is a filename: - status.filename = line[7:].strip() - assert isabs(status.filename) - - statii.append(status) - + ignore = False + if not line: + ignore = True + if line.startswith('Performing status on external item'): + ignore = True + if not ignore: + status = _parse_status_line(line) + statii.append(status) # Note: we could parse this information, but this requires server access: # -----------------------------------------------------------------------