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

RE: Merging from Branch (Tag) to trunk

From: Dale Worley <dworley_at_pingtel.com>
Date: 2005-02-25 17:00:18 CET

> From: Stephen McConnell [mailto:mcconnell_stephen@yahoo.com]
>
> This is truely a WHOLE Lot more work that it should be... especially
> when we have 30 developers doing fixes and the "SCM manager"
> (which has
> defaulted to me because nobody else wants the hassel) has to
> do all the
> merging back into trunk.... A part time job has turned into a full
> time job....

That's not so surprising -- all it means is that the work of merging changes
back to the trunk is about 3% of the work needed to make the changes, which
is hardly surprising. Careful integration of a change into a "moving
target" code base is not trivial, especially if you do any real testing
before committing to the trunk.

Perhaps you could suggest to management that each developer do his own
merging? After all, he is the one who has the best knowledge of what his
change *means*, so he is in the best position to resolve any conflicts
found.

> Yesterday, the process worked fine. I merged changes from
> the bug fixe
> Tags into trunk ok. Today, doing the exact same process, the Merging
> SAYS it updates the files, but when I look in the local working copy
> there is no change in the file....

That's not impossible, if the changes in question have already been merged
into the trunk. (The developer may have passed the change to you as part of
some other change he's passed to you, or he may have passed the fix to some
other developer, who incorporated it, or another developer may have done the
same change independently.) It's also not impossible that some developer
has checked the change into the trunk rather than going through you.

The thing to do to check this out is to list out the diffs from the change
you're merging and then check to see if they've been made in the trunk
already. Here are a couple of scripts I use to get all the historical
versions of a file, and the diffs between them. They help to isolate
exactly when some change got into the code base.

svn-history

#! /bin/sh

FILE=$1

for REV in $( svn log --quiet --stop-on-copy $FILE |
                  sed -e '/r/!d' \
                      -e 's/^r//' \
                      -e 's/ .*$//' )
do
  echo Fetching $FILE.r$REV...
  svn cat -r$REV $FILE >$FILE.r$REV
done

svn-diff-history

#! /bin/sh

if [ "$2" != "" ]
then
    FILE=$2
    REVS=$1
else
    FILE=$1
    REVS=
fi

for REV in $( svn log --quiet $REVS $FILE |
              sed -e '/r/!d' \
                  -e 's/^r//' \
                  -e 's/ .*$//' )
do
  svn log --verbose -r$REV $FILE
  svn diff -r$(( REV-1 )):$REV $FILE
done

Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Feb 25 17:05:18 2005

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.