You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "K.L." <co...@gmail.com> on 2011/05/13 13:41:42 UTC

Help with constant conflicts

Hi,

Having problems with merge.

========
me@localhost /srv/www $ svn ls svn+ssh://example.com/var/svn/svnbugs
me@localhost /srv/www $ svn mkdir svn+ssh://example.com/var/svn/svnbugs/trunk

Log message unchanged or not specified
(a)bort, (c)ontinue, (e)dit:
c

Committed revision 1.
me@localhost /srv/www $ svn ls svn+ssh://example.com/var/svn/svnbugs
trunk/
me@localhost /srv/www $ svn mkdir svn+ssh://example.com/var/svn/svnbugs/branches

Log message unchanged or not specified
(a)bort, (c)ontinue, (e)dit:
c

Committed revision 2.
me@localhost /srv/www $ svn ls svn+ssh://example.com/var/svn/svnbugs
branches/
trunk/
me@localhost /srv/www $ svn co svn+ssh://example.com/var/svn/svnbugs
A    svnbugs/trunk
A    svnbugs/branches
Checked out revision 2.
me@localhost /srv/www $ cd svnbugs/
me@localhost /srv/www/svnbugs $ ls -la
total 20
drwxr-xr-x  5 me me 4096 May 13 13:26 .
drwxrwxrwx 26 me wheel 4096 May 13 13:26 ..
drwxr-xr-x  6 me me 4096 May 13 13:26 .svn
drwxr-xr-x  3 me me 4096 May 13 13:26 branches
drwxr-xr-x  3 me me 4096 May 13 13:26 trunk
me@localhost /srv/www/svnbugs $ mkdir trunk/dir1
me@localhost /srv/www/svnbugs $ svn st
?       trunk/dir1
me@localhost /srv/www/svnbugs $ svn add trunk/dir1/
A         trunk/dir1
me@localhost /srv/www/svnbugs $ svn commit -m "" trunk/dir1/
Adding         trunk/dir1

Committed revision 3.
me@localhost /srv/www/svnbugs $ svn cp
svn+ssh://example.com/var/svn/svnbugs/trunk
svn+ssh://example.com/var/svn/svnbugs/branches/branch1

Log message unchanged or not specified
(a)bort, (c)ontinue, (e)dit:
c

Committed revision 4.
me@localhost /srv/www/svnbugs $ svn up
A    branches/branch1
A    branches/branch1/dir1
Updated to revision 4.
me@localhost /srv/www/svnbugs $ mkdir trunk/dir2
me@localhost /srv/www/svnbugs $ svn st
?       trunk/dir2
me@localhost /srv/www/svnbugs $ svn add trunk/dir2
A         trunk/dir2
me@localhost /srv/www/svnbugs $ svn commit -m "" trunk/dir2
Adding         trunk/dir2

Committed revision 5.
me@localhost /srv/www/svnbugs $ cd branches/branch1/
me@localhost /srv/www/svnbugs/branches/branch1 $ svn st
me@localhost /srv/www/svnbugs/branches/branch1 $ svn up
At revision 5.
me@localhost /srv/www/svnbugs/branches/branch1 $ svn merge
svn+ssh://example.com/var/svn/svnbugs/trunk
--- Merging r4 through r5 into '.':
A    dir2
me@localhost /srv/www/svnbugs/branches/branch1 $ svn st
 M      .
A  +    dir2
me@localhost /srv/www/svnbugs/branches/branch1 $ svn commit -m "merged @5"
Sending        branch1
Adding         branch1/dir2

Committed revision 6.
me@localhost /srv/www/svnbugs/branches/branch1 $ svn st
me@localhost /srv/www/svnbugs/branches/branch1 $ svn up
At revision 6.
me@localhost /srv/www/svnbugs/branches/branch1 $ ls
dir1  dir2
me@localhost /srv/www/svnbugs/branches/branch1 $ mkdir dir3
me@localhost /srv/www/svnbugs/branches/branch1 $ ls
dir1  dir2  dir3
me@localhost /srv/www/svnbugs/branches/branch1 $ svn st
?       dir3
me@localhost /srv/www/svnbugs/branches/branch1 $ svn add dir3
A         dir3
me@localhost /srv/www/svnbugs/branches/branch1 $ svn commit -m "" dir3
Adding         dir3

Committed revision 7.
me@localhost /srv/www/svnbugs/branches/branch1 $ cd ..
me@localhost /srv/www/svnbugs/branches $ cd ../trunk/
me@localhost /srv/www/svnbugs/trunk $ svn merge
svn+ssh://example.com/var/svn/svnbugs/branches/branch1
--- Merging r4 through r7 into '.':
   C dir2
A    dir3
Summary of conflicts:
  Tree conflicts: 1
me@localhost /srv/www/svnbugs/trunk $ svn st
 M      .
      C dir2
      >   local add, incoming add upon merge
A  +    dir3

========

The same thing happens upon file operations as well on ubuntu, osx, gentoo.


server

