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

Re: [PATCH] 'svn mkdir --parents' shows absolute paths

From: Daniel Shahaf <d.s_at_daniel.shahaf.co.il>
Date: Fri, 2 May 2008 14:45:34 +0300 (IDT)

Kamesh Jayachandran wrote on Fri, 2 May 2008 at 17:04 +0530:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Daniel,
>
> Yes this happens only if you give '.' and none of the parents of '.' are
> under version control.
>
> Following is even worse.
> $cd /tmp
> $mkdir addme
> $touch addme/valuable.c
> $svn mkdir --parents addme
>
> Assuming /tmp itself is not an svn wc(which is almost the case)
> svn mkdir --parents wipes off addme.
>

Confirmed -- 'addme' is gone (data loss). Earlier, I noticed that the
assertion failure I reported earlier is due to svn_io_remove_dir2()
changing "" to "." (so APR likes it). It surprised me -- why should mkdir
need to call remove_dir() ?

I can reproduce both bugs with 1.5_at_HEAD too.

Daniel

> With regards
> Kamesh Jayachandran
>
>
> Daniel Shahaf wrote:
> > Kamesh Jayachandran wrote on Fri, 2 May 2008 at 16:13 +0530:
> >> from_svn_wc/a/b/c/d$svn mkdir --parents .
> >> Segmentation fault with your patch.
> >>
> >
> > Also without it. With current (unpatched) trunk:
> >
> > 0:% svnversion
> > exported
> > 0:% svn mkdir --parents .
> > lt-svn: subversion/libsvn_subr/path.c:119: svn_path_join: Assertion
> > `is_canonical(base, blen)' failed.
> > zsh: abort svn mkdir --parents .
> >
> > 0:% svn info | grep URL
> > URL: https://svn.collab.net/repos/svn/trunk
> > 0:% svn mkdir --parents .
> > lt-svn: subversion/libsvn_subr/path.c:119: svn_path_join: Assertion
> > `is_canonical(base, blen)' failed.
> > zsh: abort svn mkdir --parents .
> >
> >> With regards
> >> Kamesh Jayachandran
> >>
> >> Senthil Kumaran S wrote:
> >>> Senthil Kumaran S wrote:
> >>>> Is this an intended behavior? If not the following patch fixes this,
> >>>> which
> >>>> changes/removes a line from the public API svn_client_add4 (I know
> >>>> which is not
> >>>> allowed, but what is the best way to go about this?)
> >>>>
> >>>> [[[
> >>>> 'svn mkdir --parents' shows absolute paths
> >>>>
> >>>> * subversion/libsvn_client/add.c
> >>>> (svn_client_add4): Do not change the path supplied to absolute path.
> >>>>
> >>>> Patch by: stylesen
> >>>> ]]]
> >>> Forgot to attach the patch in the previous email.
> >>>
> >>> Thank You.
> >>>
> >>>
> >>> ------------------------------------------------------------------------
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
> >>> For additional commands, e-mail: dev-help_at_subversion.tigris.org
> >> -----BEGIN PGP SIGNATURE-----
> >> Version: GnuPG v1.2.6 (GNU/Linux)
> >> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> >>
> >> iD8DBQFIGvBL3WHvyO0YTCwRAvYNAJ48Vf6UT15+j1rTlK2LworQhwJF4QCgjqUd
> >> EsoMadQ+Q4v/FFEy/bBP+Hs=
> >> =vJEl
> >> -----END PGP SIGNATURE-----
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
> > For additional commands, e-mail: dev-help_at_subversion.tigris.org
> >
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.6 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFIGvxX3WHvyO0YTCwRAkpjAJsF2a5+AUChfdd15OTWpQJLeAy44ACglnOT
> FifPPU9XlbnL5phamE7g+nE=
> =5XgG
> -----END PGP SIGNATURE-----
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-05-02 13:46:25 CEST

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.