[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Access Violation with 'svn status -u'

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Tue, 10 Jan 2012 16:52:08 +0000

Philip Martin <philip.martin_at_wandisco.com> writes:

> svnadmin create repo
> svn import -mm repo/format file://$PWD/repo/A/f
> svn co -r0 file://$PWD/repo wc
> svn mkdir wc/A
> svn st -u wc
>
> That's obviously a bug. It's crashing in make_file_baton:
>
> f->repos_relpath = svn_relpath_join(find_dir_repos_relpath(pb, pool),
> f->name, pool);
>
> when find_dir_repos_relpath returns NULL. We could set f->repos_relpath
> to NULL, which matched what happens for the directory baton for A, but
> is that correct? find_dir_repos_relpath is returning NULL because the
> "obstructing" A is not versioned, although there is an A in the
> repository. I'm not sure what repos_relpath is supposed to represent
> here. Is it the repository path associated with the name in the
> repository, or the repository path associated with the node in wc.db?

There is a commment in find_dir_repos_relpath:

      /* Note that status->repos_relpath could be NULL in the case of a missing
       * directory, which means we need to recurse up another level to get
       * a useful relpath. */
      if (status)
        return status->repos_relpath;

but the code doesn't recurse. Should that if be changed to

      if (status && status->repos_relpath)
        return status->repos_relpath;

If we do that does that mean that find_dir_repos_relpath can never
return NULL as it always recurses up to some non-NULL path? Should we
remove the "return NULL?

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com
Received on 2012-01-10 17:52:49 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.