========
# uname -a
Linux example.com 2.6.32-5-amd64 #1 SMP Sat Oct 30 14:18:21 UTC 2010
x86_64 GNU/Linux
# svn --version
svn, version 1.6.16 (r1073529)
   compiled May  1 2011, 01:56:39
# aptitude show subversion
Package: subversion
State: installed
Automatically installed: no
Version: 1.6.16dfsg-1+b1
Priority: optional
Section: vcs
Maintainer: Peter Samuelson <pe...@p12n.org>
Uncompressed Size: 4,399 k
Depends: libsvn1 (= 1.6.16dfsg-1+b1), libapr1 (>= 1.2.7), libc6 (>=
2.3), libsasl2-2
Suggests: subversion-tools, db4.8-util, patch
========

client

========
# uname -a
Linux localhost 2.6.36-gentoo-r5 #1 SMP Fri Feb 18 15:24:49 EET 2011
x86_64 AMD Phenom(tm) II X4 965 Processor AuthenticAMD GNU/Linux
# svn --version
svn, version 1.6.16 (r1073529)
   compiled May 13 2011, 13:25:25
# emerge --info dev-vcs/subversion
Portage 2.1.9.42 (default/linux/amd64/10.0/desktop/kde, gcc-4.4.5,
libc-0-r0, 2.6.36-gentoo-r5 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.36-gentoo-r5-x86_64-AMD_Phenom-tm-_II_X4_965_Processor-with-gentoo-2.0.2
Timestamp of tree: Fri, 13 May 2011 09:45:01 +0000
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.7.1-r1, 3.1.3-r1
dev-util/cmake:      2.8.4-r1
sys-apps/baselayout: 2.0.2
sys-apps/openrc:     0.8.2-r1
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.5
sys-devel/gcc-config: 1.4.1-r1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
sys-kernel/linux-headers: 2.6.36.1
sys-libs/glibc:      2.11.3
virtual/os-headers:  0
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=barcelona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d
/etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release
/etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/
/etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d
/etc/terminfo"
CXXFLAGS="-march=barcelona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages
news parallel-fetch protect-owned sandbox sfperms strict
unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en ru"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times
--compress --force --whole-file --delete --stats --timeout=180
--exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
USE="3dnow X a52 aac acl acpi alsa amd64 bash-completion berkdb
bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups
cxx dbus dri dts dvd dvdr emboss encode exif fam firefox flac fortran
gdbm gdu gif gpm gtk iconv icu ipv6 jpeg kde lcms ldap libnotify mad
mmx mng modules mp3 mp4 mpeg mudflap multilib mysql ncurses nls nptl
nptlonly nvidia ogg opengl openmp pam pango pcre pdf perl png
policykit ppds pppd python qt3support qt4 readline sdl session spell
sse sse2 sse3 sse4a ssl startup-notification svg sysfs tcpd tiff
truetype udev unicode usb vim-syntax vorbis wifi x264 xcb xml xorg
xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp
atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938
es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio
via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy
dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa
lfloat linear meter mmap_emul mulaw multi null plug rate route share
shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias
authn_anon authn_dbm authn_default authn_file authz_dbm authz_default
authz_groupfile authz_host authz_owner authz_user autoindex cache cgi
cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter
file_cache filter headers include info log_config logio mem_cache mime
mime_magic negotiation rewrite setenvif speling status unique_id
userdir usertrack vhost_alias" CAMERAS="ptp2" COLLECTD_PLUGINS="df
interface irq load memory rrdtool swap syslog" ELIBC="glibc"
GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt
gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore
rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx"
INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz
cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en
ru" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU"
VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2
ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq
steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG,
LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS,
PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

=================================================================
                        Package Settings
=================================================================

dev-vcs/subversion-1.6.16 was built with the following:
USE="bash-completion berkdb (consolekit) dso kde (multilib) nls perl
(policykit) python vim-syntax webdav-neon -apache2 -ctypes-python
-debug -doc -emacs -extras -gnome-keyring -java -ruby -sasl -test
-webdav-serf"

========

Is it a bug or we issue wrong commands?


Regards,
Kostia

RE: Help with constant conflicts

Posted by Bob Archer <Bo...@amsi.com>.
> On Fri, May 13, 2011 at 4:35 PM, Stephen Butler <sb...@elego.de>
> wrote:
> >
> > On May 13, 2011, at 13:41 , K.L. wrote:
> >
> >> Hi,
> >>
> >> Having problems with merge.
> >
> > [...]
> >
> >> me@localhost /srv/www/svnbugs/branches/branch1 $ svn merge
> >> svn+ssh://example.com/var/svn/svnbugs/trunk
> >> --- Merging r4 through r5 into '.':
> >> A    dir2
> >
> > [...]
> >
> >> me@localhost /srv/www/svnbugs/trunk $ svn merge
> >> svn+ssh://example.com/var/svn/svnbugs/branches/branch1
> >> --- Merging r4 through r7 into '.':
> >>   C dir2
> >> A    dir3
> >> Summary of conflicts:
> >>  Tree conflicts: 1
> >> me@localhost /srv/www/svnbugs/trunk $ svn st
> >> M      .
> >>      C dir2
> >>>  local add, incoming add upon merge
> >> A  +    dir3
> >
> > [...]
> >
> >> Is it a bug or we issue wrong commands?
> >>
> >
> > The second merge was wrong.  To merge branch1 changes back to
> > the trunk, use 'merge --reintegrate ^/branches/branch1'.
> >
> > See the section "Reintegrating a branch" in the SVN Book:
> >
> >  http://svnbook.red-
> bean.com/nightly/en/svn.branchmerge.basicmerging.html#svn.brancheme
> rge.basicmerging.reintegrate
> Thanks. We used reintegrate option occasionally without knowing its
> true purpose and assuming it's default when merging into trunk.

No it isn't default. svn doesn't know if you are merging into trunk... and trunk is just a convention. 

I suggest you read the merging/branching chapter in the svn book. It really helps to understand how things work if you want to use it effectively.

> I've also read that svn 1.6 allows for multiple reintegrates. Can
> you
> confirm it? Do multiple reintegrates completely equivalent to
> delete
> and copy if so? 

No... read the book on continuing to use a branch after re-integration. It is possible but you have to be pro-active to allow it by doing a --record-only merge from trunk of the revision which is the commit of the merge from the branch.

> And is it safe to recreate branch with the same name as deleted?

Sure... not a problem.

Just keep in mind you know the semantics of your branch. 

If it is a feature branch you are going to generally merge from trunk as you work on the feature and then reintegrate the branch when you are done with the feature. Since you are done with the feature you [normally would] delete the branch.

BOb


Re: Help with constant conflicts

Posted by "K.L." <co...@gmail.com>.
On Fri, May 13, 2011 at 4:35 PM, Stephen Butler <sb...@elego.de> wrote:
>
> On May 13, 2011, at 13:41 , K.L. wrote:
>
>> Hi,
>>
>> Having problems with merge.
>
> [...]
>
>> me@localhost /srv/www/svnbugs/branches/branch1 $ svn merge
>> svn+ssh://example.com/var/svn/svnbugs/trunk
>> --- Merging r4 through r5 into '.':
>> A    dir2
>
> [...]
>
>> me@localhost /srv/www/svnbugs/trunk $ svn merge
>> svn+ssh://example.com/var/svn/svnbugs/branches/branch1
>> --- Merging r4 through r7 into '.':
>>   C dir2
>> A    dir3
>> Summary of conflicts:
>>  Tree conflicts: 1
>> me@localhost /srv/www/svnbugs/trunk $ svn st
>> M      .
>>      C dir2
>>>  local add, incoming add upon merge
>> A  +    dir3
>
> [...]
>
>> Is it a bug or we issue wrong commands?
>>
>
> The second merge was wrong.  To merge branch1 changes back to
> the trunk, use 'merge --reintegrate ^/branches/branch1'.
>
> See the section "Reintegrating a branch" in the SVN Book:
>
>  http://svnbook.red-bean.com/nightly/en/svn.branchmerge.basicmerging.html#svn.branchemerge.basicmerging.reintegrate
Thanks. We used reintegrate option occasionally without knowing its
true purpose and assuming it's default when merging into trunk.
I've also read that svn 1.6 allows for multiple reintegrates. Can you
confirm it? Do multiple reintegrates completely equivalent to delete
and copy if so? And is it safe to recreate branch with the same name
as deleted?

Regards.
Kostia

Re: Help with constant conflicts

Posted by Stephen Butler <sb...@elego.de>.
On May 13, 2011, at 13:41 , K.L. wrote:

> Hi,
> 
> Having problems with merge.

[...]

> me@localhost /srv/www/svnbugs/branches/branch1 $ svn merge
> svn+ssh://example.com/var/svn/svnbugs/trunk
> --- Merging r4 through r5 into '.':
> A    dir2

[...]

> me@localhost /srv/www/svnbugs/trunk $ svn merge
> svn+ssh://example.com/var/svn/svnbugs/branches/branch1
> --- Merging r4 through r7 into '.':
>   C dir2
> A    dir3
> Summary of conflicts:
>  Tree conflicts: 1
> me@localhost /srv/www/svnbugs/trunk $ svn st
> M      .
>      C dir2
>>  local add, incoming add upon merge
> A  +    dir3

[...]

> Is it a bug or we issue wrong commands?
> 

The second merge was wrong.  To merge branch1 changes back to 
the trunk, use 'merge --reintegrate ^/branches/branch1'. 

See the section "Reintegrating a branch" in the SVN Book:

  http://svnbook.red-bean.com/nightly/en/svn.branchmerge.basicmerging.html#svn.branchemerge.basicmerging.reintegrate

Regards,
Steve

--
Stephen Butler | Senior Consultant
elego Software Solutions GmbH
Gustav-Meyer-Allee 25 | 13355 Berlin | Germany
tel: +49 30 2345 8696 | mobile: +49 163 25 45 015
fax: +49 30 2345 8695 | http://www.elegosoft.com
Geschäftsführer: Olaf Wagner | Sitz der Gesellschaft: Berlin
Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194