File: registry.py

package info (click to toggle)
subuser 0.6.2-3.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,216 kB
  • sloc: python: 5,204; sh: 380; makefile: 73; javascript: 43
file content (24 lines) | stat: -rwxr-xr-x 618 bytes parent folder | download | duplicates (2)
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.registry.gitRepository.runShowOutput(["log"])

def checkoutNoCommit(user,commit):
  user.endUser.call(["rm","-rf","*"],cwd=user.config["registry-dir"])
  user.registry.gitRepository.run(["checkout",commit,"."])
  user.reloadRegistry()

def rollback(user,commit):
  checkoutNoCommit(user,commit)
  user.registry.logChange("Rolling back to commit: "+commit)
  subuserlib.verify.verify(user)
  user.registry.commit()