Beispiel #1
0
 def __init__(self, rev, inventory):
     """Create a new testament for rev using inventory."""
     self.revision_id = rev.revision_id
     self.committer = rev.committer
     self.timezone = rev.timezone or 0
     self.timestamp = rev.timestamp
     self.message = rev.message
     self.parent_ids = rev.parent_ids[:]
     self.inventory = inventory
     self.revprops = copy(rev.properties)
     if contains_whitespace(self.revision_id):
         raise ValueError(self.revision_id)
     if contains_linebreaks(self.committer):
         raise ValueError(self.committer)
Beispiel #2
0
 def __init__(self, rev, inventory):
     """Create a new testament for rev using inventory."""
     self.revision_id = rev.revision_id
     self.committer = rev.committer
     self.timezone = rev.timezone or 0
     self.timestamp = rev.timestamp
     self.message = rev.message
     self.parent_ids = rev.parent_ids[:]
     self.inventory = inventory
     self.revprops = copy(rev.properties)
     if contains_whitespace(self.revision_id):
         raise ValueError(self.revision_id)
     if contains_linebreaks(self.committer):
         raise ValueError(self.committer)
Beispiel #3
0
 def __init__(self, rev, tree):
     """Create a new testament for rev using tree."""
     self.revision_id = rev.revision_id
     self.committer = rev.committer
     self.timezone = rev.timezone or 0
     self.timestamp = rev.timestamp
     self.message = rev.message
     self.parent_ids = rev.parent_ids[:]
     if not isinstance(tree, Tree):
         raise TypeError("As of bzr 2.4 Testament.__init__() takes a "
                         "Revision and a Tree.")
     self.tree = tree
     self.revprops = copy(rev.properties)
     if contains_whitespace(self.revision_id):
         raise ValueError(self.revision_id)
     if contains_linebreaks(self.committer):
         raise ValueError(self.committer)
Beispiel #4
0
 def _escape_path(self, path):
     if contains_linebreaks(path):
         raise ValueError(path)
     if path == '':
         path = '.'
     return unicode(path.replace('\\', '/').replace(' ', '\ '))
Beispiel #5
0
 def _escape_path(self, path):
     if contains_linebreaks(path):
         raise ValueError(path)
     if path == '':
         path = '.'
     return unicode(path.replace('\\', '/').replace(' ', '\ '))