You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ma...@apache.org on 2012/08/03 17:19:31 UTC

svn commit: r1369021 - /subversion/trunk/contrib/client-side/svnmerge/svnmerge.py

Author: mattiase
Date: Fri Aug  3 15:19:31 2012
New Revision: 1369021

URL: http://svn.apache.org/viewvc?rev=1369021&view=rev
Log:
When running svn status for checking whether a tree is clean, skip lines
starting with "X" in the output; they just indicate externals. Those
lines were not present in the output before 1.7 but now cause svnmerge.py
to refuse working (on trees with externals) without this change.

(This script is somewhat orphaned by now, but the change was
acknowledged by Giovanni Bajo.)

* contrib/client-side/svnmerge/svnmerge.py
  (check_dir_clean): Skip lines starting with "X".

Modified:
    subversion/trunk/contrib/client-side/svnmerge/svnmerge.py

Modified: subversion/trunk/contrib/client-side/svnmerge/svnmerge.py
URL: http://svn.apache.org/viewvc/subversion/trunk/contrib/client-side/svnmerge/svnmerge.py?rev=1369021&r1=1369020&r2=1369021&view=diff
==============================================================================
--- subversion/trunk/contrib/client-side/svnmerge/svnmerge.py (original)
+++ subversion/trunk/contrib/client-side/svnmerge/svnmerge.py Fri Aug  3 15:19:31 2012
@@ -342,10 +342,13 @@ def check_dir_clean(dir):
     # Checking with -q does not show unversioned files or external
     # directories.  Though it displays a debug message for external
     # directories, after a blank line.  So, practically, the first line
-    # matters: if it's non-empty there is a modification.
+    # matters: if it's non-empty there is a modification. (Lines starting
+    # with "X" must be skipped, since they just indicate externals.)
     out = launchsvn("status -q %s" % dir)
-    if out and out[0].strip():
-        error('"%s" has local modifications; it must be clean' % dir)
+    while out and out[0].strip():
+        if not out[0].startswith("X"):
+            error('"%s" has local modifications; it must be clean' % dir)
+        out.pop(0)
 
 class PathIdentifier:
     """Abstraction for a path identifier, so that we can start talking