Move the FileDiffData insert/delete line counts into extra_data.

Review Request #5043 — Created Dec. 2, 2013 and submitted

Information

Review Board
master

Reviewers

Move the FileDiffData insert/delete line counts into extra_data.

This replaces the insert/delete line count fields with entries in a new
extra_data field. These count fields were introduced in 2.0 beta, and
long-term, we may want additional metadata around diff data, so it's a
good time to replace them.

This will introduce another potentially long evolution, given that there
may be a lot of entries in the database. However, it'll help prevent
long evolutions in the future, and won't be any longer for users who
upgrade from 1.7.x or earlier (since either way, they'll need to evolve
this table). Might actually be faster, since there's only one column to
add.

Evolutions and unit tests passed.

Description From Last Updated

What does this return if there's no insert_count? Does it raise KeyError?

daviddavid
david
  1. 
      
  2. reviewboard/diffviewer/models.py (Diff revision 1)
     
     
    Show all issues

    What does this return if there's no insert_count? Does it raise KeyError?

    1. Calling get() on a dictionary with no default value specified uses None as the default. That's the same value that
      directly accessing FileDiffData.insert_count would return before if not yet calculated.

  3. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Loading...