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

Re: Merging from a foreign repository and svn:id keyword

From: Nico Kadel-Garcia <nkadel_at_gmail.com>
Date: Mon, 14 Mar 2011 13:16:17 -0400

On Mon, Mar 14, 2011 at 12:11 PM, Christoph Bartoschek
<bartoschek_at_or.uni-bonn.de> wrote:
> Hi,
>
> I would like to merge the changes of a directory in repository A to a
> directory in repository B. My problem is that several merges fail because of
> the id keywords.
>
> Svn diff for example shows:
>
> -/*
> -** $Id: st_opt_small.c,v 1.3 2004/03/08 17:25:57 mueller Exp $
> -**
> -** $Locker:  $
> -*/
> +/* $Id$ */
>
> The removed Id line cannot be found in repository B because a different user
> created it. It looks like:
>
> ** $Id: st_opt_small.c 2 2011-03-14 15:17:33Z bartosch $
>
>
> The merge then fails with a conflict because it cannot find the line of the
> diff.  How can I let merge ignore conflicts that arise because of expanded Id
> lines?
>
> Or how to prevent Id expansion locally and in the diffs?
>
> Christoph

The easiest way is to *NOT* use Id and similar keyword expansion, at
all. That's the Linux kernel approach. They can be very, very nasty
indeed to parse and merge.

Second, pick a single format for comments and keywords and *stick with
it*. The switch in syntax from multi-line commented entries to single
line comment entries is biting you hard here and confusing your diffs
noticeably.

Sadly, you can't outsmart the ability of people to tweak formats. The
simplest way is to resolve the merge manually.
Received on 2011-03-14 18:16:47 CET

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.