Merge lp://staging/~mbp/bzr/409684-cherrypick into lp://staging/~bzr/bzr/trunk-old

Proposed by Martin Pool
Status: Merged
Approved by: John A Meinel
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp://staging/~mbp/bzr/409684-cherrypick
Merge into: lp://staging/~bzr/bzr/trunk-old
Diff against target: 37 lines
To merge this branch: bzr merge lp://staging/~mbp/bzr/409684-cherrypick
Reviewer Review Type Date Requested Status
John A Meinel Approve
Review via email: mp+9744@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
John A Meinel (jameinel) wrote :

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

Martin Pool wrote:
> Martin Pool has proposed merging lp:~mbp/bzr/409684-cherrypick into lp:bzr.
>
> Requested reviews:
> bzr-core (bzr-core)
>

So you could do this with:
  target = self.make_branch_and_tree('target')
  target.set_root_id(source.get_root_id())

That might be better than actually branching. But since this is testing
cherrypicking and we are branching before 'rev1' is committed, I don't
think this violates what the test is trying to accomplish.

  review approve
  merge approve

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkp606UACgkQJdeBCYSNAAN+FACeNVbZBHa9+6+JOhyLfP1pnzj/
XvgAoI6s5lN3av2bT91mHJuSJUIsvhUj
=0kCZ
-----END PGP SIGNATURE-----

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NEWS'
2--- NEWS 2009-08-06 02:23:37 +0000
3+++ NEWS 2009-08-06 07:35:09 +0000
4@@ -199,6 +199,9 @@
5 Testing
6 *******
7
8+* Merge directive cherrypick tests must use the same root id.
9+ (Martin Pool, #409684)
10+
11 * Spurious failure in ``check`` tests on rich-root formats fixed.
12 (Martin Pool, #408199)
13
14
15=== modified file 'bzrlib/tests/blackbox/test_merge.py'
16--- bzrlib/tests/blackbox/test_merge.py 2009-07-19 04:47:49 +0000
17+++ bzrlib/tests/blackbox/test_merge.py 2009-08-06 07:35:09 +0000
18@@ -374,13 +374,18 @@
19
20 def test_directive_cherrypick(self):
21 source = self.make_branch_and_tree('source')
22+ source.commit("nothing")
23+ # see https://bugs.edge.launchpad.net/bzr/+bug/409688 - trying to
24+ # cherrypick from one branch into another unrelated branch with a
25+ # different root id will give shape conflicts. as a workaround we
26+ # make sure they share the same root id.
27+ target = source.bzrdir.sprout('target').open_workingtree()
28 self.build_tree(['source/a'])
29 source.add('a')
30 source.commit('Added a', rev_id='rev1')
31 self.build_tree(['source/b'])
32 source.add('b')
33 source.commit('Added b', rev_id='rev2')
34- target = self.make_branch_and_tree('target')
35 target.commit('empty commit')
36 self.write_directive('directive', source.branch, 'target', 'rev2',
37 'rev1')