def has_local_mods(path):
 cmd = 'bzr status -S --versioned'
 with cd(path):
  lines = run(cmd).splitlines()
 return (len(lines) > 0)

def has_local_mods ( path ) : cmd = 'bzr status -S --versioned' with cd ( path ) : lines = run ( cmd ) . splitlines ( ) return ( len ( lines ) > 0 )
return true if checkout at path has local modifications .