5d9401d7d2ef335c44dae63ec9e54685c00f4080
wong
  Wed Jan 11 12:16:32 2012 -0800
indent on wrong level, and added continue statements for some minor speed gains
diff --git python/lib/ucscgenomics/ra.py python/lib/ucscgenomics/ra.py
index 0d0dc19..8493008 100644
--- python/lib/ucscgenomics/ra.py
+++ python/lib/ucscgenomics/ra.py
@@ -218,45 +218,49 @@
         differences are marked with a >>> and <<<
         '''
 
         mergedKeys = ucscUtils.mergeList(list(self), list(other))
         selfKeys = set(self)
         otherKeys = set(other)
         newCommon = RaFile()
         p = re.compile('^\s*#')
         p2 = re.compile('^\s*$')
         for i in mergedKeys:
             if p.match(i) or p2.match(i):
                 newCommon.append(i)
                 continue
             if i not in selfKeys:
                 newCommon.append(other[i])
+                continue
             if i not in otherKeys:
                 newCommon.append(self[i])
+                continue
             if i in otherKeys and i in selfKeys:
                 newStanza = RaStanza()
                 selfStanzaKeys = set(self[i].iterkeys())
                 otherStanzaKeys = set(other[i].iterkeys())
                 stanzaKeys = ucscUtils.mergeList(list(self[i]), list(other[i]))
                 for j in stanzaKeys:
                     if p.match(j):
                         newStanza.append(j)
                         continue
                     if j not in selfStanzaKeys:
                         newStanza[j] = other[i][j]
+                        continue
                     if j not in otherStanzaKeys:
                         newStanza[j] = self[i][j]
+                        continue
                     if j in selfStanzaKeys and j in otherStanzaKeys:
                         if self[i][j] == other[i][j]:
                             newStanza[j] = self[i][j]
                         else:
                             in_j = '>>>>>%s' % j
                             out_j = '<<<<<%s' % j
                             newStanza[out_j] = self[i][j]
                             newStanza[in_j] = other[i][j]
             newCommon.append(newStanza)
         return newCommon
 
 
     def summaryDiff(self, other):
         '''
         Input: