You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@codematters.co.uk> on 2002/04/23 03:05:01 UTC
Bug in rev 1623 commit_utils.c:do_item_commit()
Hi
I noticed that sometimes the feedback notification isn't printing the
correct paths. I tend to run little tests from my subversion build
directory on working copies in my home directory. Here's the problem:
(gdb) b svn_cl__notify_func
Breakpoint 2 at 0x804b442: file ../svn/subversion/clients/cmdline/feedback.c, line 117.
(gdb) c
Continuing.
Breakpoint 2, svn_cl__notify_func (baton=0x805b868,
action=svn_wc_notify_commit_added, path=0x80629db "")
at ../svn/subversion/clients/cmdline/feedback.c:117
117 switch (action)
(gdb) up
#1 0x4001bbf3 in do_item_commit (url=0x80629f0 "zog3", item=0x80629a8,
editor=0x80638c8, db_stack=0x8063c38, stack_ptr=0xbffff888,
file_mods=0x8063970, tempfiles=0x80639d0,
notify_func=0x804b43c <svn_cl__notify_func>, notify_baton=0x805b868,
display_dir=0x8063960, pool=0x805aa00)
at ../svn/subversion/libsvn_client/commit_util.c:762
762 (*notify_func) (notify_baton, svn_wc_notify_commit_added, path);
(gdb) p path
$1 = 0x80629db ""
(gdb) p item[0].path[0]
$2 = {data = 0x80629c0 "/home/pm/wc/foo/zig/zog3", len = 24, blocksize = 25, pool = 0x805aa00}
(gdb) p display_dir[0]
$3 = {data = 0x8063940 "/home/pm/sw/subversion/obj", len = 26, blocksize = 28, pool = 0x805aa00}
(gdb)
Note that display_dir is totally unrelated to item->path. This occurs
when I run the command 'svn ci /home/pm/wc' from my build directory
/home/pm/sw/subversion/obj. Then in svn_cl__notify_func path is "" but
could be almost anything.
The problem code is libsvn_client/commit_util.c:752
/* Convert an absolute path into a relative one (for feedback.) */
const char *path = item->path->data + (display_dir->len + 1);
which doesn't make much sense.
--
Philip
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Bug in rev 1623 commit_utils.c:do_item_commit()
Posted by Philip Martin <ph...@codematters.co.uk>.
cmpilato@collab.net writes:
> Philip Martin <ph...@codematters.co.uk> writes:
>
> > Note that display_dir is totally unrelated to item->path. This occurs
> > when I run the command 'svn ci /home/pm/wc' from my build directory
> > /home/pm/sw/subversion/obj. Then in svn_cl__notify_func path is "" but
> > could be almost anything.
> >
> > The problem code is libsvn_client/commit_util.c:752
> >
> > /* Convert an absolute path into a relative one (for feedback.) */
> > const char *path = item->path->data + (display_dir->len + 1);
> >
> > which doesn't make much sense.
>
> Your absolutely right.
>
> Question: What would you *like* to see printed in this case? Absolute
> paths? Relative paths (like ../../wc/foo.c)? Keep in mind that the
> output must be consistent (or at least easily calculable for different
> input data) for scriptability purposes.
Given that I specified an absolute path in the 'svn ci' command I
expect an absolute path in the feedback.
--
Philip
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Bug in rev 1623 commit_utils.c:do_item_commit()
Posted by cm...@collab.net.
Philip Martin <ph...@codematters.co.uk> writes:
> Note that display_dir is totally unrelated to item->path. This occurs
> when I run the command 'svn ci /home/pm/wc' from my build directory
> /home/pm/sw/subversion/obj. Then in svn_cl__notify_func path is "" but
> could be almost anything.
>
> The problem code is libsvn_client/commit_util.c:752
>
> /* Convert an absolute path into a relative one (for feedback.) */
> const char *path = item->path->data + (display_dir->len + 1);
>
> which doesn't make much sense.
Your absolutely right.
Question: What would you *like* to see printed in this case? Absolute
paths? Relative paths (like ../../wc/foo.c)? Keep in mind that the
output must be consistent (or at least easily calculable for different
input data) for scriptability purposes.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org