subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r1589476 - in /subversion/trunk/subversion: svnadmin/svnadmin.c tests/cmdline/svnadmin_tests.py
Date Wed, 23 Apr 2014 18:09:08 GMT
Author: philip
Date: Wed Apr 23 18:09:08 2014
New Revision: 1589476

URL: http://svn.apache.org/r1589476
Log:
Make 'svnadmin freeze -F <FILE>' split the file on '\r' as well
as '\n' so files can be used more easily on Windows.

* subversion/svnadmin/svnadmin.c
  (subcommand_freeze): Split on '\r'.

* subversion/tests/cmdline/svnadmin_tests.py
  (freeze_freeze): Create second repository, verify freeze exit status,
   test -F.

Modified:
    subversion/trunk/subversion/svnadmin/svnadmin.c
    subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py

Modified: subversion/trunk/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnadmin/svnadmin.c?rev=1589476&r1=1589475&r2=1589476&view=diff
==============================================================================
--- subversion/trunk/subversion/svnadmin/svnadmin.c (original)
+++ subversion/trunk/subversion/svnadmin/svnadmin.c Wed Apr 23 18:09:08 2014
@@ -1215,7 +1215,7 @@ subcommand_freeze(apr_getopt_t *os, void
   else
     {
       /* All repositories in filedata. */
-      paths = svn_cstring_split(opt_state->filedata->data, "\n", FALSE, pool);
+      paths = svn_cstring_split(opt_state->filedata->data, "\r\n", FALSE, pool);
     }
 
   b.command = APR_ARRAY_IDX(args, 0, const char *);

Modified: subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py?rev=1589476&r1=1589475&r2=1589476&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svnadmin_tests.py Wed Apr 23 18:09:08 2014
@@ -2414,12 +2414,25 @@ def verify_packed(sbox):
 # ### in C tests.)
 def freeze_freeze(sbox):
   "svnadmin freeze svnadmin freeze (some-cmd)"
-  sbox.build(create_wc=False, read_only=True)
+
+  sbox.build(read_only=True) # need working copy as location for arg-file
   second_repo_dir, _ = sbox.add_repo_path('backup')
-  svntest.main.run_svnadmin('freeze', '--', sbox.repo_dir,
+  svntest.actions.run_and_verify_svnadmin(None, None, [], "hotcopy",
+                                          sbox.repo_dir, second_repo_dir)
+
+  svntest.actions.run_and_verify_svnadmin(None, None, [],
+                 'freeze', '--', sbox.repo_dir,
                  svntest.main.svnadmin_binary, 'freeze', '--', second_repo_dir,
                  sys.executable, '-c', 'True')
 
+  arg_file = sbox.ospath('arg-file')
+  svntest.main.file_write(arg_file,
+                          "%s\n%s\n" % (sbox.repo_dir, second_repo_dir))
+
+  svntest.actions.run_and_verify_svnadmin(None, None, [],
+                                          'freeze', '-F', arg_file, '--',
+                                          sys.executable, '-c', 'True')
+
 ########################################################################
 # Run the tests
 



Mime
View raw message