OpenQuizz
Une application de gestion des contenus pédagogiques
Diff Class Reference
Inheritance diagram for Diff:
Collaboration diagram for Diff:

Public Member Functions

def __init__ (self, repo, a_rawpath, b_rawpath, a_blob_id, b_blob_id, a_mode, b_mode, new_file, deleted_file, copied_file, raw_rename_from, raw_rename_to, diff, change_type, score)
 
def __eq__ (self, other)
 
def __ne__ (self, other)
 
def __hash__ (self)
 
def __str__ (self)
 
def a_path (self)
 
def b_path (self)
 
def rename_from (self)
 
def rename_to (self)
 
def renamed (self)
 
def renamed_file (self)
 

Data Fields

 a_mode
 
 b_mode
 
 a_rawpath
 
 b_rawpath
 
 a_blob
 
 b_blob
 
 new_file
 
 deleted_file
 
 copied_file
 
 raw_rename_from
 
 raw_rename_to
 
 diff
 
 change_type
 
 score
 

Static Public Attributes

 re_header
 
 NULL_HEX_SHA
 
 NULL_BIN_SHA
 

Detailed Description

A Diff contains diff information between two Trees.

It contains two sides a and b of the diff, members are prefixed with
"a" and "b" respectively to inidcate that.

Diffs keep information about the changed blob objects, the file mode, renames,
deletions and new files.

There are a few cases where None has to be expected as member variable value:

``New File``::

    a_mode is None
    a_blob is None
    a_path is None

``Deleted File``::

    b_mode is None
    b_blob is None
    b_path is None

``Working Tree Blobs``

    When comparing to working trees, the working tree blob will have a null hexsha
    as a corresponding object does not yet exist. The mode will be null as well.
    But the path will be available though.
    If it is listed in a diff the working tree version of the file must
    be different to the version in the index or tree, and hence has been modified.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  repo,
  a_rawpath,
  b_rawpath,
  a_blob_id,
  b_blob_id,
  a_mode,
  b_mode,
  new_file,
  deleted_file,
  copied_file,
  raw_rename_from,
  raw_rename_to,
  diff,
  change_type,
  score 
)

Member Function Documentation

◆ __eq__()

def __eq__ (   self,
  other 
)

◆ __hash__()

def __hash__ (   self)

◆ __ne__()

def __ne__ (   self,
  other 
)

◆ __str__()

def __str__ (   self)

◆ a_path()

def a_path (   self)

◆ b_path()

def b_path (   self)

◆ rename_from()

def rename_from (   self)

◆ rename_to()

def rename_to (   self)

◆ renamed()

def renamed (   self)
:returns: True if the blob of our diff has been renamed
:note: This property is deprecated, please use ``renamed_file`` instead.

◆ renamed_file()

def renamed_file (   self)
:returns: True if the blob of our diff has been renamed

Field Documentation

◆ a_blob

a_blob

◆ a_mode

a_mode

◆ a_rawpath

a_rawpath

◆ b_blob

b_blob

◆ b_mode

b_mode

◆ b_rawpath

b_rawpath

◆ change_type

change_type

◆ copied_file

copied_file

◆ deleted_file

deleted_file

◆ diff

diff

◆ new_file

new_file

◆ NULL_BIN_SHA

NULL_BIN_SHA
static

◆ NULL_HEX_SHA

NULL_HEX_SHA
static

◆ raw_rename_from

raw_rename_from

◆ raw_rename_to

raw_rename_to

◆ re_header

re_header
static

◆ score

score

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