'Return a list of which branch version ids differ from what was stored
in the database at the beginning of this bulk operation.'

@property
def dirty_branches(self):

    if (self.index is None):
        return []
    if (self.initial_index is None):
        return self.index.get('versions', {}).keys()
    return [branch for (branch, _id) in self.index.get('versions', {}).items() if (self.initial_index.get('versions', {}).get(branch) != _id)]
