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

Re: Mergeinfo not inherited due to file externals

From: Paul Burba <ptburba_at_gmail.com>
Date: Fri, 6 Aug 2010 18:52:17 -0400

On Wed, Aug 4, 2010 at 4:04 AM, Bert Huijben <bert_at_qqmail.nl> wrote:
>
>
>> -----Original Message-----
>> From: Paul Burba [mailto:ptburba_at_gmail.com]
>> Sent: dinsdag 3 augustus 2010 22:50
>> To: Brandt, Servatius (External)
>> Cc: Subversion Development List
>> Subject: Re: Mergeinfo not inherited due to file externals
>>
>> On Mon, Jul 26, 2010 at 4:50 AM, Brandt, Servatius (External)
>> <servatius.brandt.external_at_ts.fujitsu.com> wrote:
>> > A merge into a directory with a file external shows the following
>> > problems:
>> >
>> > 1) mergeinfo at the directory is not inherited (and all files and
>> >   subdirectories get their own inheritable mergeinfo).
>> >
>> > 2) mergeinfo is added to the external file.
>> >
>> > The mergeinfo at the external file is just wrong and useless, and 1)
>> > will cause problems on a reintegrate merge.  A use case and an
>> example
>> > are following.
>>
>> Hi Servatius,
>>
>> What's happening here is that the merge tracking logic erroneously
>> treats externals the same as switched subtrees and sets mergeinfo to
>> segregate the "switched" subtree, so if it is later unswitched, it
>> doesn't inherit mergeinfo from the root of the branch which was never
>> actually merged.  This is fine for switched subtrees, but I agree with
>> you, it doesn't make much sense for externals (which might not even be
>> from the same repository!).
>
> Currently file externals *must* always be from the same repository, because they are just switched files with a bit of special UI on top of them. (See the original introduction text of file externals)

Hi Bert,

What introduction are you speaking of?

> We didn't fix this limitation for WC-NG yet, even though we should be able to describe a new working copy for just a file. (An issue would be that we can't use the normal update editor to describe changes on just a file, but that is easy to work around)
>
> I think you can assume that for a file-external no unswitched BASE_NODE exists, while for a normal switched path there most likely is a BASE node.

When I use svn_wc__db_read_info() to query a file or directory
external from the same repository, I get back have_base=TRUE. Is this
what you meant?

The inelegant fix here is to just use
svn_wc__internal_is_file_external() in svn_wc__check_wc_root() to
detect file externals masquerading as switched subtrees. The latter
function is how the initial walk of the merge target (with
svn_wc__node_walk_children) detects switched subtrees at the start of
a merge. Directory externals are skipped by
svn_wc__node_walk_children, so this change would be sufficient to make
svn merge ignore all externals as far as recording mergeinfo
describing a merge goes, but it would still let
svn_wc__check_wc_root() report directory externals as switched.

Paul
Received on 2010-08-07 00:52:55 CEST

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