def do_diff(self, args): """show inventory diff between files or file vs xCAT DB""" if not args.files and not args.source: mybackend=backend.Invbackend() mybackend.diff() else: from inventorydiff import InventoryDiff InventoryDiff(args).inventory_diff()
def do_workspace_delete(self,args): """remove a workspace""" mybackend=backend.Invbackend() mybackend.workspace_delete(args.workspacename)
def do_workspace_new(self,args): """create a new workspace""" mybackend=backend.Invbackend() mybackend.workspace_new(args.workspacename)
def do_workspace_list(self,args): """list all the workspaces""" mybackend=backend.Invbackend() mybackend.workspace_list()
def do_init(self,args): """Initialize the inventory backend""" mybackend=backend.Invbackend(skip=1) mybackend.init()
def do_commit(self,args): """create a revision on current workspace""" mybackend=backend.Invbackend() mybackend.commit(args.revision,args.message)
def do_whereami(self,args): """tell me where i am, which branch,which revision. shortcut:\"w\"""" mybackend=backend.Invbackend() mybackend.whereami()
def do_pull(self,args): """sync the current workspace with remote workspace""" mybackend=backend.Invbackend() mybackend.pull()
def do_push(self,args): """push the current workspace to remoteworkspace""" mybackend=backend.Invbackend() mybackend.push()
def do_radar(self,args): """detect the workspace and revision in remote repo""" mybackend=backend.Invbackend() mybackend.radar()
def do_refresh(self,args): """refresh the workspace, drop all the stashed and untracked changes""" mybackend=backend.Invbackend() mybackend.refresh()
def do_checkout(self,args): """checkout to a specified revision""" mybackend=backend.Invbackend() mybackend.checkout(args.revision,args.doimport)
def do_revlist(self,args): """list the revisions of the current workspace if no revision is specified, otherwise, show the info of the specified revision""" mybackend=backend.Invbackend() mybackend.rev_list(args.revision)
def do_workspace_checkout(self,args): """checkout a workspace""" mybackend=backend.Invbackend() mybackend.workspace_checkout(args.workspacename)