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

Re: merge disagrees with diff

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Fri, 28 Oct 2011 12:31:07 +0200

On Fri, Oct 28, 2011 at 11:55 AM, Flemming Frandsen <dren.dk_at_gmail.com> wrote:
> We're having a major problem with subversion, it seems that for some
> changesets svn merge will do a different change than svn diff would
> suggest.
>
> Here's an example of that the problem looks like:
>
>
> svn diff -c 648291 svn+ssh://myserver/somepath/stepws.xsd
>
> Index: stepws.xsd
> ===================================================================
> --- stepws.xsd  (revision 648290)
> +++ stepws.xsd  (revision 648291)
> @@ -366,6 +366,37 @@
>     </complexType>
>     <element name="getLOVValueIDsResponse"
> type="tns:getLOVValueIDsResponseType"/>
>
> +    <!-- getAssetSystemValues -->
> +
> +    <complexType name="getAssetSystemValuesRequestType">
> +        <sequence>
> +            <element name="accessContext" type="types:accessContext">
> +                <annotation>
> +                    <documentation>username and password for the user
> to access STEP as, and the URLs of the context and
> +                        workspace to access data through.
> +                    </documentation>
> +                </annotation>
> +            </element>
> +            <element name="nodeURL" type="string">
> +                <annotation>
> +                    <documentation>URL of the asset to obtain system
> values from</documentation>
> +                </annotation>
> +            </element>
> +        </sequence>
> +    </complexType>
> +    <element name="getAssetSystemValuesRequest"
> type="tns:getAssetSystemValuesRequestType"/>
> +
> +    <complexType name="getAssetSystemValuesResponseType">
> +        <sequence>
> +            <element name="values" type="types:value" minOccurs="0"
> maxOccurs="unbounded">
> +                <annotation>
> +                    <documentation>The attribute values</documentation>
> +                </annotation>
> +            </element>
> +        </sequence>
> +    </complexType>
> +    <element name="getAssetSystemValuesResponse"
> type="tns:getAssetSystemValuesResponseType"/>
> +
>
>
>
> Now I tried to check out an older branch to backport that change:
>> svn co svn+ssh://myserver/someotherpath
>> cd someotherpath
>> svn merge -c 648291 svn+ssh://myserver/somepath/stepws.xsd stepws.xsd
> Conflict discovered in 'stepws.xsd'.
> Select: (p) postpone, (df) diff-full, (e) edit,
>        (mc) mine-conflict, (tc) theirs-conflict,
>        (s) show all options: p
> --- Merging r648291 into 'stepws.xsd':
> C    stepws.xsd
> Summary of conflicts:
>  Text conflicts:
>
>
>> svn diff
>
>
> Index: stepws.xsd
> ===================================================================
> --- stepws.xsd  (revision 610503)

Here is something I don't understand. You just did a new checkout to
someotherpath. The HEAD of your repository is at least 648291. How
come that someotherpath/stepws.xsd is at revision 610503? That doesn't
make sense.

Are you sure that the merge target (someotherpath) was a clean
checkout, with nothing locally modified?

The only explanation (short of a bug in 'merge') I can come up with
for this behavior, is if someotherpath/stepws.xsd was already modified
in the working copy (already containing those extra added lines that
suddenly seemed to appear here).

-- 
Johan
> +++ stepws.xsd  (working copy)
> @@ -366,6 +366,76 @@
>     </complexType>
>     <element name="getLOVValueIDsResponse"
> type="tns:getLOVValueIDsResponseType"/>
>
> +<<<<<<< .working
> +=======
> +    <!-- getAssetSystemValues -->
> +
> +    <complexType name="getAssetSystemValuesRequestType">
> +        <sequence>
> +            <element name="accessContext" type="types:accessContext">
> +                <annotation>
> +                    <documentation>username and password for the user
> to access STEP as, and the URLs of the context and
> +                        workspace to access data through.
> +                    </documentation>
> +                </annotation>
> +            </element>
> +            <element name="nodeURL" type="string">
> +                <annotation>
> +                    <documentation>URL of the asset to obtain system
> values from</documentation>
> +                </annotation>
> +            </element>
> +        </sequence>
> +    </complexType>
> +    <element name="getAssetSystemValuesRequest"
> type="tns:getAssetSystemValuesRequestType"/>
> +
> +    <complexType name="getAssetSystemValuesResponseType">
> +        <sequence>
> +            <element name="values" type="types:value" minOccurs="0"
> maxOccurs="unbounded">
> +                <annotation>
> +                    <documentation>The attribute values</documentation>
> +                </annotation>
> +            </element>
> +        </sequence>
> +    </complexType>
> +    <element name="getAssetSystemValuesResponse"
> type="tns:getAssetSystemValuesResponseType"/>
> +
> +    <!-- addLOVValueIDs -->
> +
> +    <complexType name="addLOVValueIDsRequestType">
> +        <sequence>
> +            <element name="accessContext" type="types:accessContext">
> +                <annotation>
> +                    <documentation>username and password for the user
> to access STEP as, and the URLs of the context and
> +                        workspace to access data through.
> +                    </documentation>
> +                </annotation>
> +            </element>
> +            <element name="nodeURL" type="string">
> +                <annotation>
> +                    <documentation>URL of the LOV to obtain values
> from</documentation>
> +                </annotation>
> +            </element>
> +            <element name="add" type="types:lovvalueid" minOccurs="1"
> maxOccurs="unbounded">
> +                <annotation>
> +                    <documentation>The list of LOV values to
> add</documentation>
> +                </annotation>
> +            </element>
> +        </sequence>
> +    </complexType>
> +    <element name="addLOVValueIDsRequest"
> type="tns:addLOVValueIDsRequestType"/>
> +
> +    <complexType name="addLOVValueIDsResponseType">
> +        <sequence>
> +            <element name="values" type="types:lovvalueid"
> minOccurs="0" maxOccurs="unbounded">
> +                <annotation>
> +                    <documentation>The new list of LOV values</documentation>
> +                </annotation>
> +            </element>
> +        </sequence>
> +    </complexType>
> +    <element name="addLOVValueIDsResponse"
> type="tns:addLOVValueIDsResponseType"/>
> +
> +>>>>>>> .merge-right.r648291
>     <!-- getValuesByAttributeIds -->
>
>     <complexType name="getValuesByAttributeIdsRequestType">
>
>
> As you can see the resulting change to the checked out file after
> merge is different from the change reported by diff.
>
> I've found this problem on 1.6.12 and reproduced it with a
> home-compiled 1.7.1, the server runs ubuntu server 10.10.
>
> Clients are mostly linux with mostly 1.6.12, but there are windows
> machines and 1.7.1 clients as well.
>
> I did not find any --dont-merge-random-crap option, so I'm very confused.
>
> --
> Flemming Frandsen - YAPH - http://osaa.dk - http://dren.dk/
>
Received on 2011-10-28 12:31:59 CEST

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

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