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

Bug in rev 1623 commit_utils.c:do_item_commit()

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-04-23 05:05:01 CEST

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
Received on Tue Apr 23 05:06:04 2002

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