On Tue, Apr 22, 2008 at 08:51:56PM +0200, Robert Hunger wrote:
> Package: svn-load
> Version: 0.9-1
> Severity: important
> Tags: patch
>
> Hi,
>
> There are two related problems.
>
> Precondition: A subversion directory which contains:
> (1) a symbolic link which points to an existing directory when checked out
> (2) a symbolic link which is broken when checked out
>
> When svn-load is used to update this directory with no change on link (1),
> than the message "Can't replace direcory ... with file ..." is shown.
> Unfortunatly the import is _not_ aborted. It is committed in an
> _inconsistent_ state. Every file manipulation until the error occured seams
> ok, all later are missing. (Reason: "os.path.isdir" returns True on a link
> pointing to a directory.)
>
> When svn-load is used to update this directory with no change on link (2),
> the (broken) link changes to be a normal file.
>
> Cheers
> Robert
>
> -- System Information:
> Debian Release: 4.0
> APT prefers stable
> APT policy: (990, 'stable'), (400, 'testing'), (300, 'unstable')
> Architecture: i386 (i686)
> Shell: /bin/sh linked to /bin/bash
> Kernel: Linux 2.6.18-6-686-bigmem
> Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
>
> Versions of packages svn-load depends on:
> ii python 2.4.4-2 An interactive high-level
> object-o
> ii python-svn 1.5.0dfsg-1 A(nother) Python interface to
> Subv
>
> svn-load recommends no packages.
>
> -- no debconf information
> --- svn-load-0.9.orig/svn-load
> +++ svn-load-0.9/svn-load
> @@ -333,7 +334,7 @@
> for path in files + dirs:
> relpath = os.path.join(root, path)[len(dir1)+1:]
> counterpath = os.path.join(dir2, relpath)
> - if not os.path.exists(counterpath):
> + if not os.path.lexists(counterpath):
> unique.append(relpath)
>
> return unique
> @@ -372,7 +373,7 @@
> fullpath = os.path.join(root, f)
> relpath = fullpath[len(newdir)+1:]
> counterpath = os.path.join(workingdir, relpath)
> - if os.path.isdir(counterpath):
> + if os.path.isdir(counterpath) and not
> os.path.islink(counterpath):
> sys.stderr.write("Can't replace directory %s with file %s.\n"
> % (counterpath, fullpath))
> return False
*sigh* - more symlink fun. Thanks for the patch Robert - at first
glance, it looks good. Would you mind adding the corresponding tests
cases? I'm happy to do it otherwise, but might take me a few days to
get around to it.
--
dann frazier
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]