Some comment removal
This commit is contained in:
parent
bd6b1a60e8
commit
2b786abc6a
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
#TODO treeList, deleteList, _getFileCtimeMtime, conflictList should be called without having statedir informed. Just give the full path ?
|
#TODO treeList, deleteList, _getFileCtimeMtime, conflictList should be called without having statedir informed. Just give the full path ?
|
||||||
#TODO add error handling to new functions
|
#TODO add error handling to new functions
|
||||||
#TODO replace renameTimestampFiles with another _getFileCtimeMtime run in order to get real values after execution
|
|
||||||
#TODO check if _getCtimeMtime | sort removal needs to be backported
|
#TODO check if _getCtimeMtime | sort removal needs to be backported
|
||||||
|
|
||||||
PROGRAM="osync" # Rsync based two way sync engine with fault tolerance
|
PROGRAM="osync" # Rsync based two way sync engine with fault tolerance
|
||||||
|
@ -818,8 +817,6 @@ function _getFileCtimeMtimeRemote {
|
||||||
local fileList="${3}"
|
local fileList="${3}"
|
||||||
local timestampFile="${4}"
|
local timestampFile="${4}"
|
||||||
|
|
||||||
#WIP change output file to timestampFile
|
|
||||||
|
|
||||||
__CheckArguments 4 $# "$@" #__WITH_PARANOIA_DEBUG
|
__CheckArguments 4 $# "$@" #__WITH_PARANOIA_DEBUG
|
||||||
|
|
||||||
local retval
|
local retval
|
||||||
|
@ -919,13 +916,9 @@ function conflictList {
|
||||||
|
|
||||||
Logger "Creating conflictual file list." "NOTICE"
|
Logger "Creating conflictual file list." "NOTICE"
|
||||||
|
|
||||||
#WIP --nocheck-order or check why comm is complaining
|
|
||||||
comm -23 "${INITIATOR[$__replicaDir]}${INITIATOR[$__stateDir]}/${INITIATOR[$__type]}$timestampCurrentFilename" "${INITIATOR[$__replicaDir]}${INITIATOR[$__stateDir]}/${INITIATOR[$__type]}$timestampAfterFilename" > "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.${INITIATOR[$__type]}.$SCRIPT_PID.$TSTAMP"
|
comm -23 "${INITIATOR[$__replicaDir]}${INITIATOR[$__stateDir]}/${INITIATOR[$__type]}$timestampCurrentFilename" "${INITIATOR[$__replicaDir]}${INITIATOR[$__stateDir]}/${INITIATOR[$__type]}$timestampAfterFilename" > "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.${INITIATOR[$__type]}.$SCRIPT_PID.$TSTAMP"
|
||||||
comm -23 "${INITIATOR[$__replicaDir]}${INITIATOR[$__stateDir]}/${TARGET[$__type]}$timestampCurrentFilename" "${INITIATOR[$__replicaDir]}${INITIATOR[$__stateDir]}/${TARGET[$__type]}$timestampAfterFilename" > "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.${TARGET[$__type]}.$SCRIPT_PID.$TSTAMP"
|
comm -23 "${INITIATOR[$__replicaDir]}${INITIATOR[$__stateDir]}/${TARGET[$__type]}$timestampCurrentFilename" "${INITIATOR[$__replicaDir]}${INITIATOR[$__stateDir]}/${TARGET[$__type]}$timestampAfterFilename" > "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.${TARGET[$__type]}.$SCRIPT_PID.$TSTAMP"
|
||||||
|
|
||||||
#WIP
|
|
||||||
cp "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.${INITIATOR[$__type]}.$SCRIPT_PID.$TSTAMP" /tmp/i
|
|
||||||
cp "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.${TARGET[$__type]}.$SCRIPT_PID.$TSTAMP" /tmp/t
|
|
||||||
join -j 1 -t ';' -o 1.1,1.2,1.3,2.2,2.3 "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.${INITIATOR[$__type]}.$SCRIPT_PID.$TSTAMP" "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.${TARGET[$__type]}.$SCRIPT_PID.$TSTAMP" > "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.comapre.$SCRIPT_PID.$TSTAMP"
|
join -j 1 -t ';' -o 1.1,1.2,1.3,2.2,2.3 "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.${INITIATOR[$__type]}.$SCRIPT_PID.$TSTAMP" "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.${TARGET[$__type]}.$SCRIPT_PID.$TSTAMP" > "$RUN_DIR/$PROGRAM.${FUNCNAME[0]}.comapre.$SCRIPT_PID.$TSTAMP"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
@ -1420,8 +1413,8 @@ function deletionPropagation {
|
||||||
###### Step 4: Update file attributes
|
###### Step 4: Update file attributes
|
||||||
###### Step 5a & 5b: Update replicas
|
###### Step 5a & 5b: Update replicas
|
||||||
###### Step 6a & 6b: Propagate deletions on replicas
|
###### Step 6a & 6b: Propagate deletions on replicas
|
||||||
###### Step 7a & 8b: Create after run file list of replicas
|
###### Step 7a & 7b: Create after run file list of replicas
|
||||||
###### Step 8: Rename timestamp files from current to previous
|
###### Step 8a & 8b: Create ctime & mtime file lost of replicas
|
||||||
|
|
||||||
function Sync {
|
function Sync {
|
||||||
__CheckArguments 0 $# "$@" #__WITH_PARANOIA_DEBUG
|
__CheckArguments 0 $# "$@" #__WITH_PARANOIA_DEBUG
|
||||||
|
@ -1654,7 +1647,6 @@ function Sync {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#WIP reenable syncAttrs. Also check attr tests since they should trigger an error
|
|
||||||
## Step 4
|
## Step 4
|
||||||
if [ "$resumeInitiator" == "${SYNC_ACTION[4]}" ] || [ "$resumeTarget" == "${SYNC_ACTION[4]}" ]; then
|
if [ "$resumeInitiator" == "${SYNC_ACTION[4]}" ] || [ "$resumeTarget" == "${SYNC_ACTION[4]}" ]; then
|
||||||
if [[ "$RSYNC_ATTR_ARGS" == *"-X"* ]] || [[ "$RSYNC_ATTR_ARGS" == *"-A"* ]]; then
|
if [[ "$RSYNC_ATTR_ARGS" == *"-X"* ]] || [[ "$RSYNC_ATTR_ARGS" == *"-A"* ]]; then
|
||||||
|
@ -1825,7 +1817,7 @@ function Sync {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Step 8 #WIP adapt to last function
|
# Step 8a & 8b
|
||||||
if [ "$resumeInitiator" == "${SYNC_ACTION[8]}" ] || [ "$resumeTarget" == "${SYNC_ACTION[8]}" ]; then
|
if [ "$resumeInitiator" == "${SYNC_ACTION[8]}" ] || [ "$resumeTarget" == "${SYNC_ACTION[8]}" ]; then
|
||||||
if [[ "$RSYNC_ATTR_ARGS" == *"-X"* ]] || [[ "$RSYNC_ATTR_ARGS" == *"-A"* ]] || [ "$LOG_CONFLICTS" == "yes" ]; then
|
if [[ "$RSYNC_ATTR_ARGS" == *"-X"* ]] || [[ "$RSYNC_ATTR_ARGS" == *"-A"* ]] || [ "$LOG_CONFLICTS" == "yes" ]; then
|
||||||
|
|
||||||
|
@ -2267,13 +2259,13 @@ function Init {
|
||||||
SYNC_ACTION=(
|
SYNC_ACTION=(
|
||||||
'replica-tree'
|
'replica-tree'
|
||||||
'deleted-list'
|
'deleted-list'
|
||||||
'ctime-mtime-list'
|
'timestampList-list'
|
||||||
'conflict-list'
|
'conflict-list'
|
||||||
'sync_attrs'
|
'sync_attrs'
|
||||||
'update-replica'
|
'update-replica'
|
||||||
'delete-propagation'
|
'delete-propagation'
|
||||||
'replica-tree-after'
|
'replica-tree-after'
|
||||||
'rename-timestamp-files'
|
'timestampList-after'
|
||||||
'synced'
|
'synced'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue