class Repository(object):
"""Abstrakcja repozytorium Mercurial. Działa z Mercurial w wersji 1.3.1."""
class Repository(object):
"""Abstrakcja repozytorium Mercurial. Działa z Mercurial w wersji 1.3.1."""
return localrepo.localrepository(self.ui, path, create=1)
raise RepositoryDoesNotExist("Repository %s does not exist." % path)
return localrepo.localrepository(self.ui, path, create=1)
raise RepositoryDoesNotExist("Repository %s does not exist." % path)
return self.in_branch(lambda: self._file_list(), branch)
def _file_list(self):
return list(self.repo[None])
return self.in_branch(lambda: self._file_list(), branch)
def _file_list(self):
return list(self.repo[None])
return self.in_branch(lambda: self._get_file(path), branch)
def _get_file(self, path):
return self.repo.wread(path)
return self.in_branch(lambda: self._get_file(path), branch)
def _get_file(self, path):
return self.repo.wread(path)
- def add_file(self, path, value, branch='default'):
+ def add_file(self, path, value, branch):
return self.in_branch(lambda: self._add_file(path, value), branch)
def _add_file(self, path, value):
return self.in_branch(lambda: self._add_file(path, value), branch)
def _add_file(self, path, value):
def _commit(self, message, user=None):
return self.repo.commit(text=message, user=user)
def _commit(self, message, user=None):
return self.repo.commit(text=message, user=user)
- def commit(self, message, user=None, branch='default'):
+ def commit(self, message, branch, user=None):
return self.in_branch(lambda: self._commit(message, key=key, user=user), branch)
return self.in_branch(lambda: self._commit(message, key=key, user=user), branch)
def __init__(self, msg, cause=None):
Exception.__init__(self, msg)
self.cause = cause
def __init__(self, msg, cause=None):
Exception.__init__(self, msg)
self.cause = cause