You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by HuiHuang <ye...@yahoo.com.cn> on 2009/07/17 05:39:12 UTC

target cannot be lock problem

Hey Stefan,

>When I run the tests I get failures, however.
>Do you get these failures, too?
No, I pass the test successfully. See below:

CMD: svn.exe commit -m log "svn-test-work\working_copies\commit_tests-1" "svn-test-work\working_copies\commit_tests-1\A\wc2" --config-dir "E:\newSVN\Release\subversion\tests\cmdline\svn-test-work\local_tmp\config" --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.922000>
Sending        svn-test-work\working_copies\commit_tests-1\A\mu
Transmitting file data .Sending        svn-test-work\working_copies\commit_tests-1\A\wc2\A\B\lambda
..
Committed revision 2.

Committed revision 3.
[...]

PASS:  commit_tests.py 1: commit from two nested working copies
CLEANUP: svn-test-work\working_copies\commit_tests-1
CLEANUP: svn-test-work\repositories\commit_tests-1
[...]
PASS:  commit_tests.py 2: commit from two working copies
CLEANUP: svn-test-work\working_copies\commit_tests-2
CLEANUP: svn-test-work\repositories\commit_tests-2

>$ ./commit_tests.py commit_multiple_wc_nested commit_multiple_wc
>subversion/svn/commit-cmd.c:144: (apr_err=200000)
>subversion/libsvn_client/commit.c:2015: (apr_err=200000)
>subversion/libsvn_client/commit.c:1669: (apr_err=200000)
>subversion/libsvn_client/commit.c:1637: (apr_err=200000)
>svn: '/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/working_copies/commit_tests-25/A/wc2' cannot be locked
Is this path the right path? Should not it be 
'/home/stsp/svn/svn-trunk/Release/subversion/tests/cmdline/svn-test-work/working_copies/commit_tests-25/A/wc2'
Under windows the test case is under *Release* dir and the path is like this:
'E:/newSVN/Release/subversion/tests/cmdline/svn-test-work/working_copies/commit_tests-1/A/wc2'.

Thank you.
Huihuang

------------------				 
yellow.flying
2009-07-17

__________________________________________________
赶快注册雅虎超大容量免费邮箱?
http://cn.mail.yahoo.com

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2371959

Re: target cannot be lock problem

Posted by HuiHuang <ye...@yahoo.com.cn>.
Hey,

I think this part is where the difference is produced.

          for (j = 0; j < components->nelts; j++)
            {
              svn_pool_clear(iterpool1);
              component = APR_ARRAY_IDX(components, j, const char *);
              new_base_dir = svn_dirent_join(new_base_dir, component, 
                                             iterpool1);
              lock_err = svn_wc_adm_open3(&base_dir_access,
                                                     NULL,
                                                     new_base_dir,
                                                     TRUE,  /* Write lock */
                                                     -1, /* lock levels */
                                                     ctx->cancel_func, 
                                                     ctx->cancel_baton,
                                                     result_pool);
              if (lock_err)
                {
                  if (lock_err->apr_err == SVN_ERR_WC_NOT_DIRECTORY
                      || lock_err->apr_err == SVN_ERR_WC_LOCKED)
                    svn_error_clear(lock_err);
                  else
                    {
                      error_happened = TRUE;
                      break;
                    }
                }
              else
                {

And here is the most possible error happening place.
[[[
                  check_err = svn_wc_adm_probe_retrieve(&adm_access, 
                                                        base_dir_access, 
                                                        target, 
                                                        iterpool1);
                  if (! check_err)
                    {
                      rel_target = svn_dirent_is_child(new_base_dir, target, 
                                                       iterpool);
]]]
It should step into this if phase and then break.

                      if (rel_target == NULL)
                        rel_target = "";
                      commit_packet = create_commit_packet
                                        (apr_pstrdup(result_pool, new_base_dir),
                                         apr_pstrdup(result_pool, rel_target),
                                         base_dir_access, result_pool);
                      APR_ARRAY_PUSH(*commit_packets, commit_packet_t *) 
                        = commit_packet;
                      break;
                    }
                  svn_error_clear(check_err);
                  SVN_ERR(svn_wc_adm_close2(base_dir_access, iterpool1));
                }
            }

So can you help me to find out why it does not come into above if phase?

Thank you.
Huihuang

------------------				 
yellow.flying
2009-07-17

__________________________________________________
赶快注册雅虎超大容量免费邮箱?
http://cn.mail.yahoo.com

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2372027

Re: target cannot be lock problem

Posted by Stefan Sperling <st...@elego.de>.
On Fri, Jul 17, 2009 at 01:39:12PM +0800, HuiHuang wrote:
> Hey Stefan,
> 
> >When I run the tests I get failures, however.
> >Do you get these failures, too?
> No, I pass the test successfully. See below:
> 
> CMD: svn.exe commit -m log "svn-test-work\working_copies\commit_tests-1" "svn-test-work\working_copies\commit_tests-1\A\wc2" --config-dir "E:\newSVN\Release\subversion\tests\cmdline\svn-test-work\local_tmp\config" --password rayjandom --no-auth-cache --username jrandom
> <TIME = 0.922000>
> Sending        svn-test-work\working_copies\commit_tests-1\A\mu
> Transmitting file data .Sending        svn-test-work\working_copies\commit_tests-1\A\wc2\A\B\lambda
> ..
> Committed revision 2.
> 
> Committed revision 3.
> [...]
> 
> PASS:  commit_tests.py 1: commit from two nested working copies
> CLEANUP: svn-test-work\working_copies\commit_tests-1
> CLEANUP: svn-test-work\repositories\commit_tests-1
> [...]
> PASS:  commit_tests.py 2: commit from two working copies
> CLEANUP: svn-test-work\working_copies\commit_tests-2
> CLEANUP: svn-test-work\repositories\commit_tests-2

Interesting. Then we'll need to figure out what the difference
is between what's done on Windows and what's done on Linux.
 
> >$ ./commit_tests.py commit_multiple_wc_nested commit_multiple_wc
> >subversion/svn/commit-cmd.c:144: (apr_err=200000)
> >subversion/libsvn_client/commit.c:2015: (apr_err=200000)
> >subversion/libsvn_client/commit.c:1669: (apr_err=200000)
> >subversion/libsvn_client/commit.c:1637: (apr_err=200000)
> >svn: '/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/working_copies/commit_tests-25/A/wc2' cannot be locked
> Is this path the right path? Should not it be 
> '/home/stsp/svn/svn-trunk/Release/subversion/tests/cmdline/svn-test-work/working_copies/commit_tests-25/A/wc2'
> Under windows the test case is under *Release* dir and the path is like this:
> 'E:/newSVN/Release/subversion/tests/cmdline/svn-test-work/working_copies/commit_tests-1/A/wc2'.
> 

No that path is fine, there is no "Release" dir when compiling on Linux.

Stefan