view hgsubversion/layouts/persist.py @ 1089:91d061989acc

layouts: correct flubbed __unimplement call in base layout
author David Schleimer <dschleimer@fb.com>
date Tue, 06 Aug 2013 14:55:52 -0700
parents 7a3b938825cd
children c3c4518e00aa
line wrap: on
line source

"""Code for persisting the layout config in various locations.

Basically, if you want to save the layout, this is where you should go
to do it.

"""

import os.path

def layout_to_file(meta_data_dir, layout):
    """Save the given layout to a file under the given meta_data_dir"""

    layoutfile = os.path.join(meta_data_dir, 'layout')
    f = open(layoutfile, 'w')
    f.write(layout)
    f.close()