[mb-commits] branch, beta, updated. Merge branch 'mbs-3072-ipis' into beta MBS-3072, add IPIs to label and artist...
MusicBrainz Git Server <[email protected]> Mon, 17 Dec 2012 10:06:44 +0000
| Newsgroups | gmane.comp.audio.musicbrainz.cvs |
|---|---|
| Message-ID | <E1TkXau-00012X-18@wiley> |
The branch, beta has been updated
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=b66dca205df699de4dae32ff66303180e322de50 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=a166caf670ce0e63ade4145619bba8faff5b6d2d (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=2d94fa45013bb55ab6edd3cc38793d655e7e92e6 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=df5e382ef85ab7adb3c18c2a551d5f365a8ca939 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=33849da6b9e973231ac0a4848e1a3c693e8058f8 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=5ea100b16adc54d8264989fb645f0c89d007cb0c (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=5d2dc8cd7c3814b64786c9b80d84984b163166a3 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=a21c913581cc7b8797a06ca3e9df4e70af5f9608 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=af6e35e30677b780ec59a7e9158a96b6f78d41a3 (commit)
via http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=088949f2d1da2dc4d5064b634956171b848118e1 (commit)
from http://git.musicbrainz.org/gitweb/?p=musicbrainz-server/core.git;a=commit;h=ff802b95ff80248bb6640d14aec83be8727a42be (commit)
Summary of changes:
lib/MusicBrainz/Server/Data/Link.pm | 6 ++++
lib/MusicBrainz/Server/Edit/Release/AddCoverArt.pm | 1 +
.../Server/Edit/Release/EditCoverArt.pm | 1 +
.../Server/Edit/Release/RemoveCoverArt.pm | 1 +
lib/MusicBrainz/Server/Edit/Role/CoverArt.pm | 21 ++++++++-----
.../Server/WebService/Serializer/JSON/2/Artist.pm | 1 +
.../Server/WebService/Serializer/JSON/2/Label.pm | 1 +
.../WebService/Serializer/JSON/2/Recording.pm | 3 +-
.../JSON/2/Role/{Annotation.pm => IPIs.pm} | 10 +-----
.../Server/WebService/Serializer/JSON/2/Utils.pm | 2 +-
.../Server/Controller/WS/2/JSON/BrowseArtists.pm | 10 +++++-
.../Server/Controller/WS/2/JSON/BrowseLabels.pm | 1 +
.../Controller/WS/2/JSON/BrowseReleaseGroups.pm | 3 ++
.../Server/Controller/WS/2/JSON/BrowseReleases.pm | 2 +
.../Server/Controller/WS/2/JSON/LookupArtist.pm | 31 +++++++++++++++----
.../Server/Controller/WS/2/JSON/LookupLabel.pm | 8 ++++-
.../Server/Controller/WS/2/JSON/LookupRecording.pm | 2 +
.../Server/Controller/WS/2/JSON/LookupRelease.pm | 6 +++-
.../Controller/WS/2/JSON/LookupReleaseGroup.pm | 3 ++
t/lib/t/MusicBrainz/Server/Data/Link.pm | 11 +++++++
t/lib/t/MusicBrainz/Server/Edit/Recording/Merge.pm | 9 ++++++
t/sql/tracklist.sql | 13 ++++++++
22 files changed, 116 insertions(+), 30 deletions(-)
copy lib/MusicBrainz/Server/WebService/Serializer/JSON/2/Role/{Annotation.pm => IPIs.pm} (83%)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b66dca205df699de4dae32ff66303180e322de50
Merge: a166caf 5ea100b
Author: warp <[email protected]>
Date: Mon Dec 17 11:06:21 2012 +0100
Merge branch 'mbs-3072-ipis' into beta
* mbs-3072-ipis:
MBS-3072, add IPIs to label and artist json serializations for /ws/2.
Conflicts:
t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupArtist.pm
diff --cc t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupArtist.pm
index 5aaaf0c,33c762c..b61747e
--- a/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupArtist.pm
+++ b/t/lib/t/MusicBrainz/Server/Controller/WS/2/JSON/LookupArtist.pm
@@@ -516,9 -531,9 +531,10 @@@ test 'artist lookup with works (using l
disambiguation => "",
iswcs => [],
language => JSON::null,
+ type => JSON::null,
}
- ]
+ ],
+ ipis => [],
});
};
@@@ -659,8 -660,8 +675,9 @@@ test 'artist lookup with works (using l
disambiguation => "",
iswcs => [],
language => JSON::null,
+ type => JSON::null,
- }]
+ }],
+ ipis => [],
});
};
commit a166caf670ce0e63ade4145619bba8faff5b6d2d
Merge: 2d94fa4 5d2dc8c
Author: warp <[email protected]>
Date: Mon Dec 17 11:05:47 2012 +0100
Merge branch 'mbs-4627' into beta
* mbs-4627:
MBS-4627, add ->cover_art_id method to cover art edit classes to avoid having to know these details in Edit::Role::CoverArt.
MBS-4627, use the correct image identifier in Edit::Role::CoverArt->adjust_edit_pending().
commit 2d94fa45013bb55ab6edd3cc38793d655e7e92e6
Merge: df5e382 a21c913
Author: warp <[email protected]>
Date: Mon Dec 17 11:05:40 2012 +0100
Merge branch 'mbs-5637' into beta
* mbs-5637:
MBS-5637, find_or_insert() should look for links with the correct "ended" value for links with end dates.
MBS-5637, Add a relationship to the Edit::Recording::Merge test.
commit df5e382ef85ab7adb3c18c2a551d5f365a8ca939
Merge: ff802b9 33849da
Author: warp <[email protected]>
Date: Mon Dec 17 11:05:35 2012 +0100
Merge branch 'mbs-5600' into beta
* mbs-5600:
MBS-5600, fix two internal server errors in /ws/2 json serialization.
commit a21c913581cc7b8797a06ca3e9df4e70af5f9608
Author: warp <[email protected]>
Date: Thu Dec 6 10:49:36 2012 +0100
MBS-5637, find_or_insert() should look for links with the correct "ended" value for links with end dates.
diff --git a/lib/MusicBrainz/Server/Data/Link.pm b/lib/MusicBrainz/Server/Data/Link.pm
index 0483642..dac9821 100644
--- a/lib/MusicBrainz/Server/Data/Link.pm
+++ b/lib/MusicBrainz/Server/Data/Link.pm
@@ -111,6 +111,12 @@ sub find
push @conditions, "link_type = ?";
push @args, $values->{link_type_id};
+ # end_date_implies_ended
+ $values->{ended} = 1 if defined $values->{end_date} &&
+ ($values->{end_date}->{year} ||
+ $values->{end_date}->{month} ||
+ $values->{end_date}->{day});
+
push @conditions, "ended = ?";
push @args, $values->{ended};
diff --git a/t/lib/t/MusicBrainz/Server/Data/Link.pm b/t/lib/t/MusicBrainz/Server/Data/Link.pm
index 9e35ab6..09e4b5f 100644
--- a/t/lib/t/MusicBrainz/Server/Data/Link.pm
+++ b/t/lib/t/MusicBrainz/Server/Data/Link.pm
@@ -50,6 +50,17 @@ my $link = $test->c->model('Link')->get_by_id(100);
is_deeply($link->begin_date, { year => 2009 });
is_deeply($link->end_date, { year => 2010 });
+$test->c->sql->begin;
+$link_id = $test->c->model('Link')->find_or_insert({
+ link_type_id => 1,
+ begin_date => { year => 2009 },
+ end_date => { year => 2010 },
+ ended => 0,
+ attributes => [ 1, 3 ],
+});
+$test->c->sql->commit;
+is($link_id, 100, "find_or_insert() correctly re-uses a link with end date");
+
};
1;
commit af6e35e30677b780ec59a7e9158a96b6f78d41a3
Author: warp <[email protected]>
Date: Thu Dec 6 08:59:39 2012 +0100
MBS-5637, Add a relationship to the Edit::Recording::Merge test.
diff --git a/t/lib/t/MusicBrainz/Server/Edit/Recording/Merge.pm b/t/lib/t/MusicBrainz/Server/Edit/Recording/Merge.pm
index ab35bea..7a79893 100644
--- a/t/lib/t/MusicBrainz/Server/Edit/Recording/Merge.pm
+++ b/t/lib/t/MusicBrainz/Server/Edit/Recording/Merge.pm
@@ -36,6 +36,12 @@ $r2 = $c->model('Recording')->get_by_id(2);
is($r1->edits_pending, 0);
is($r2->edits_pending, 0);
+$c->model('Relationship')->load($r1);
+$c->model('Relationship')->load($r2);
+
+is ($r1->all_relationships, 1, "Recording 1 has one relationship");
+is ($r2->all_relationships, 1, "Recording 2 has one relationship");
+
$edit = create_edit($c);
accept_edit($c, $edit);
@@ -46,6 +52,9 @@ ok(defined $r2);
is($r2->edits_pending, 0);
+$c->model('Relationship')->load($r2);
+is($r2->all_relationships, 1, "Relationships of recordings merged");
+
};
sub create_edit {
diff --git a/t/sql/tracklist.sql b/t/sql/tracklist.sql
index 8068e33..964e955 100644
--- a/t/sql/tracklist.sql
+++ b/t/sql/tracklist.sql
@@ -87,6 +87,19 @@ INSERT INTO cdtoc (id, discid, freedb_id, track_count, leadout_offset, track_off
(2, 'IeldkVfIh1wep_M8CMuDvA0nQ7Q-', '6309da09', 9, 189343,
'{150,6614,32287,54041,61236,88129,92729,115276,153877}', FALSE);
+INSERT INTO link_type (id, gid, entity_type0, entity_type1, name, link_phrase, reverse_link_phrase, short_link_phrase)
+ VALUES (151, '234670ce-5f22-4fd0-921b-ef1662695c5d',
+ 'artist', 'recording', 'conductor',
+ '{additional:additionally} conducted',
+ '{additional} conductor',
+ '{additional:additionally} conducted');
+
+INSERT INTO link (id, link_type, attribute_count, begin_date_year, begin_date_month, begin_date_day, end_date_year, end_date_month, end_date_day, ended)
+ VALUES (1, 151, 0, 1971, 2, NULL, 1972, 2, NULL, true);
+
+INSERT INTO l_artist_recording (id, link, entity0, entity1) VALUES (1, 1, 1, 1);
+INSERT INTO l_artist_recording (id, link, entity0, entity1) VALUES (2, 1, 1, 2);
+
ALTER SEQUENCE track_id_seq RESTART 100;
ALTER SEQUENCE track_name_id_seq RESTART 100;
ALTER SEQUENCE tracklist_id_seq RESTART 100;
-----------------------------------------------------------------------
hooks/post-receive
--
mb_server