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

Re: Dump of IRC response

From: Greg Stein <gstein_at_gmail.com>
Date: Sun, 22 Feb 2009 16:33:37 +0100

Here is an easy solution:

- rather than redefine svn_dirent_split() and svn_dirent_basename
right before release... let's just make them *private*

No real code change. Just a relabeling of current functionality. We
can then bring in the "right" APIs in 1.7. (and no, we can't add them
in 1.7.1)

Cheers,
-g

On Sun, Feb 22, 2009 at 15:38, Bert Huijben <bert_at_vmoo.com> wrote:
>> -----Original Message-----
>> From: Greg Stein [mailto:gstein_at_gmail.com]
>> Sent: Sunday, February 22, 2009 2:55 AM
>> To: Bert Huijben
>> Cc: dev_at_subversion.tigris.org
>> Subject: Re: Dump of IRC response
>>
>> Alright, so then when would basename *ever* be useful?
>>
>> Dirname/entryname allows for join to work, too.
>
> Looking at this again, I agree.
>
> The original problem I tried to solve was that basename could be "/" or any
> other valid dirent_root. (On Windows "/", "A:", "A:/" and "//server/share"
> could be returned as basename). In my first attempt I made it always return
> "/" as basename for any root.
>
> This version was not compatible with the "A:", "A:/" case as joining "A:"
> with "/" returns changes "A:" into "A:/".
>
> When I started using "" as basename for root all these problems disappeared.
>
>
> I wish I could redefine the dirent apis for 1.6 to use this convention
> everywhere. (See the note in ^/branches/1.6.x/STATUS I just added)
>
> Bert
>
>>
>> On Sat, Feb 21, 2009 at 23:08, Bert Huijben <bert_at_vmoo.com> wrote:
>> > I hope you see this on irc.. otherwise:
>> >
>> > 11:52 <@gstein> Bert: in your addition of the entryname() stuff,
>> > 11:52 <@gstein> you state "the adminstrative area handling should use
>> the
>> > entryname variants"
>> > 11:52 <@gstein> why is that? what makes them special?
>> >
>> > And I answered 11 hours later:
>> >
>> >
>> > 22:58 <@Bert> gstein: The administrative area handling uses "" as the
>> name
>> > of the folder within its own entries list..
>> > While basename can return the parent, '/', 'A:',
>> > '//server/share', etc as basename
>> > 23:01 <@Bert> gstein: That definition of basename works well when you
>> want
>> > svn_dirent_join to work.. but you can never
>> > use a workingcopy in a root drive if you use the
>> combination
>> > of directoryname and basename... E.g.
>> > svn_dirent_split on "A:/" gives dirname "A:/" and
>> basename
>> > "A:/".. so you would start looking for the
>> > entry "A:/" in the entries file located in "A:/.svn/"..
>> while
>> > you really need the "" entry in that file
>> > 23:04 <@Bert> So basename works great if you want to split and join
>> paths..
>> > but not if you need a name of a directory
>> > entry.. (And I don't see a way to integrate both
>> methods.. (I
>> > tried redefining basename last night, but
>> > it breaks unambiguous joining :( )
>> > 23:06 <@Bert> By quick and direty converting all svn_path_* on local
>> paths
>> > to the dirent*entry functions in entries.c,
>> > lock.c and status.c I got a commit in a disk root
>> working..
>> > The code just needs some extra testing before
>> > I want to commit..
>> >
>> > (Feel free to follow up on dev_at_s.t.o or irc)
>> >
>> >
>> > Bert
>> >
>> >
>
>

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1209415
Received on 2009-02-22 16:33:53 CET

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.