On Sun, Oct 8, 2023 at 3:14 PM Daniel Sahlberg
<daniel.l.sahlb...@gmail.com> wrote:
> I was able to reproduce the issue and thanks to Yasuhito's hints I was also 
> able to fix it by using absolute paths when running the svn command. I've 
> committed r1912826 with a simple fix which seems to work for me.
>
> Nathan, can you verify if it also works for you?

Thanks Daniel and Yasuhito for your help!

With r1912826, the test passes now.

I had trouble determining what's different about this test as compared
to others with expected errors containing wc paths. As I described
previously, I experimented with different ways to construct the
expected_error, but I hadn't considered to call the svn command itself
with absolute paths!!

Just to tie up all the loose ends, replying to some earlier questions:

On Fri, Oct 6, 2023 at 3:33 PM Daniel Sahlberg
<daniel.l.sahlb...@gmail.com> wrote:
> From the test:
>
> [[[
>   was_cwd = os.getcwd()
>   from_path = os.path.abspath(sbox.ospath(''))
>   to_path = os.path.abspath(sbox.ospath('F/B'))
>   os.chdir(wc_dir)
> ]]]
>
> Would be interesting to know the values of was_cwd, return value of 
> sbox.ospath("") and how that translates with os.path.abspath() and the same 
> for "F/B".

Even though this is a moot point now, before you wrote your reply I
instrumented the test and printed these out, so for completeness:

was_cwd = /home/nathan/ramdrive/svndev/svn-trunk/subversion/tests/cmdline

from_path:
sbox.ospath('') = svn-test-work/working_copies/copy_tests-17
os.path.abspath(sbox.ospath('')) =
/home/nathan/ramdrive/svndev/svn-trunk/subversion/tests/cmdline/svn-test-work/working_copies/copy_tests-17

to_path:
sbox.ospath('F/B') = svn-test-work/working_copies/copy_tests-17/F/B
os.path.abspath(sbox.ospath('F/B')) =
/home/nathan/ramdrive/svndev/svn-trunk/subversion/tests/cmdline/svn-test-work/working_copies/copy_tests-17/F/B

Expected:
svn: E200007: Cannot move path
'/home/nathan/ramdrive/svndev/svn\-trunk/subversion/tests/cmdline/svn\-test\-work/working_copies/copy_tests\-17'
into its own child
'/home/nathan/ramdrive/svndev/svn\-trunk/subversion/tests/cmdline/svn\-test\-work/working_copies/copy_tests\-17/F/B'

Actual:
svn: E200007: Cannot move path
'/home/nathan/ramdrive/svndev/ramdisk/svn-trunk/working_copies/copy_tests-17'
into its own child
'/home/nathan/ramdrive/svndev/ramdisk/svn-trunk/working_copies/copy_tests-17/F/B'

>> I am assuming that in the expected path, 'svn-test-work' is probably a
>> symlink to ~/ramdrive/svndev/ramdisk. I can't check this at the moment
>> but I will try rerunning later and I'll inspect these locations.

Yes, svn-test-work (subversion/tests/cmdline/svn-test-work) is indeed
a symlink in my case.

> The symlink being an artefact from your custom build system? Sounds like you 
> might be on to something.

The tools/dev/unix-build/Makefile.svn (svn-check-prepare-ramdisk
target) constructs this if you specify RAMDISK in the call to 'make',
e.g.,:

$ make svn-check RAMDISK=$SVN_DEV/ramdisk

Cheers,
Nathan

Reply via email to