Monero
Loading...
Searching...
No Matches
upload.VersionControlSystem Class Reference
Inheritance diagram for upload.VersionControlSystem:
Collaboration diagram for upload.VersionControlSystem:

Public Member Functions

 __init__ (self, options)
 GenerateDiff (self, args)
 GetUnknownFiles (self)
 CheckForUnknownFiles (self)
 GetBaseFile (self, filename)
 GetBaseFiles (self, diff)
 UploadBaseFiles (self, issue, rpc_server, patch_list, patchset, options, files)
 IsImage (self, filename)
 __init__ (self, options)
 GenerateDiff (self, args)
 GetUnknownFiles (self)
 CheckForUnknownFiles (self)
 GetBaseFile (self, filename)
 GetBaseFiles (self, diff)
 UploadBaseFiles (self, issue, rpc_server, patch_list, patchset, options, files)
 IsImage (self, filename)

Public Attributes

 options = options

Private Attributes

 __class__

Detailed Description

Abstract base class providing an interface to the VCS.

Constructor & Destructor Documentation

◆ __init__() [1/2]

upload.VersionControlSystem.__init__ ( self,
options )
Constructor.

Args:
  options: Command line options.

◆ __init__() [2/2]

upload.VersionControlSystem.__init__ ( self,
options )
Constructor.

Args:
  options: Command line options.

Member Function Documentation

◆ CheckForUnknownFiles() [1/2]

upload.VersionControlSystem.CheckForUnknownFiles ( self)
Show an "are you sure?" prompt if there are unknown files.

◆ CheckForUnknownFiles() [2/2]

upload.VersionControlSystem.CheckForUnknownFiles ( self)
Show an "are you sure?" prompt if there are unknown files.

◆ GenerateDiff() [1/2]

upload.VersionControlSystem.GenerateDiff ( self,
args )
Return the current diff as a string.

Args:
  args: Extra arguments to pass to the diff command.

Reimplemented in upload.GitVCS, upload.GitVCS, upload.MercurialVCS, upload.MercurialVCS, upload.SubversionVCS, and upload.SubversionVCS.

◆ GenerateDiff() [2/2]

upload.VersionControlSystem.GenerateDiff ( self,
args )
Return the current diff as a string.

Args:
  args: Extra arguments to pass to the diff command.

Reimplemented in upload.GitVCS, upload.GitVCS, upload.MercurialVCS, upload.MercurialVCS, upload.SubversionVCS, and upload.SubversionVCS.

◆ GetBaseFile() [1/2]

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.

Reimplemented in upload.GitVCS, upload.GitVCS, upload.MercurialVCS, upload.MercurialVCS, upload.SubversionVCS, and upload.SubversionVCS.

◆ GetBaseFile() [2/2]

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.

Reimplemented in upload.GitVCS, upload.GitVCS, upload.MercurialVCS, upload.MercurialVCS, upload.SubversionVCS, and upload.SubversionVCS.

◆ GetBaseFiles() [1/2]

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:".

◆ GetBaseFiles() [2/2]

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:".

◆ GetUnknownFiles() [1/2]

upload.VersionControlSystem.GetUnknownFiles ( self)
Return a list of files unknown to the VCS.

Reimplemented in upload.GitVCS, upload.GitVCS, upload.MercurialVCS, upload.MercurialVCS, upload.SubversionVCS, and upload.SubversionVCS.

◆ GetUnknownFiles() [2/2]

upload.VersionControlSystem.GetUnknownFiles ( self)
Return a list of files unknown to the VCS.

Reimplemented in upload.GitVCS, upload.GitVCS, upload.MercurialVCS, upload.MercurialVCS, upload.SubversionVCS, and upload.SubversionVCS.

◆ IsImage() [1/2]

upload.VersionControlSystem.IsImage ( self,
filename )
Returns true if the filename has an image extension.

◆ IsImage() [2/2]

upload.VersionControlSystem.IsImage ( self,
filename )
Returns true if the filename has an image extension.

◆ UploadBaseFiles() [1/2]

upload.VersionControlSystem.UploadBaseFiles ( self,
issue,
rpc_server,
patch_list,
patchset,
options,
files )
Uploads the base files (and if necessary, the current ones as well).

◆ UploadBaseFiles() [2/2]

upload.VersionControlSystem.UploadBaseFiles ( self,
issue,
rpc_server,
patch_list,
patchset,
options,
files )
Uploads the base files (and if necessary, the current ones as well).

Member Data Documentation

◆ __class__

upload.VersionControlSystem.__class__
private

◆ options

upload.VersionControlSystem.options = options

The documentation for this class was generated from the following files: