Public Member Functions | Public Attributes | List of all members
upload.VersionControlSystem Class Reference
Inheritance diagram for upload.VersionControlSystem:
Inheritance graph
[legend]

Public Member Functions

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

Public Attributes

 options
 

Detailed Description

Abstract base class providing an interface to the VCS.

Definition at line 588 of file googlemock/scripts/upload.py.

Constructor & Destructor Documentation

◆ __init__() [1/2]

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

Args:
  options: Command line options.

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

Definition at line 591 of file googlemock/scripts/upload.py.

◆ __init__() [2/2]

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

Args:
  options: Command line options.

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

Definition at line 591 of file googletest/scripts/upload.py.

Member Function Documentation

◆ CheckForUnknownFiles() [1/2]

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

Definition at line 613 of file googlemock/scripts/upload.py.

◆ CheckForUnknownFiles() [2/2]

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

Definition at line 613 of file googletest/scripts/upload.py.

◆ GenerateDiff() [1/2]

def 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.MercurialVCS, upload.MercurialVCS, upload.GitVCS, upload.GitVCS, upload.SubversionVCS, and upload.SubversionVCS.

Definition at line 599 of file googletest/scripts/upload.py.

◆ GenerateDiff() [2/2]

def 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.MercurialVCS, upload.MercurialVCS, upload.GitVCS, upload.GitVCS, upload.SubversionVCS, and upload.SubversionVCS.

Definition at line 599 of file googlemock/scripts/upload.py.

◆ GetBaseFile() [1/2]

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.

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

Definition at line 625 of file googlemock/scripts/upload.py.

◆ GetBaseFile() [2/2]

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.

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

Definition at line 625 of file googletest/scripts/upload.py.

◆ GetBaseFiles() [1/2]

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

Definition at line 642 of file googlemock/scripts/upload.py.

◆ GetBaseFiles() [2/2]

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

Definition at line 642 of file googletest/scripts/upload.py.

◆ GetUnknownFiles() [1/2]

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

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

Definition at line 608 of file googletest/scripts/upload.py.

◆ GetUnknownFiles() [2/2]

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

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

Definition at line 608 of file googlemock/scripts/upload.py.

◆ IsImage() [1/2]

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

Definition at line 713 of file googletest/scripts/upload.py.

◆ IsImage() [2/2]

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

Definition at line 713 of file googlemock/scripts/upload.py.

◆ UploadBaseFiles() [1/2]

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).

Definition at line 661 of file googletest/scripts/upload.py.

◆ UploadBaseFiles() [2/2]

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).

Definition at line 661 of file googlemock/scripts/upload.py.

Member Data Documentation

◆ options

upload.VersionControlSystem.options

Definition at line 597 of file googlemock/scripts/upload.py.


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


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:11