List Info

Thread: 'svn add --depth=files newdir' warns if subdir present




'svn add --depth=files newdir' warns if subdir present
user name
2007-09-16 01:38:14
http://subversion.tigris.org/issues/show_bug.cgi?id=2931

                 Issue #|2931
                 Summary|[sparse-directories] 'svn add
--depth=files newdir' wa
                        |rns if subdir present
               Component|subversion
                 Version|trunk
                Platform|All
                     URL|http://subversion.tigris.org/servlets/ReadMsg?list=dev

                        |&msgNo=130077
              OS/Version|All
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P2
            Subcomponent|libsvn_client
             Assigned to|issuessubversion
             Reported by|kfogel






------- Additional comments from kfogeltigris.org Sat Sep 15 23:38:13 -0700 2007 -------
Reported by Joe Swatosh, in 

   http://subversion.tigris.org/servlets/Rea
dMsg?list=dev&msgNo=130077
   From: "Joe Swatosh" <joe.swatoshgmail.com>
   To: "Karl Fogel" <kfogelred-bean.com>, devsubversion.tigris.org
   Subject: Re: svn commit: r26607 - in trunk/subversion: 
            include libsvn_client libsvn_wc svn
tests/cmdline
   References: <200709150754.l8F7sdhe003097svn2.sjc.collab.net>
   	 <ae6cb1100709151640j9e50f0l3184cb8cf97b8139mail.gmail.com>
   	 <87myvn5vns.fsfred-bean.com>
   	 <ae6cb1100709151919q20348b2ai1ecf604dc4ccca8email.gmail.com>
   Message-ID:
<ae6cb1100709152101o5977666ey82ac84b2b9cb7e91mail.gmail.com>
   Date: Sat, 15 Sep 2007 21:01:15 -0700

'svn add -N' ('svn add --depth=files') gives a spurious
warning when adding a
directory that has at least one subdir in it.  The add
succeeds, but the user
sees this ugly warning:

   $ svn add --depth=files wc/new1
   A         wc/new1
   subversion/libsvn_subr/io.c:2516: (apr_err=125001)
   svn: Can't detect MIME type of non-file 'wc/new1/new2'

Here's a script to reproduce:

   #!/bin/sh
   
   # Below should be the only line you need to change.
   SVNDIR=/home/kfogel/src/subversion
   
   SVN=$/subversion/svn/svn
   SVNADMIN=$/subversion/svnadmin/svnadmin
   SVNSERVE=$/subversion/svnserve/svnserve
   URL=file:///`pwd`/repos
   
   rm -rf repos wc
   
   $ create repos
   
   $ mkdir -q -m "Initial import."
$/trunk
   $ co -q $/trunk wc
   mkdir wc/new1
   mkdir wc/new1/new2
   $ add -N wc/new1

------------------------------------------------------------
---------
To unsubscribe, e-mail: issues-unsubscribesubversion.tigris.org
For additional commands, e-mail: issues-helpsubversion.tigris.org


'svn add --depth=files newdir' warns if subdir present
user name
2007-09-16 02:01:01
http://subversion.tigris.org/issues/show_bug.cgi?id=2931




User kfogel changed the following:

                What    ld value 
               |New value
============================================================
====================
                  Status|NEW                       |STARTED
------------------------------------------------------------
--------------------




------- Additional comments from kfogeltigris.org Sun Sep 16 00:01:01 -0700 2007 -------
Got patch, running it through 'make check' right now:

[[[
Fix issue #2931: 'svn add --depth=files newdir' warns if
subdir present.

* subversion/libsvn_client/add.c
  (add_dir_recursive): Don't try to add a directory thinking
it's a file.
    This follows up to r26607.

* subversion/tests/cmdline/depth_tests.py
  (add_tree_at_depth_files): New test.
  (test_list): Run it.
]]]

Index: subversion/libsvn_client/add.c
============================================================
=======
--- subversion/libsvn_client/add.c	(revision 26618)
+++ subversion/libsvn_client/add.c	(working copy)
 -390,7
+390,9 
           SVN_ERR(add_dir_recursive(fullpath, dir_access,
depth_below_here,
                                     force, no_ignore, ctx,
subpool));
         }
-      else if (this_entry.filetype != APR_UNKFILE
&& depth >= svn_depth_files)
+      else if (this_entry.filetype != APR_UNKFILE
+               && this_entry.filetype != APR_DIR
+               && depth >= svn_depth_files)
         {
           err = add_file(fullpath, ctx, dir_access,
subpool);
           if (err && err->apr_err ==
SVN_ERR_ENTRY_EXISTS && force)
Index: subversion/tests/cmdline/depth_tests.py
============================================================
=======
--- subversion/tests/cmdline/depth_tests.py	(revision
26618)
+++ subversion/tests/cmdline/depth_tests.py	(working copy)
 -1110,6
+1110,17 
   svntest.actions.run_and_verify_svn(None, "Depth:
empty", [], "info",
                                      other_I_path)
 
+def add_tree_at_depth_files(sbox):
+  "add multi-subdir tree with --depth=empty"  #
For issue #2931
+  sbox.build()
+  wc_dir = sbox.wc_dir
+  new1_path = os.path.join(wc_dir, 'new1')
+  new2_path = os.path.join(new1_path, 'new2')
+  os.mkdir(new1_path)
+  os.mkdir(new2_path)
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     "add",
"--depth", "files", new1_path)
+
 #----------------------------------------------------------
------------
 
 # list all tests here, starting with None:
 -1135,6
+1146,7 
               diff_in_depthy_wc,
               commit_depth_immediates,
               depth_immediates_receive_new_dir,
+              add_tree_at_depth_files,
             ]
 
 if __name__ == "__main__":


------------------------------------------------------------
---------
To unsubscribe, e-mail: issues-unsubscribesubversion.tigris.org
For additional commands, e-mail: issues-helpsubversion.tigris.org


'svn add --depth=files newdir' warns if subdir present
user name
2007-09-16 02:09:18
http://subversion.tigris.org/issues/show_bug.cgi?id=2931




User kfogel changed the following:

                What    ld value 
               |New value
============================================================
====================
        Target milestone|---                       |1.5
------------------------------------------------------------
--------------------




------------------------------------------------------------
---------
To unsubscribe, e-mail: issues-unsubscribesubversion.tigris.org
For additional commands, e-mail: issues-helpsubversion.tigris.org


'svn add --depth=files newdir' warns if subdir present
user name
2007-09-16 11:23:53
http://subversion.tigris.org/issues/show_bug.cgi?id=2931




User joeswatosh changed the following:

                What    ld value 
               |New value
============================================================
====================
                      CC|''                       
|'joeswatosh'
------------------------------------------------------------
--------------------




------------------------------------------------------------
---------
To unsubscribe, e-mail: issues-unsubscribesubversion.tigris.org
For additional commands, e-mail: issues-helpsubversion.tigris.org


'svn add --depth=files newdir' warns if subdir present
user name
2007-09-16 11:48:44
http://subversion.tigris.org/issues/show_bug.cgi?id=2931




User kfogel changed the following:

                What    ld value 
               |New value
============================================================
====================
                  Status|STARTED                  
|RESOLVED
------------------------------------------------------------
--------------------
              Resolution|                          |FIXED
------------------------------------------------------------
--------------------




------- Additional comments from kfogeltigris.org Sun Sep 16 09:48:43 -0700 2007 -------
Fixed in r26625.

------------------------------------------------------------
---------
To unsubscribe, e-mail: issues-unsubscribesubversion.tigris.org
For additional commands, e-mail: issues-helpsubversion.tigris.org


[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )