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

Re: Subversion svn client doesn't show branch when checking in

From: Andrew Haley <aph_at_redhat.com>
Date: 2006-03-07 12:16:06 CET

Duncan Murdoch writes:
> On 3/1/2006 12:59 PM, Gale, David wrote:
>
> > I'm just agreeing with the original poster that it'd be nice if the log
> > message window would present the path being committed to. Asking
> > developers to do an "svn info" just to find that out seems rather
> > unfriendly, don't you think?
>
> I think putting the path into the log template file would be a good idea.

OK, I'm moving this to dev@subversion.tigris.org as it's a patch
submission.

To recap: the svn client doesn't provide the full URL of a target file
when it opens the editor for "svn commit". Instead, it provides the
local file name. There's no way at that point to tell where in the
repository a file you'll be committing will go.

Because of this, if I do "svn commit" in a private branch I get no
confirmation that files really will be committed to a private branch,
not (for example) the trunk.

This is unnecessarily user-unfriendly, and it is a regression from
cvs, which does tell you which branches a file will be committed to.
It is true that you can use "svn info" before you use "svn commit",
but that's making extra work for the svn user.

As far as I can see from the source code of svn/util.c, this is quite
deliberate: svn has all the information, but it is hidden from the
user.

The only disadvantage I can see to applying this patch is that the
filenames in the editor will be longer.

Andrew.

Index: subversion/svn/util.c
===================================================================
*** subversion/svn/util.c (revision 18657)
--- subversion/svn/util.c (working copy)
***************
*** 525,538 ****
            svn_client_commit_item2_t *item
              = APR_ARRAY_IDX(commit_items, i, svn_client_commit_item2_t *);
! const char *path = item->path;
            char text_mod = '_', prop_mod = ' ', unlock = ' ';
  
            if (! path)
! path = item->url;
! else if (! *path)
! path = ".";
!
! if (path && lmb->base_dir)
! path = svn_path_is_child(lmb->base_dir, path, pool);
  
            /* If still no path, then just use current directory. */
--- 525,533 ----
            svn_client_commit_item2_t *item
              = APR_ARRAY_IDX(commit_items, i, svn_client_commit_item2_t *);
! const char *path = item->url;
            char text_mod = '_', prop_mod = ' ', unlock = ' ';
  
            if (! path)
! path = item->path;
  
            /* If still no path, then just use current directory. */

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Mar 8 16:06:07 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.