subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pbu...@apache.org
Subject svn commit: r1401524 [2/2] - in /subversion/branches/auto-props-sdc/subversion: include/ libsvn_client/ libsvn_wc/ tests/cmdline/ tests/cmdline/import_tests_data/ tests/cmdline/import_tests_data/import_tree/ tests/cmdline/import_tests_data/import_tree/...
Date Wed, 24 Oct 2012 01:04:01 GMT
Added: subversion/branches/auto-props-sdc/subversion/tests/cmdline/import_tests_data/import_tree/DIR5.moo/file5.txt
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/tests/cmdline/import_tests_data/import_tree/DIR5.moo/file5.txt?rev=1401524&view=auto
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/tests/cmdline/import_tests_data/import_tree/DIR5.moo/file5.txt
(added)
+++ subversion/branches/auto-props-sdc/subversion/tests/cmdline/import_tests_data/import_tree/DIR5.moo/file5.txt
Wed Oct 24 01:03:59 2012
@@ -0,0 +1 @@
+A file

Propchange: subversion/branches/auto-props-sdc/subversion/tests/cmdline/import_tests_data/import_tree/DIR6/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Wed Oct 24 01:03:59 2012
@@ -0,0 +1,2 @@
+[Ii]ssues?:?(\s*(,|and)?\s*#\d+)+
+(\d+)

Propchange: subversion/branches/auto-props-sdc/subversion/tests/cmdline/import_tests_data/import_tree/DIR6/
------------------------------------------------------------------------------
    bugtraq:url = http://subversion.tigris.org/issues/show_bug.cgi?id=%BUGID%

Propchange: subversion/branches/auto-props-sdc/subversion/tests/cmdline/import_tests_data/import_tree/DIR6/
------------------------------------------------------------------------------
    tsvn:logwidthmarker = 78

Propchange: subversion/branches/auto-props-sdc/subversion/tests/cmdline/import_tests_data/import_tree/DIR6/DIR7/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Wed Oct 24 01:03:59 2012
@@ -0,0 +1,2 @@
+[Ii]ssues?:?(\s*(,|and)?\s*#\d+)+
+(\d+)

Propchange: subversion/branches/auto-props-sdc/subversion/tests/cmdline/import_tests_data/import_tree/DIR6/DIR7/
------------------------------------------------------------------------------
    bugtraq:url = http://subversion.tigris.org/issues/show_bug.cgi?id=%BUGID%

Propchange: subversion/branches/auto-props-sdc/subversion/tests/cmdline/import_tests_data/import_tree/DIR6/DIR7/
------------------------------------------------------------------------------
    tsvn:logwidthmarker = 78

Propchange: subversion/branches/auto-props-sdc/subversion/tests/cmdline/import_tests_data/import_tree/DIR6/DIR7/DIR8.noo/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Wed Oct 24 01:03:59 2012
@@ -0,0 +1,2 @@
+[Ii]ssues?:?(\s*(,|and)?\s*#\d+)+
+(\d+)

Propchange: subversion/branches/auto-props-sdc/subversion/tests/cmdline/import_tests_data/import_tree/DIR6/DIR7/DIR8.noo/
------------------------------------------------------------------------------
    bugtraq:url = http://subversion.tigris.org/issues/show_bug.cgi?id=%BUGID%

Propchange: subversion/branches/auto-props-sdc/subversion/tests/cmdline/import_tests_data/import_tree/DIR6/DIR7/DIR8.noo/
------------------------------------------------------------------------------
    tsvn:logwidthmarker = 78

Added: subversion/branches/auto-props-sdc/subversion/tests/cmdline/import_tests_data/import_tree/DIR6/DIR7/file7.foo
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/tests/cmdline/import_tests_data/import_tree/DIR6/DIR7/file7.foo?rev=1401524&view=auto
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/tests/cmdline/import_tests_data/import_tree/DIR6/DIR7/file7.foo
(added)
+++ subversion/branches/auto-props-sdc/subversion/tests/cmdline/import_tests_data/import_tree/DIR6/DIR7/file7.foo
Wed Oct 24 01:03:59 2012
@@ -0,0 +1 @@
+A file

Added: subversion/branches/auto-props-sdc/subversion/tests/cmdline/import_tests_data/import_tree/DIR6/file6.foo
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/tests/cmdline/import_tests_data/import_tree/DIR6/file6.foo?rev=1401524&view=auto
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/tests/cmdline/import_tests_data/import_tree/DIR6/file6.foo
(added)
+++ subversion/branches/auto-props-sdc/subversion/tests/cmdline/import_tests_data/import_tree/DIR6/file6.foo
Wed Oct 24 01:03:59 2012
@@ -0,0 +1 @@
+A file

Modified: subversion/branches/auto-props-sdc/subversion/tests/cmdline/prop_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/tests/cmdline/prop_tests.py?rev=1401524&r1=1401523&r2=1401524&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/tests/cmdline/prop_tests.py (original)
+++ subversion/branches/auto-props-sdc/subversion/tests/cmdline/prop_tests.py Wed Oct 24 01:03:59
2012
@@ -33,6 +33,8 @@ logger = logging.getLogger()
 import svntest
 
 from svntest.main import SVN_PROP_MERGEINFO
+from svntest.main import SVN_PROP_INHERITABLE_IGNORES
+from svntest import wc
 
 # (abbreviation)
 Skip = svntest.testcase.Skip_deco
@@ -2507,6 +2509,167 @@ def pristine_props_listed(sbox):
   svntest.actions.run_and_verify_svn(None, expected_output, [],
                                      'proplist', '-R', wc_dir, '-r', 'BASE')
 
+def create_inherited_ignores_config(config_dir):
+  "create config stuffs for inherited ignores tests"
+
+  # contents of the file 'config'
+  config_contents = '''\
+[miscellany]
+global-ignores = *.boo *.goo
+'''
+
+  svntest.main.create_config_dir(config_dir, config_contents)
+
+def inheritable_ignores(sbox):
+  "inheritable ignores with svn:ignores and config"
+
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  tmp_dir = os.path.abspath(svntest.main.temp_dir)
+  config_dir = os.path.join(tmp_dir, 'autoprops_config_' + sbox.name)
+  create_inherited_ignores_config(config_dir)
+
+  sbox.simple_propset(SVN_PROP_INHERITABLE_IGNORES, '*.doo', 'A/B')
+  sbox.simple_propset(SVN_PROP_INHERITABLE_IGNORES, '*.moo', 'A/D')
+  sbox.simple_propset('svn:ignore', '*.foo', 'A/B/E')
+  sbox.simple_commit()
+
+  # Some directories and files that should be added because they don't
+  # match any applicable ignores.
+  X_dir_path = os.path.join(wc_dir, 'ADD-ME-DIR-X')
+  Y_dir_path = os.path.join(wc_dir, 'A', 'ADD-ME-DIR-Y.doo')
+  Z_dir_path = os.path.join(wc_dir, 'A', 'D', 'G', 'ADD-ME-DIR-Z.doo')
+  os.mkdir(X_dir_path)
+  os.mkdir(Y_dir_path)
+  os.mkdir(Z_dir_path)
+
+  # Some directories and files that should be ignored when adding
+  # because they match an ignore pattern (unless of course they are
+  # the direct target of an add, which we always add).
+  boo_dir_path = os.path.join(wc_dir, 'IGNORE-ME-DIR.boo')
+  goo_dir_path = os.path.join(wc_dir, 'IGNORE-ME-DIR.boo', 'IGNORE-ME-DIR.goo')
+  doo_dir_path = os.path.join(wc_dir, 'A', 'B', 'IGNORE-ME-DIR.doo')
+  moo_dir_path = os.path.join(wc_dir, 'A', 'D', 'IGNORE-ME-DIR.moo')
+  foo_dir_path = os.path.join(wc_dir, 'A', 'B', 'E', 'IGNORE-ME-DIR.foo')
+  os.mkdir(boo_dir_path)
+  os.mkdir(goo_dir_path)
+  os.mkdir(doo_dir_path)
+  os.mkdir(moo_dir_path)
+  os.mkdir(foo_dir_path)
+  boo_file_path = sbox.ospath('ADD-ME-DIR-X/ignore-me-file.boo')
+  goo_file_path = sbox.ospath('A/D/G/ignore-me-file.goo')
+  doo_file_path = sbox.ospath('A/B/IGNORE-ME-DIR.doo/ignore-me-file.doo')
+  doo_file2_path = sbox.ospath('A/B/E/ignore-me-file.doo')
+  moo_file_path = sbox.ospath('A/D/ignore-me-file.moo')
+  foo_file_path = sbox.ospath('A/B/E/ignore-me-file.foo')
+  svntest.main.file_write(boo_file_path, 'I should not be versioned!\n')
+  svntest.main.file_write(goo_file_path, 'I should not be versioned!\n')
+  svntest.main.file_write(doo_file_path, 'I should not be versioned!\n')
+  svntest.main.file_write(doo_file2_path, 'I should not be versioned!\n')
+  svntest.main.file_write(moo_file_path, 'I should not be versioned!\n')
+  svntest.main.file_write(foo_file_path, 'I should not be versioned!\n')
+
+  # Some directories and files that don't match any ignore pattern
+  # but are located within a subtree that does match and so shouldn't
+  # be added.
+  roo_file_path = sbox.ospath('A/B/IGNORE-ME-DIR.doo/ignore-me-file.roo')
+  svntest.main.file_write(roo_file_path, 'I should not be versioned!\n')
+
+  # Check (non-verbose) status with the custom config. We should only see
+  # the three unversioned directories which don't match any of the ignore
+  # patterns and aren't proper subtrees of an unversioned or ignored
+  # subtree.
+  expected_output = svntest.verify.UnorderedOutput(
+    ['?       ' + X_dir_path + '\n',
+     '?       ' + Y_dir_path + '\n',
+     '?       ' + Z_dir_path + '\n',])
+  svntest.actions.run_and_verify_svn(None, expected_output, [], 'st',
+                                     '--config-dir', config_dir, wc_dir)
+
+  # Check status without the custom config.
+  # Should be the same as above except the *.boo and *.goo paths
+  # now show up as unversioned '?'.
+  expected_output = svntest.verify.UnorderedOutput(
+    ['?       ' + X_dir_path    + '\n',
+     '?       ' + Y_dir_path    + '\n',
+     '?       ' + Z_dir_path    + '\n',
+     '?       ' + boo_dir_path  + '\n',
+     '?       ' + goo_file_path + '\n',])
+  svntest.actions.run_and_verify_svn(None, expected_output, [], 'st', wc_dir)
+
+  # Check status with the custom config and --no-ignore.
+  expected_output = svntest.verify.UnorderedOutput(
+    ['?       ' + X_dir_path     + '\n',
+     '?       ' + Y_dir_path     + '\n',
+     '?       ' + Z_dir_path     + '\n',
+     'I       ' + boo_dir_path   + '\n',
+     'I       ' + doo_dir_path   + '\n',
+     'I       ' + doo_file2_path + '\n',
+     'I       ' + moo_dir_path   + '\n',
+     'I       ' + foo_dir_path   + '\n',
+     'I       ' + goo_file_path  + '\n',
+     'I       ' + moo_file_path  + '\n',
+     'I       ' + foo_file_path  + '\n',])
+  svntest.actions.run_and_verify_svn(None, expected_output, [], 'st',
+                                     '--config-dir', config_dir,
+                                     '--no-ignore', wc_dir)
+
+  # Check status without the custom config and --no-ignore.
+  # Should be the same as above except the *.boo and *.goo paths
+  # are reported as unversioned '?' rather than ignored 'I'.
+  expected_output = svntest.verify.UnorderedOutput(
+    ['?       ' + X_dir_path     + '\n',
+     '?       ' + Y_dir_path     + '\n',
+     '?       ' + Z_dir_path     + '\n',
+     '?       ' + boo_dir_path   + '\n',
+     'I       ' + doo_dir_path   + '\n',
+     'I       ' + doo_file2_path + '\n',
+     'I       ' + moo_dir_path   + '\n',
+     'I       ' + foo_dir_path   + '\n',
+     '?       ' + goo_file_path  + '\n',
+     'I       ' + moo_file_path  + '\n',
+     'I       ' + foo_file_path  + '\n',])
+  svntest.actions.run_and_verify_svn(None, expected_output, [], 'st',
+                                     '--no-ignore', wc_dir)
+
+  # Perform the add with the --force flag, targeting the root of the WC.
+  ### Note: You have to be inside the working copy or else Subversion
+  ### will think you're trying to add the working copy to its parent
+  ### directory, and will (possibly, if the parent directory isn't
+  ### versioned) fail -- see also schedule_tests.py 11 "'svn add'
+  ### should traverse already-versioned dirs"
+  saved_wd = os.getcwd()
+  os.chdir(sbox.wc_dir)
+  expected = svntest.verify.UnorderedOutput(
+    ['A         ' + 'ADD-ME-DIR-X\n',
+     'A         ' + os.path.join('A', 'ADD-ME-DIR-Y.doo') + '\n',
+     'A         ' + os.path.join('A', 'D', 'G', 'ADD-ME-DIR-Z.doo') + '\n'])
+  svntest.actions.run_and_verify_svn("Adds in spite of ignores", expected,
+                                     [], 'add', '.', '--force',
+                                     '--config-dir', config_dir)
+  os.chdir(saved_wd)
+
+  # Now revert and try the add with the --no-ignore flag, only the
+  # svn:inheritable-ignores should be enforced.
+  svntest.actions.run_and_verify_svn(None, None, [], 'revert', wc_dir, '-R')
+  saved_wd = os.getcwd()
+  os.chdir(sbox.wc_dir)
+  expected = svntest.verify.UnorderedOutput(
+    ['A         ' + 'ADD-ME-DIR-X\n',
+     'A         ' + os.path.join('A', 'ADD-ME-DIR-Y.doo') + '\n',
+     'A         ' + os.path.join('A', 'D', 'G', 'ADD-ME-DIR-Z.doo') + '\n',
+     'A         ' + os.path.join('ADD-ME-DIR-X', 'ignore-me-file.boo') + '\n',
+     'A         ' + 'IGNORE-ME-DIR.boo' + '\n',
+     'A         ' + os.path.join('IGNORE-ME-DIR.boo',
+                                 'IGNORE-ME-DIR.goo') + '\n',
+     'A         ' + os.path.join('A', 'B', 'E', 'IGNORE-ME-DIR.foo') + '\n',
+     'A         ' + os.path.join('A', 'B', 'E', 'ignore-me-file.foo') + '\n',
+     'A         ' + os.path.join('A', 'D', 'G', 'ignore-me-file.goo') + '\n'])
+  svntest.actions.run_and_verify_svn("Adds in spite of ignores", expected,
+                                     [], 'add', '.', '--force','--no-ignore',
+                                     '--config-dir', config_dir)
+
 ########################################################################
 # Run the tests
 
@@ -2549,6 +2712,7 @@ test_list = [ None,
               propget_redirection,
               file_matching_dir_prop_reject,
               pristine_props_listed,
+              inheritable_ignores,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/auto-props-sdc/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/auto-props-sdc/subversion/tests/cmdline/svntest/main.py?rev=1401524&r1=1401523&r2=1401524&view=diff
==============================================================================
--- subversion/branches/auto-props-sdc/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/auto-props-sdc/subversion/tests/cmdline/svntest/main.py Wed Oct 24
01:03:59 2012
@@ -175,7 +175,10 @@ work_dir = "svn-test-work"
 SVN_PROP_MERGEINFO = "svn:mergeinfo"
 
 # Constant for the inheritabled auto-props property.
-SVN_CONFIG_AUTOPROPS = "svn:inheritable-auto-props"
+SVN_PROP_INHERITABLE_AUTOPROPS = "svn:inheritable-auto-props"
+
+# Constant for the inheritabled ignores property.
+SVN_PROP_INHERITABLE_IGNORES = "svn:inheritable-ignores"
 
 # Where we want all the repositories and working copies to live.
 # Each test will have its own!



Mime
View raw message