Make the hosting field population more flexible.

Review Request #2902 — Created Feb. 19, 2012 and submitted

Information

Review Board
release-1.6.x

Reviewers

Make the hosting field population more flexible.

The hosting field population was only handling the path, mirror_path,
and raw_file_url fields. This meant that if you were to create, say, a
CodebaseHQ account and fill out the API token and username, they
wouldn't show up the next time you viewed the repository, making it seem
as if they were empty.

Now it loops through all fields that aren't path or mirror_path and
attempts to populate the values. We don't loop path or mirror_path into
this, because they're a bit special. In path's case, it's required and
we need its field_data from the parse. In mirror_path's case, we don't
provide values to populate with because we don't want to parse it for
field data, and we also don't shove data from its return value into the
field data.

I also attempted to add in the rest of the CodebaseHQ repository types
(which triggered my uncovering of this problem), but they had their own
issues with auth that prevented us from supporting them. So I added
commented out entries for later, which should help us if we ever
investigate further.
Tested this with my CodebaseHQ changes (before commenting them out).
The API auth info fields were populated from the username/password
fields, which wasn't happening before.

Also, things didn't break when not having a mirror_path for the
repository.
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (8ba6ef2)
Loading...