Moving duplicated code into a single private module function.
Moving duplicated code into a single private module function.


git-svn-id: c1f8a8ec0b3bb2e99ab3413722f81f687760e79c@959946 13f79535-47bb-0310-9956-ffa450edef68

KlausTrainer/bigcouch,bittorrent/bigcouch,georgemarshall/bigcouch,benoitc/bigcouch,georgemarshall/bigcouch,davidcoallier/bigcouch,Asquera/bigcouch,andrejb/cloudant_bigcouch,cloudant/bigcouch,linearregression/bigcouch,georgemarshall/bigcouch,fkaempfer/couchdb,breezjw/bigcouch,linearregression/bigcouch,kofron/bigcouch,cloudant/bigcouch,KlausTrainer/bigcouch,davidcoallier/bigcouch,fkaempfer/couchdb,kofron/bigcouch,KlausTrainer/bigcouch,Gussy/bigcouch,fkaempfer/couchdb,Asquera/bigcouch,breezjw/bigcouch,linearregression/bigcouch,davidcoallier/bigcouch,KlausTrainer/bigcouch,KlausTrainer/bigcouch,breezjw/bigcouch,georgemarshall/bigcouch,benoitc/couchit_experiment,georgemarshall/bigcouch,cloudant/bigcouch,cloudant/bigcouch,andrejb/cloudant_bigcouch,bittorrent/bigcouch,breezjw/bigcouch,bittorrent/bigcouch,andrejb/cloudant_bigcouch,benoitc/couchit_experiment,davidcoallier/bigcouch,PerilousApricot/bigcouch,davidcoallier/bigcouch,Asquera/bigcouch,fkaempfer/couchdb,kofron/bigcouch,benoitc/bigcouch,fkaempfer/couchdb,breezjw/bigcouch,Asquera/bigcouch,breezjw/bigcouch,andrejb/cloudant_bigcouch,benoitc/couchit_experiment,kofron/bigcouch,bittorrent/bigcouch,cloudant/bigcouch,PerilousApricot/bigcouch,Gussy/bigcouch,kofron/bigcouch,benoitc/bigcouch,linearregression/bigcouch,benoitc/couchit_experiment,bittorrent/bigcouch,Gussy/bigcouch,Gussy/bigcouch,benoitc/bigcouch,andrejb/cloudant_bigcouch,cloudant/bigcouch,Asquera/bigcouch,Asquera/bigcouch,linearregression/bigcouch,benoitc/bigcouch,benoitc/bigcouch,andrejb/cloudant_bigcouch,Gussy/bigcouch,Gussy/bigcouch,cloudant/bigcouch,KlausTrainer/bigcouch,PerilousApricot/bigcouch,fkaempfer/couchdb,bittorrent/bigcouch,PerilousApricot/bigcouch,PerilousApricot/bigcouch,benoitc/couchit_experiment,andrejb/cloudant_bigcouch,kofron/bigcouch,linearregression/bigcouch,PerilousApricot/bigcouch,linearregression/bigcouch,georgemarshall/bigcouch,davidcoallier/bigcouch