/usr/lib/python3/dist-packages/subuserlib/registry.py is in subuser 0.6.1-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # -*- coding: utf-8 -*-
"""
High level operations used for interacting with the subuser registry.
"""
#external imports
#import ...
#internal imports
import subuserlib.verify
def showLog(user):
user.getRegistry().getGitRepository().runShowOutput(["log"])
def checkoutNoCommit(user,commit):
user.getEndUser().call(["rm","-rf","*"],cwd=user.getConfig()["registry-dir"])
user.getRegistry().getGitRepository().run(["checkout",commit,"."])
user.reloadRegistry()
def rollback(user,commit):
checkoutNoCommit(user,commit)
user.getRegistry().logChange("Rolling back to commit: "+commit)
subuserlib.verify.verify(user)
user.getRegistry().commit()
|