On Mon, Mar 14, 2011 at 12:11 PM, Christoph Bartoschek <bartosc...@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.