Thread moved from users@ to dev@
On Tue, Dec 04, 2007 at 04:42:48PM -0500, bfc0713@verizon.net wrote:
> This seems like very basic brokedness, so I hope I'm missing something.
> Using 1.4.3, but will upgrade if it can help.
>
> In the trunk, have a directory with a file and a link
> L -> A
>
> In one changeset, remove A, add B, and modify softlink to point at B
>
> L -> B
>
> svn ci ...;
> D A
> A B
> M L
>
> Now try merging that changeset to a branch and you get an error about
> the link-name not existing. It's as though it does the deletion
> first in the merge, then tries the modify on the link, but tries
> to access the *real* file and falls over. The new file isn't added
> during the failed merge.
>
> The link does have svn:special set to * for the link.
First, could these issues be related somehow?
"merging a symlink-turned-into-regular file fails and wedges working
copy": http://subversion.tigris.org/issues/show_bug.cgi?id=2530
"Sym links can only be replaced in 2 steps":
http://subversion.tigris.org/issues/show_bug.cgi?id=2622
Second, I think this is a bug.
Can I create a new issue for this? Or does anyone know whether
a duplicate for this exists in the issue tracker? I searched the
tracker for "link" and "symlink" but nothing that totally matches
this turned up.
Described behaviour confirmed on current trunk with the following recipe:
#!/bin/sh
REPOS_URL="file://`pwd`/repos"
set -e
set -x
rm -rf repos project wc-trunk wc-mybranch
svnadmin create repos
mkdir project
echo a > project/a
(cd project && ln -s a link)
(cd project && svn import $REPOS_URL/trunk -m "import")
svn co $REPOS_URL/trunk wc-trunk
svn mkdir $REPOS_URL/branches -m "create branch dir"
svn cp $REPOS_URL/trunk $REPOS_URL/branches/mybranch -m "branching trunk"
svn rm wc-trunk/a
echo b > wc-trunk/b
svn add wc-trunk/b
(cd wc-trunk && ln -sf b link)
(cd wc-trunk && svn commit -m "removed a, added b, changed link")
svn co $REPOS_URL/branches/mybranch wc-mybranch
(cd wc-mybranch && svn merge $REPOS_URL/branches/mybranch $REPOS_URL/trunk .)
I also ran the merge command in gdb and stopped it at the point
just before the error seems to be thrown. The backtrace is rather huge,
but I'm pasting it below anyway.
Just as Mr. bfc0713 was saying, it looks like during the merge command,
svn_io_file_open tries to open the symlink "link", but because the symlink
target has already been deleted at that point the OS returns ENOENT.
I'm not entirely sure how we should deal with this (i.e. I have no clue :)
I would happily look into fixing this if someone pointed me in the
right direction.
(gdb) bt
#0 svn_io_file_open (new_file=0xbfbfd638, fname=0x82300d0 "link", flag=1,
perm=4095, pool=0x8260018) at subversion/libsvn_subr/io.c:2626
#1 0x08130801 in contents_identical_p (identical_p=0xbfbfd684,
file1=0x825f248 ".svn/tmp/tempfile.4.tmp", file2=0x82300d0 "link",
pool=0x8260018) at subversion/libsvn_subr/io.c:3353
#2 0x081309aa in svn_io_files_contents_same_p (same=0xbfbfd6cc,
file1=0x825f248 ".svn/tmp/tempfile.4.tmp", file2=0x82300d0 "link",
pool=0x8260018) at subversion/libsvn_subr/io.c:3407
#3 0x0809fb8e in svn_wc__merge_internal (log_accum=0xbfbfd884,
merge_outcome=0xbfbfd910, left=0x8230238 "/var/tmp/tmp.2",
right=0x82508c0 ".svn/tmp/tempfile.2.tmp", merge_target=0x82300d0 "link",
copyfrom_text=0x0, adm_access=0x8199978,
left_label=0x82600d0 ".merge-left.r4",
right_label=0x82600e0 ".merge-right.r4",
target_label=0x81554e1 ".working", dry_run=0, diff3_cmd=0x0,
merge_options=0x0, prop_diff=0x82300d8,
conflict_func=0x8075a6c <conflict_resolver>, conflict_baton=0xbfbfd8f0,
pool=0x8260018) at subversion/libsvn_wc/merge.c:625
#4 0x080a019f in svn_wc_merge3 (merge_outcome=0xbfbfd910,
left=0x8230238 "/var/tmp/tmp.2",
right=0x82508c0 ".svn/tmp/tempfile.2.tmp", merge_target=0x82300d0 "link",
adm_access=0x8199978, left_label=0x82600d0 ".merge-left.r4",
right_label=0x82600e0 ".merge-right.r4",
target_label=0x81554e1 ".working", dry_run=0, diff3_cmd=0x0,
merge_options=0x0, prop_diff=0x82300d8,
conflict_func=0x8075a6c <conflict_resolver>, conflict_baton=0xbfbfd8f0,
pool=0x8260018) at subversion/libsvn_wc/merge.c:851
#5 0x08075e88 in merge_file_changed (adm_access=0x8199978,
content_state=0xbfbfd9a0, prop_state=0xbfbfd99c, mine=0x82300d0 "link",
older=0x8230238 "/var/tmp/tmp.2",
yours=0x82508c0 ".svn/tmp/tempfile.2.tmp", older_rev=4, yours_rev=4,
mimetype1=0x0, mimetype2=0x0, prop_changes=0x82300d8,
original_props=0x824a188, baton=0xbfbfde50)
at subversion/libsvn_client/merge.c:503
#6 0x08082b01 in close_file (file_baton=0x8230090,
text_checksum=0x825a1e8 "e9292b8c4fca95ac8c70b4ae040d0b79", pool=0x8230018)
at subversion/libsvn_client/repos_diff.c:789
#7 0x0811fe62 in close_file (file_baton=0x8230088,
text_checksum=0x825a1e8 "e9292b8c4fca95ac8c70b4ae040d0b79", pool=0x8230018)
at subversion/libsvn_delta/cancel.c:235
#8 0x0811fe62 in close_file (file_baton=0x8230080,
text_checksum=0x825a1e8 "e9292b8c4fca95ac8c70b4ae040d0b79", pool=0x8230018)
at subversion/libsvn_delta/cancel.c:235
#9 0x080c6364 in update_entry (b=0x81f43e0, s_rev=4,
s_path=0x8230050 "/branches/mybranch/link", s_entry=0x822d738,
t_path=0x8230070 "/trunk/link", t_entry=0x822de78, dir_baton=0x8219428,
e_path=0x8230068 "link", info=0x0, wc_depth=svn_depth_infinity,
requested_depth=svn_depth_infinity, pool=0x8230018)
at subversion/libsvn_repos/reporter.c:853
#10 0x080c696d in delta_dirs (b=0x81f43e0, s_rev=4,
s_path=0x81ff2b0 "/branches/mybranch", t_path=0x81f4224 "/trunk",
dir_baton=0x8219428, e_path=0x815ab4f "", start_empty=0,
wc_depth=svn_depth_infinity, requested_depth=svn_depth_infinity,
pool=0x81cd018) at subversion/libsvn_repos/reporter.c:1092
#11 0x080c6c9c in drive (b=0x81f43e0, s_rev=4, info=0x81f9040, pool=0x81cd018)
at subversion/libsvn_repos/reporter.c:1156
#12 0x080c6ff6 in finish_report (b=0x81f43e0, pool=0x81cd018)
at subversion/libsvn_repos/reporter.c:1224
#13 0x080c735e in svn_repos_finish_report (baton=0x81f43e0, pool=0x81cd018)
at subversion/libsvn_repos/reporter.c:1343
#14 0x080bbd6d in reporter_finish_report (reporter_baton=0x81f9018,
pool=0x81cd018) at subversion/libsvn_ra_local/ra_plugin.c:209
#15 0x080788c3 in drive_merge_report_editor (target_wcpath=0x81999a0 "",
---Type <return> to continue, or q <return> to quit---
url1=0x8199780 "file:///home/stsp/elego/issues/symlink/repos/branches/mybranch", revision1=4,
url2=0x81997f0 "file:///home/stsp/elego/issues/symlink/repos/trunk",
revision2=4, children_with_mergeinfo=0x0, is_rollback=0,
depth=svn_depth_infinity, notify_b=0xbfbfde20, adm_access=0x8199978,
callbacks=0x815552c, merge_b=0xbfbfde50, pool=0x81cd018)
at subversion/libsvn_client/merge.c:2306
#16 0x0807b2db in do_directory_merge (
url1=0x8199780 "file:///home/stsp/elego/issues/symlink/repos/branches/mybranch", revision1=4,
url2=0x81997f0 "file:///home/stsp/elego/issues/symlink/repos/trunk",
revision2=4, parent_entry=0x8199a10, adm_access=0x8199978,
depth=svn_depth_infinity, notify_b=0xbfbfde20, merge_b=0xbfbfde50,
pool=0x81cd018) at subversion/libsvn_client/merge.c:3913
#17 0x0807c000 in do_merge (merge_sources=0x81cc178, target=0x8199868 "",
target_entry=0x8199a10, adm_access=0x8199978, sources_related=0,
same_repos=1, ignore_ancestry=0, force=0, dry_run=0, record_only=0,
depth=svn_depth_infinity, merge_options=0x0, ctx=0x81987b8, pool=0x8198018)
at subversion/libsvn_client/merge.c:4368
#18 0x0807c459 in svn_client_merge3 (
source1=0x8199780 "file:///home/stsp/elego/issues/symlink/repos/branches/mybranch", revision1=0xbfbfe010,
source2=0x81997f0 "file:///home/stsp/elego/issues/symlink/repos/trunk",
revision2=0xbfbfe000, target_wcpath=0x8199868 "", depth=svn_depth_unknown,
ignore_ancestry=0, force=0, record_only=0, dry_run=0, merge_options=0x0,
ctx=0x81987b8, pool=0x8198018) at subversion/libsvn_client/merge.c:4479
#19 0x08057117 in svn_cl__merge (os=0x8198150, baton=0xbfbfe108,
pool=0x8198018) at subversion/svn/merge-cmd.c:244
#20 0x080568ed in main (argc=5, argv=0xbfbfe294) at subversion/svn/main.c:1832
--
Stefan Sperling <stsp@elego.de> Software Developer
elego Software Solutions GmbH HRB 77719
Gustav-Meyer-Allee 25, Gebaeude 12 Tel: +49 30 23 45 86 96
13355 Berlin Fax: +49 30 23 45 86 95
http://www.elego.de Geschaeftsfuehrer: Olaf Wagner
- application/pgp-signature attachment: stored
Received on Wed Dec 5 00:14:08 2007