- 3.0.1 core module.
|
Public Member Functions | |
def | __init__ (self, options) |
def | GenerateDiff (self, args) |
def | GetUnknownFiles (self) |
def | CheckForUnknownFiles (self) |
def | GetBaseFile (self, filename) |
def | GetBaseFiles (self, diff) |
def | UploadBaseFiles (self, issue, rpc_server, patch_list, patchset, options, files) |
def | IsImage (self, filename) |
def | __init__ (self, options) |
def | GenerateDiff (self, args) |
def | GetUnknownFiles (self) |
def | CheckForUnknownFiles (self) |
def | GetBaseFile (self, filename) |
def | GetBaseFiles (self, diff) |
def | UploadBaseFiles (self, issue, rpc_server, patch_list, patchset, options, files) |
def | IsImage (self, filename) |
Public Attributes | |
options | |
Abstract base class providing an interface to the VCS.
def upload.VersionControlSystem.__init__ | ( | self, | |
options | |||
) |
Constructor. Args: options: Command line options.
Referenced by upload.VersionControlSystem.__init__().
def upload.VersionControlSystem.__init__ | ( | self, | |
options | |||
) |
Constructor. Args: options: Command line options.
References upload.VersionControlSystem.__init__(), and upload.VersionControlSystem.options.
def upload.VersionControlSystem.GenerateDiff | ( | self, | |
args | |||
) |
Return the current diff as a string. Args: args: Extra arguments to pass to the diff command.
Referenced by upload.VersionControlSystem.GenerateDiff().
def upload.VersionControlSystem.GetUnknownFiles | ( | self | ) |
Return a list of files unknown to the VCS.
Referenced by upload.VersionControlSystem.CheckForUnknownFiles(), and upload.VersionControlSystem.GetUnknownFiles().
def upload.VersionControlSystem.CheckForUnknownFiles | ( | self | ) |
Show an "are you sure?" prompt if there are unknown files.
References upload.ErrorExit(), and upload.VersionControlSystem.GetUnknownFiles().
Referenced by upload.VersionControlSystem.CheckForUnknownFiles().
def upload.VersionControlSystem.GetBaseFile | ( | self, | |
filename | |||
) |
Get the content of the upstream version of a file. Returns: A tuple (base_content, new_content, is_binary, status) base_content: The contents of the base file. new_content: For text files, this is empty. For binary files, this is the contents of the new file, since the diff output won't contain information to reconstruct the current file. is_binary: True iff the file is binary. status: The status of the file.
Referenced by upload.VersionControlSystem.GetBaseFile(), and upload.VersionControlSystem.GetBaseFiles().
def upload.VersionControlSystem.GetBaseFiles | ( | self, | |
diff | |||
) |
Helper that calls GetBase file for each file in the patch. Returns: A dictionary that maps from filename to GetBaseFile's tuple. Filenames are retrieved based on lines that start with "Index:" or "Property changes on:".
References upload.VersionControlSystem.GetBaseFile(), and upload.VersionControlSystem.UploadBaseFiles().
Referenced by upload.VersionControlSystem.GetBaseFiles().
def upload.VersionControlSystem.UploadBaseFiles | ( | self, | |
issue, | |||
rpc_server, | |||
patch_list, | |||
patchset, | |||
options, | |||
files | |||
) |
Uploads the base files (and if necessary, the current ones as well).
References upload.EncodeMultipartFormData(), and upload.StatusUpdate().
Referenced by upload.VersionControlSystem.GetBaseFiles().
def upload.VersionControlSystem.IsImage | ( | self, | |
filename | |||
) |
Returns true if the filename has an image extension.
Referenced by upload.SubversionVCS.GetBaseFile(), upload.MercurialVCS.GetBaseFile(), and upload.VersionControlSystem.IsImage().
def upload.VersionControlSystem.GenerateDiff | ( | self, | |
args | |||
) |
Return the current diff as a string. Args: args: Extra arguments to pass to the diff command.
References upload.VersionControlSystem.GenerateDiff().
def upload.VersionControlSystem.GetUnknownFiles | ( | self | ) |
Return a list of files unknown to the VCS.
References upload.VersionControlSystem.GetUnknownFiles().
def upload.VersionControlSystem.CheckForUnknownFiles | ( | self | ) |
Show an "are you sure?" prompt if there are unknown files.
References upload.VersionControlSystem.CheckForUnknownFiles(), upload.ErrorExit(), and upload.VersionControlSystem.GetUnknownFiles().
def upload.VersionControlSystem.GetBaseFile | ( | self, | |
filename | |||
) |
Get the content of the upstream version of a file. Returns: A tuple (base_content, new_content, is_binary, status) base_content: The contents of the base file. new_content: For text files, this is empty. For binary files, this is the contents of the new file, since the diff output won't contain information to reconstruct the current file. is_binary: True iff the file is binary. status: The status of the file.
References upload.VersionControlSystem.GetBaseFile().
def upload.VersionControlSystem.GetBaseFiles | ( | self, | |
diff | |||
) |
Helper that calls GetBase file for each file in the patch. Returns: A dictionary that maps from filename to GetBaseFile's tuple. Filenames are retrieved based on lines that start with "Index:" or "Property changes on:".
References upload.VersionControlSystem.GetBaseFile(), upload.VersionControlSystem.GetBaseFiles(), and upload.VersionControlSystem.UploadBaseFiles().
def upload.VersionControlSystem.UploadBaseFiles | ( | self, | |
issue, | |||
rpc_server, | |||
patch_list, | |||
patchset, | |||
options, | |||
files | |||
) |
Uploads the base files (and if necessary, the current ones as well).
References upload.EncodeMultipartFormData(), and upload.StatusUpdate().
def upload.VersionControlSystem.IsImage | ( | self, | |
filename | |||
) |
Returns true if the filename has an image extension.
References upload.VersionControlSystem.IsImage().
upload.VersionControlSystem.options |
Referenced by upload.VersionControlSystem.__init__().