subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r1294191 [7/7] - in /subversion/branches/fix-rdump-editor: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ subversion/bindings/swig/ subversion/bindings/swig/include/ subversion/bindings/swig/perl/native/ subversion/b...
Date Mon, 27 Feb 2012 15:52:04 GMT
Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/update_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/update_tests.py?rev=1294191&r1=1294190&r2=1294191&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/update_tests.py Mon Feb
27 15:52:00 2012
@@ -307,6 +307,92 @@ def update_binary_file_2(sbox):
 
 #----------------------------------------------------------------------
 
+@XFail()
+@Issue(4128)
+def update_binary_file_3(sbox):
+  "update locally modified file to equal versions"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # Suck up contents of a test .png file.
+  theta_contents = open(os.path.join(sys.path[0], "theta.bin"), 'rb').read()
+
+  # Write our files contents out to disk, in A/theta.
+  theta_path = os.path.join(wc_dir, 'A', 'theta')
+  svntest.main.file_write(theta_path, theta_contents, 'wb')
+
+  # Now, `svn add' that file.
+  svntest.main.run_svn(None, 'add', theta_path)
+
+  # Created expected output tree for 'svn ci'
+  expected_output = svntest.wc.State(wc_dir, {
+    'A/theta' : Item(verb='Adding  (bin)'),
+    })
+
+  # Create expected status tree
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.add({
+    'A/theta' : Item(status='  ', wc_rev=2),
+    })
+
+  # Commit the new binary file, creating revision 2.
+  svntest.actions.run_and_verify_commit(wc_dir, expected_output,
+                                        expected_status, None, wc_dir)
+
+  # Make some mods to the binary files.
+  svntest.main.file_append(theta_path, "foobar")
+  new_theta_contents = theta_contents + "foobar"
+
+  # Created expected output tree for 'svn ci'
+  expected_output = svntest.wc.State(wc_dir, {
+    'A/theta' : Item(verb='Sending'),
+    })
+
+  # Create expected status tree
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+  expected_status.add({
+    'A/theta' : Item(status='  ', wc_rev=3),
+    })
+
+  # Commit modified working copy, creating revision 3.
+  svntest.actions.run_and_verify_commit(wc_dir, expected_output,
+                                        expected_status, None, wc_dir)
+
+  # Now we locally modify the file back to the old version.  
+  svntest.main.file_write(theta_path, theta_contents, 'wb')
+
+  # Create expected output tree for an update to rev 2.
+  expected_output = svntest.wc.State(wc_dir, {
+    'A/theta' : Item(status='  '),
+    })
+
+  # Create expected disk tree for the update
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.add({
+    'A/theta' : Item(theta_contents,
+                     props={'svn:mime-type' : 'application/octet-stream'}),
+    })
+
+  # Create expected status tree for the update.
+  expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
+  expected_status.add({
+    'A/theta' : Item(status='  ', wc_rev=2),
+    })
+
+  # Do an update from revision 2 and make sure that our binary file
+  # gets reverted to its original contents.
+  # This used to raise a conflict.
+  svntest.actions.run_and_verify_update(wc_dir,
+                                        expected_output,
+                                        expected_disk,
+                                        expected_status,
+                                        None, None, None,
+                                        None, None, 1,
+                                        '-r', '2', wc_dir)
+
+#----------------------------------------------------------------------
+
 def update_missing(sbox):
   "update missing items (by name) in working copy"
 
@@ -1189,6 +1275,7 @@ def another_hudson_problem(sbox):
 
   # Sigh, I can't get run_and_verify_update to work (but not because
   # of issue 919 as far as I can tell)
+  expected_output = svntest.verify.UnorderedOutput(expected_output)
   svntest.actions.run_and_verify_svn(None,
                                      expected_output, [],
                                      'up', G_path)
