<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -86,6 +86,16 @@ def withKey(key):
         print 'retry'
         sleep(10)
 
+def get_marc_src(e):
+    mc = get_mc(e['key'])
+    if mc:
+        yield mc
+    if not e.get('source_records', []):
+        return
+    for src in e['source_records']:
+        if src.startswith('marc:') and src != 'marc:' + mc:
+            yield src[5:]
+
 def get_mc(key): # get machine comment
     url = base_url() + key + '.json?m=history'
     ret = urllib.urlopen(url).read()</diff>
      <filename>openlibrary/catalog/utils/query.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>5417b831b879eff07ac566824b65233d1b3766af</id>
    </parent>
  </parents>
  <author>
    <name>Edward Betts</name>
    <email>edward@archive.org</email>
  </author>
  <url>http://github.com/openlibrary/openlibrary/commit/a1914ad3afdf5369501b2d97deb34d2e752a118f</url>
  <id>a1914ad3afdf5369501b2d97deb34d2e752a118f</id>
  <committed-date>2009-10-08T02:48:46-07:00</committed-date>
  <authored-date>2009-10-08T02:48:46-07:00</authored-date>
  <message>new query function</message>
  <tree>2c4935216b3a8ca90bcc7cafd7d082fa5d6c2e42</tree>
  <committer>
    <name>Edward Betts</name>
    <email>edward@archive.org</email>
  </committer>
</commit>
