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

RE: conflict-storage, and filenames

From: Bert Huijben <bert_at_qqmail.nl>
Date: Mon, 10 May 2010 00:21:12 +0200

> -----Original Message-----
> From: Stefan Sperling [mailto:stsp_at_elego.de]
> Sent: maandag 10 mei 2010 0:05
> To: Greg Stein
> Cc: Bert Huijben; dev_at_subversion.apache.org
> Subject: Re: conflict-storage, and filenames
>
> On Sun, May 09, 2010 at 04:54:17PM -0400, Greg Stein wrote:
> > On Sun, May 9, 2010 at 09:43, Stefan Sperling <stsp_at_elego.de> wrote:
> > > Well, I've been under the impression that the names are currently
> > > 100% predictable. Is that not the case?
> >
> > Nope.
> >
> > $ svn add foo.c foo.c.left foo.c.1.left
> > $ # do something to create conflict file: foo.c.2.left
> > $ svn rm foo.c.1.left
> >
> > If we scanned for the "left" conflict file, we'd stop at foo.c.1.left
> > and never find the *real* one: foo.c.2.left
> >
> > Thus, we have to store the filename that was used.
> >
> > > Assuming the names are predictable, I don't see a need to record
> the names,
> > > so can you explain what you think would break by not recording
> them?
> > > What problem does it really cause for us, or for users?
> >
> > As Bert explained, we need to remove them when the user runs "svn
> > resolved". He also noted that (somtimes) it is possible manually
> > resolve a conflict by removing all the conflict files (a potentially
> > debatable feature).
>
> I see. Then let's just add another field to the skel.
> I guess we can store this within the conflict-type-specific data?
> Storing the basename should be enough since we can assume the file
> will be put into the same directory as the conflicted file, right?

For text conflicts this would be the case, but for a property conflict on a
directory it would be harder to tell where the file is located. (What if the
directory is missing?). Greg suggested adding a wcroot-relative path on IRC.

(Timezone=CEST)
23:03 <@gstein> Bert: re: storing basenames vs relpaths... I think we'll
store relpaths,
23:03 <@gstein> and have a db function to convert to/from the relpaths,
23:03 <@gstein> because we also need that in the workqueue,
23:04 <@gstein> today, we store abspaths in the workqueue which isn't good
23:04 <@Bert> gstein: That will work, once we have a central db. But until
we reach that point the relpath is the basename
23:05 <@gstein> sure, but we should use the conversion functions rather than
just "basename", so that the code automatically switches correctly when we
move to single-db
23:06 <@Bert> (And I didn't know if you intended to make that info public
within libsvn_wc)
23:09 <@gstein> svn_wc__db_to_relpath() and from_relpath(), or somesuch
23:10 <@Bert> *nod*
23:11 <@gstein> not sure if those should be in svn_wc,
23:11 <@gstein> since we want svn_wc to use abspaths

        Bert
Received on 2010-05-10 00:21:53 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.