@@ -5680,6 +5767,7 @@ test_list = [ None,
               update_moved_dir_file_add,
               update_moved_dir_dir_add,
               update_moved_dir_file_move,
+              update_binary_file_3,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/fix-rdump-editor/subversion/tests/cmdline/upgrade_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/subversion/tests/cmdline/upgrade_tests.py?rev=1294191&r1=1294190&r2=1294191&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/subversion/tests/cmdline/upgrade_tests.py (original)
+++ subversion/branches/fix-rdump-editor/subversion/tests/cmdline/upgrade_tests.py Mon Feb
27 15:52:00 2012
@@ -1079,7 +1079,7 @@ def upgrade_with_missing_subdir(sbox):
   svntest.main.safe_rmtree(sbox.ospath('A/B'))
 
   # Now upgrade the working copy and expect a missing subdir
-  expected_output = [
+  expected_output = svntest.verify.UnorderedOutput([
     "Upgraded '%s'\n" % sbox.wc_dir,
     "Upgraded '%s'\n" % sbox.ospath('A'),
     "Skipped '%s'\n" % sbox.ospath('A/B'),
@@ -1087,7 +1087,7 @@ def upgrade_with_missing_subdir(sbox):
     "Upgraded '%s'\n" % sbox.ospath('A/D'),
     "Upgraded '%s'\n" % sbox.ospath('A/D/G'),
     "Upgraded '%s'\n" % sbox.ospath('A/D/H'),
-  ]
+  ])
   svntest.actions.run_and_verify_svn(None, expected_output, [],
                                      'upgrade', sbox.wc_dir)
 

Modified: subversion/branches/fix-rdump-editor/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd?rev=1294191&r1=1294190&r2=1294191&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd
(original)
+++ subversion/branches/fix-rdump-editor/tools/buildbot/slaves/win32-SharpSvn/svntest-bindings.cmd
Mon Feb 27 15:52:00 2012
@@ -32,8 +32,6 @@ IF ERRORLEVEL 1 (
 PATH %PATH%;%TESTDIR%\bin
 SET result=0
 
-
-echo python win-tests.py -r -f fsfs --javahl "%TESTDIR%\tests"
 python win-tests.py -r -f fsfs --javahl "%TESTDIR%\tests"
 IF ERRORLEVEL 1 (
   echo [python reported error %ERRORLEVEL%]
@@ -44,10 +42,10 @@ IF EXIST "%TESTDIR%\swig" rmdir /s /q "%
 mkdir "%TESTDIR%\swig\py-release\libsvn"
 mkdir "%TESTDIR%\swig\py-release\svn"
 
-xcopy "release\subversion\bindings\swig\python\*.pyd" "%TESTDIR%\swig\py-release\libsvn\*.pyd"
-xcopy "release\subversion\bindings\swig\python\libsvn_swig_py\*.dll" "%TESTDIR%\swig\py-release\libsvn\*.dll"
-xcopy "subversion\bindings\swig\python\*.py" "%TESTDIR%\swig\py-release\libsvn\*.py"
-xcopy "subversion\bindings\swig\python\svn\*.py" "%TESTDIR%\swig\py-release\svn\*.py"
+xcopy "release\subversion\bindings\swig\python\*.pyd" "%TESTDIR%\swig\py-release\libsvn\*.pyd"
> nul:
+xcopy "release\subversion\bindings\swig\python\libsvn_swig_py\*.dll" "%TESTDIR%\swig\py-release\libsvn\*.dll"
> nul:
+xcopy "subversion\bindings\swig\python\*.py" "%TESTDIR%\swig\py-release\libsvn\*.py" >
nul:
+xcopy "subversion\bindings\swig\python\svn\*.py" "%TESTDIR%\swig\py-release\svn\*.py" >
nul:
 
 SET PYTHONPATH=%TESTDIR%\swig\py-release
 
@@ -57,4 +55,25 @@ IF ERRORLEVEL 1 (
   SET result=1
 )
 
+mkdir "%TESTDIR%\swig\pl-release\SVN"
+mkdir "%TESTDIR%\swig\pl-release\auto\SVN"
+xcopy subversion\bindings\swig\perl\native\*.pm "%TESTDIR%\swig\pl-release\SVN" > nul:
+pushd release\subversion\bindings\swig\perl\native
+for %%i in (*.dll) do (
+  set name=%%i
+  mkdir "%TESTDIR%\swig\pl-release\auto\SVN\!name:~0,-4!"
+  xcopy "!name:~0,-4!.*" "%TESTDIR%\swig\pl-release\auto\SVN\!name:~0,-4!" > nul:
+  xcopy /y "_Core.dll" "%TESTDIR%\swig\pl-release\auto\SVN\!name:~0,-4!" > nul:
+)
+popd
+
+SET PERL5LIB=%PERL5LIB%;%TESTDIR%\swig\pl-release;
+pushd subversion\bindings\swig\perl\native
+perl -MExtUtils::Command::MM -e test_harness() t\*.t
+IF ERRORLEVEL 1 (
+  echo [Perl reported error %ERRORLEVEL%]
+  REM SET result=1
+)
+popd
+
 exit /b %result%

Modified: subversion/branches/fix-rdump-editor/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd?rev=1294191&r1=1294190&r2=1294191&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd
(original)
+++ subversion/branches/fix-rdump-editor/tools/buildbot/slaves/win32-SharpSvn/svntest-cleanup.cmd
Mon Feb 27 15:52:00 2012
@@ -48,7 +48,9 @@ IF NOT ERRORLEVEL 1 (
 )
 POPD
 
+
 taskkill /im svn.exe /f 2> nul:
+taskkill /im svnlook.exe /f 2> nul:
 taskkill /im svnadmin.exe /f 2> nul:
 taskkill /im svnserve.exe /f 2> nul:
 taskkill /im svnrdump.exe /f 2> nul:
@@ -58,6 +60,9 @@ taskkill /im op-depth-test.exe /f 2> nul
 IF EXIST "%TESTDIR%\tests\subversion\tests\cmdline\httpd\" (
   rmdir /s /q  "%TESTDIR%\tests\subversion\tests\cmdline\httpd"
 )
+IF EXIST "%TESTDIR%\swig\" (
+  rmdir /s /q  "%TESTDIR%\swig"
+)
 
 del "%TESTDIR%\tests\*.log" 2> nul:
 

Modified: subversion/branches/fix-rdump-editor/tools/dev/unix-build/Makefile.svn
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/tools/dev/unix-build/Makefile.svn?rev=1294191&r1=1294190&r2=1294191&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/branches/fix-rdump-editor/tools/dev/unix-build/Makefile.svn Mon Feb 27 15:52:00
2012
@@ -70,7 +70,7 @@ SERF_VER	= 1.0.0
 SERF_OLD_VER	= 0.3.1
 CYRUS_SASL_VER	= 2.1.23
 SQLITE_VER	= 3070603
-LIBMAGIC_VER	= 5.07
+LIBMAGIC_VER	= 5.11
 RUBY_VER	= 1.8.7-p334
 BZ2_VER	= 1.0.6
 PYTHON_VER	= 2.7.2

Modified: subversion/branches/fix-rdump-editor/tools/dist/backport.pl
URL: http://svn.apache.org/viewvc/subversion/branches/fix-rdump-editor/tools/dist/backport.pl?rev=1294191&r1=1294190&r2=1294191&view=diff
==============================================================================
--- subversion/branches/fix-rdump-editor/tools/dist/backport.pl (original)
+++ subversion/branches/fix-rdump-editor/tools/dist/backport.pl Mon Feb 27 15:52:00 2012
@@ -24,21 +24,19 @@ use Term::ReadKey qw/ReadMode ReadKey/;
 use File::Temp qw/tempfile/;
 use POSIX qw/ctermid/;
 
-$/ = ""; # paragraph mode
-
 my $SVN = $ENV{SVN} || 'svn'; # passed unquoted to sh
 my $VIM = 'vim';
 my $STATUS = './STATUS';
 my $BRANCHES = '^/subversion/branches';
 
-my $YES = $ENV{YES}; # batch mode: assume 'yes' without asking
+my $YES = $ENV{YES}; # batch mode: eliminate prompts, add sleeps
 my $WET_RUN = qw[false true][1]; # don't commit
 my $DEBUG = qw[false true][0]; # 'set -x', etc
 
 # derived values
 my $SVNq;
 
-$SVN .= " --non-interactive" unless defined ctermid;
+$SVN .= " --non-interactive" if $YES or not defined ctermid;
 $SVNq = "$SVN -q ";
 $SVNq =~ s/-q// if $DEBUG eq 'true';
 
@@ -82,7 +80,7 @@ sub merge {
     # NOTE: This doesn't escape the branch into the pattern.
     $pattern = sprintf '\V\(%s branch(es)?\|branches\/%s\|Branch(es)?:\n *%s\)', $entry{branch},
$entry{branch}, $entry{branch};
     $mergeargs = "--reintegrate $BRANCHES/$entry{branch}";
-    print $logmsg_fh "Reintergrate the $entry{header}:";
+    print $logmsg_fh "Reintegrate the $entry{header}:";
     print $logmsg_fh "";
   } elsif (@{$entry{revisions}}) {
     $pattern = '^ [*] \V' . 'r' . $entry{revisions}->[0];
@@ -127,7 +125,10 @@ EOF
   $script .= <<"EOF" if $entry{branch};
 reinteg_rev=\`$SVN info $STATUS | sed -ne 's/Last Changed Rev: //p'\`
 if $WET_RUN; then
+  # Sleep to avoid out-of-order commit notifications
+  if [ -n "$YES" ]; then sleep 15; fi
   $SVNq rm $BRANCHES/$entry{branch} -m "Remove the '$entry{branch}' branch, reintegrated
in r\$reinteg_rev."
+  if [ -n "$YES" ]; then sleep 1; fi
 else
   echo "Removing reintegrated '$entry{branch}' branch"
 fi
@@ -228,22 +229,32 @@ sub main {
   usage, exit 0 if @ARGV;
   usage, exit 1 unless -r $STATUS;
 
-  my $sawapproved;
   @ARGV = $STATUS;
+
+  # Skip most of the file
   while (<>) {
-    my @lines = split /\n/;
+    last if /^Approved changes/;
+  }
+  while (<>) {
+    last unless /^=+$/;
+  }
+  $/ = ""; # paragraph mode
 
-    # Skip most of the file
-    next unless $sawapproved ||= /^Approved changes/;
+  while (<>) {
+    my @lines = split /\n/;
 
     given ($lines[0]) {
       # Section header
       when (/^[A-Z].*:$/i) {
         print "\n\n=== $lines[0]" unless $YES;
       }
+      # Separator after section header
+      when (/^=+$/i) {
+        break;
+      }
       # Backport entry?
       when (/^ \*/) {
-        handle_entry @lines if $sawapproved;
+        handle_entry @lines;
       }
       default {
         warn "Unknown entry '$lines[0]' at $ARGV:$.\n";



Mime
View raw message