<s> """<STR_LIT>""" <EOL> from Bcfg2 . Utils import Executor <EOL> import Bcfg2 . Server . Plugin <EOL> class Darcs ( Bcfg2 . Server . Plugin . Version ) : <EOL> """<STR_LIT>""" <EOL> __author__ = '<STR_LIT>' <EOL> __vcs_metadata_path__ = "<STR_LIT>" <EOL> def __init__ ( self , core ) : <EOL> Bcfg2 . Server . Plugin . Version . __init__ ( self , core ) <EOL> self . cmd = Executor ( ) <EOL> self . logger . debug ( "<STR_LIT>" % <EOL> self . vcs_path ) <EOL> def get_revision ( self ) : <EOL> """<STR_LIT>""" <EOL> result = self . cmd . run ( [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] , <EOL> shell = True , cwd = Bcfg2 . Options . setup . vcs_root ) <EOL> if result . success : <EOL> return result . stdout . splitlines ( ) [ <NUM_LIT:0> ] . strip ( ) <EOL> else : <EOL> msg = "<STR_LIT>" % result . error <EOL> self . logger . error ( msg ) <EOL> raise Bcfg2 . Server . Plugin . PluginExecutionError ( msg ) </s>
