True push not supported

Bug #80612 reported by Nicholas Allen
14
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Fix Released
High
Jelmer Vernooij

Bug Description

I tried some simple tests with bzr-svn. I created a local svn repo using the svn file protocol. I then branched this repo with bzr. Added a file and then pushed to the repo. I then checked out the repo with svn added another file and committed. In the bzr branch I then modified the first file committed and then tried to push. It correctly told me that the branches had diverged and that I needed to merge first. So I merged from the svn repository but the I got a conflict in the first file (which was not even modified in the repo). Doing a bzr status showed some strange things:

bzr status
added:
 hello.txt
 test.txt
renamed:
 hello.txt => hello.txt.THIS
unknown:
 hello.txt.BASE
conflicts:
 Contents conflict in hello.txt
pending merges:
 ubuntu 2007-01-19 Add test.txt
   ubuntu 2007-01-19 Added hello.txt

The exact sequence of commands I executed were:

cd /tmp
svnadmin create svnrepo

bzr branch file:///tmp/svnrepo test-bzr
cd test-bzr/
echo hello > hello.txt
bzr add hello.txt
bzr ci -m "Added hello.txt"
bzr push --remember file:///tmp/svnrepob

cd ..
svn co file:///tmp/svnrepo test-svn
cd test-svn
echo test > test.txt
svn add test.txt
svn ci -m "Add test.txt"

cd ../test-bzr/
echo "Hello from bzr" >> hello.txt
bzr ci -m "Update hello.txt in bzr"
bzr push <--- Correct error that I need to merge first. Things go pear shaped from this point on though...
bzr merge bzr status <--- Weird status after merge as hello.txt was not changed at all in subversion working copy. There should be no conflicts

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 80612] Strange errors after merging from svn repository

This is an artefact caused by the fact that "true" pushes to Subversion
aren't possible. Pushes are always "push-as-merged". Whenever you push a
bazaar revision to Subversion, a new revision is added to Subversion
that merges the revision you pushed. I'm afraid true pushes can't be
supported easily.

The example below works currently if you add a 'bzr pull' after the
first 'bzr push'. That will fetch the new revision that was added to the
Subversion mainline.

I'm open to suggestions for handling this better.
--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

  status confirmed
  summary "True push not supported"

--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/

Changed in bzr-svn:
status: Unconfirmed → Confirmed
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
assignee: nobody → jelmer
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
importance: Undecided → High
Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 80612] Re: True push not supported

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This can actually be fixed and it's currently one of the things I think
have the highest priority.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQCVAwUBRfVJfQy0JeEGD2blAQLmugP/Zxicw7uEc+j+c3ZY9UjT8EyYKDP8MiqS
6Vu8Do/y+TGBEtvm5pg32tcMJy9pzpFHB6b+1y1lBxcHTs/tz4Pl1WMhrh8ve8g0
XPtipsj+imAyvkEvewcs+O7MBkWmIgFJre21oYdlcAeLTr+xz7oBvVTIp4CWkBsd
81i9QMVcAHU=
=OWDH
-----END PGP SIGNATURE-----

Revision history for this message
Peter Fein (pfein) wrote :

This just bit me too.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Fixed in the 0.4 branch.

Changed in bzr-svn:
status: Confirmed → Fix Committed
Revision history for this message
Nicholas Allen (nick-allen) wrote :

Cool! I'm looking forward to trying this out ;-)

Jelmer Vernooij (jelmer)
Changed in bzr-svn:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.