This is identical to crossbar_doc:rev_to_etag/1, no? Why not use that function instead of duplicating code here?