Version 3.3.4
This commit is contained in:
1 parent
78706903a2
commit
fb6b5baabc
2206 files changed
+409828
-382984
No files matched your search
@@ -2,17 +2,17 @@
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.2.3
|
||||
* IP.Board v3.3.4
|
||||
* Three Way Merge Class
|
||||
* Last Updated: $Date: 2011-03-11 12:41:48 -0500 (Fri, 11 Mar 2011) $ BY $author$
|
||||
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $ BY $author$
|
||||
* </pre>
|
||||
*
|
||||
* @author Matt Mecham
|
||||
* @copyright (c) 2001 - 2010 Invision Power Services, Inc.
|
||||
* @license This is NULLED!
|
||||
* @license http://www.invisionpower.com/company/standards.php#license
|
||||
* @package IP.Board
|
||||
* @link http://hatynka.in
|
||||
* @version $Rev: 8042 $
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 10914 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -22,7 +22,7 @@ class ThreeWayMerge
|
||||
* Original text
|
||||
* For example, template bit from 3.0.5
|
||||
*
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
protected $_ORIG = array();
|
||||
|
||||
@@ -30,7 +30,7 @@ class ThreeWayMerge
|
||||
* New text
|
||||
* For example, template bit from 3.1.0
|
||||
*
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
protected $_NEW = array();
|
||||
|
||||
@@ -38,17 +38,22 @@ class ThreeWayMerge
|
||||
* Custom text
|
||||
* For example, user customized template bit
|
||||
*
|
||||
* @access protected
|
||||
* @var array
|
||||
*/
|
||||
protected $_CUSTOM = array();
|
||||
|
||||
/**
|
||||
* Debug messages
|
||||
*
|
||||
* @access public
|
||||
* @var array
|
||||
*/
|
||||
public $DEBUG = array();
|
||||
|
||||
/**
|
||||
* Diff type
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
public $diffType = 'lite';
|
||||
|
||||
/**
|
||||
@@ -57,6 +62,8 @@ class ThreeWayMerge
|
||||
* @param string Original Text
|
||||
* @param string New Text
|
||||
* @param string Custom Text
|
||||
* @param string Method ('lite' or 'ipb')
|
||||
* @return @e void
|
||||
*/
|
||||
public function __construct( $ORIG, $NEW, $CUSTOM, $mType='lite' )
|
||||
{
|
||||
@@ -99,12 +106,12 @@ class ThreeWayMerge
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge
|
||||
* Perform the merge and return the result
|
||||
*
|
||||
* @access public
|
||||
* @return string Merged string
|
||||
*
|
||||
* On conflict, will throw an exception with a message of CONFLICT
|
||||
*
|
||||
* @return @e string
|
||||
* @throws Exception
|
||||
*/
|
||||
|
||||
public function merge()
|
||||
@@ -163,9 +170,8 @@ class ThreeWayMerge
|
||||
/**
|
||||
* Post process merge (quick)
|
||||
*
|
||||
* @access protected
|
||||
* @param string Merge text
|
||||
* @return string processed text
|
||||
* @return @e string
|
||||
*/
|
||||
protected function _postProcessQuick( $text )
|
||||
{
|
||||
@@ -200,10 +206,9 @@ class ThreeWayMerge
|
||||
* Takes the two maps (old-new, old-custom) and merges.
|
||||
* Will throw an error on conflict.
|
||||
*
|
||||
* @access protected
|
||||
* @param array old-new map
|
||||
* @param array old-custom map
|
||||
* @return string
|
||||
* @return @e string
|
||||
*/
|
||||
protected function _processMerge( $orig_new_map, $orig_custom_map )
|
||||
{
|
||||
@@ -355,10 +360,9 @@ class ThreeWayMerge
|
||||
/**
|
||||
* Returns an array slice for the ORIG line number X
|
||||
*
|
||||
* @access protected
|
||||
* @param array Re-processed Diff Array
|
||||
* @param int ORIG line number
|
||||
* @return array
|
||||
* @return @e mixed
|
||||
*/
|
||||
protected function _sliceFromLineNumber( $data, $n )
|
||||
{
|
||||
@@ -376,11 +380,11 @@ class ThreeWayMerge
|
||||
/**
|
||||
* Returns an array of lines to add at the current ORIG line number X
|
||||
*
|
||||
* @access protected
|
||||
* @param array Re-processed Diff Array
|
||||
* @param int ORIG line number
|
||||
* @param array Array to add to
|
||||
* @return array
|
||||
* @param string Newline data (not used)
|
||||
* @return @e array
|
||||
*/
|
||||
protected function _textToAddAtLine( $data, $n, $return=array(), $p='' )
|
||||
{
|
||||
@@ -401,9 +405,9 @@ class ThreeWayMerge
|
||||
* Re-process DIFF.
|
||||
* Figures out mappings to original line numbers, etc
|
||||
*
|
||||
* @access protected
|
||||
* @param array Array of DIFF data
|
||||
* @return array
|
||||
* @param boolean Log or not (unused)
|
||||
* @return @e array
|
||||
*/
|
||||
protected function _fetchProcessed( $data, $log=0 )
|
||||
{
|
||||
@@ -491,9 +495,9 @@ class ThreeWayMerge
|
||||
/**
|
||||
* Add debug messages
|
||||
*
|
||||
* @access protected
|
||||
* @param string TITLE
|
||||
* @param mixed Data
|
||||
* @return @e void
|
||||
*/
|
||||
protected function _addDebugMsg( $title, $data )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user