This patch does only two things:

1. On exported views, it inserts a PHP comment to better distinguish views from each other.
2. Sorts exported views alphabetically by view name.

The combination of these two things makes exported views more friendly with SCM.

CommentFileSizeAuthor
#5 views_402650.patch1.4 KBdrewish
#2 views_export_402650.patch1.44 KBdrewish
views2-bulk-export-scm-friendly.patch1.45 KBAnonymous (not verified)

Comments

drewish’s picture

Status: Needs work » Reviewed & tested by the community

I'm all for this. I'd actually added code to get the sort order working locally and found this when I went to post an issue. As bangpound says this is really helpful when exporting views to track them in source control. Without it the view order changes when you edit a view making the exports much harder to read.

Test it it on exports and it works fine. Code also looks good.

drewish’s picture

StatusFileSize
new1.44 KB

actually this moves the sorting from the actual time of export up to where we build the list of exportables. this sorts the table the same as the exported code--which also syncs the view order up with the admin/build/views page.

Anonymous’s picture

drewish: awesome. thanks for the improvement! i am running on your patch now.

RTBC RTBC RTBC.

Crell’s picture

I am so totally in favor of this patch it's not even funny, despite having done nothing to help it along in the slightest. :-)

drewish’s picture

StatusFileSize
new1.4 KB

On IRC merlin had mentioned fixing the case of Views in the comment. Done.

merlinofchaos’s picture

Status: Reviewed & tested by the community » Fixed

Committed! Thanks!

Status: Fixed » Closed (fixed)
Issue tags: -export, -Version Control

Automatically closed -- issue fixed for 2 weeks with no activity.