fsl wrapper

Check-in [b5aaaaf46b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Check for conflicts on commit, ask for confirmation
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:b5aaaaf46b08267433883ecc310c620666ad9055
User & Date: matt 2012-04-26 05:01:23
Context
2012-05-01
03:29
forced a fork check-in: 0fdb584e46 user: matt tags: trunk
03:28
forced a fork check-in: 2a1ded8b0b user: matt tags: trunk
02:37
Experimental check for forks by Jeff Gong Closed-Leaf check-in: 07960a4b2d user: mrwellan tags: forks-check
2012-04-27
17:37
added version to header Closed-Leaf check-in: 8103f89ca9 user: jmgedge tags: bad_fork
2012-04-26
05:01
Check for conflicts on commit, ask for confirmation check-in: b5aaaaf46b user: matt tags: trunk
04:45
Testing check in with a conflict check-in: 5838dd691b user: matt tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to scripts/fsl.

408
409
410
411
412
413
414

415
416
417
418
419
420
421
422
...
508
509
510
511
512
513
514
515
516
517
518
519
520
521

522
523
524
525
526
527
528
529
530
531
532
533
534
535
536

#======================================================================
#  M I S C   T W E A K S 
#======================================================================

# From fossil email list by Kriangkrai Soatthiyanont nb// was "U\1\2"
function fsl_conflicts () {

       $FOSSILEXE "$@" | sed -r 's/^EDITED(\s+)(.*)/grep -q "< BEGIN MERGE CONFLICT:" "\2" \&\& (export HAVE_CONFLICT=yes;echo "CONFLICT   \2") || echo "\0"/e'; 
}

#======================================================================
# T H E   M A I N   H A N D L E R   A N D   P R O C E S S I N G 
#======================================================================

# repo commands
................................................................................
    # leaves output needs to be niceified, no need for a function
    "xleaves")
    shift
    $FOSSILEXE leaves "$@" | sed -e :a -e '$!N;s/\n         / /;ta' -e 'P;D'
    exit
    ;;

    xchanges)
    fsl_conflicts "$@"
    exit
    ;;

    xstatus)
    fsl_conflicts "$@"

    exit
    ;;

    xci | xcommit)
    fsl_conflicts changes "$@"
    if [ $HAVE_CONFLICT = "yes" ]; then
	echo ERROR: Conflicts detected. Type \"yes\" to continue.
	read -e ANSWER
	if [ $ANSWER = "yes" ]; then
	    $FOSSILEXE "$@"
	else
	    exit 1
	fi
    else
	$FOSSILEXE "$@"







>
|







 







<
<
<
<
<
|

>





|
|
|







408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
...
509
510
511
512
513
514
515





516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533

#======================================================================
#  M I S C   T W E A K S 
#======================================================================

# From fossil email list by Kriangkrai Soatthiyanont nb// was "U\1\2"
function fsl_conflicts () {
    export CONFLICT_FLAG_FILE=`mktemp`
    $FOSSILEXE "$@" | sed -r 's/^EDITED(\s+)(.*)/grep -q "< BEGIN MERGE CONFLICT:" "\2" \&\& rm -f $CONFLICT_FLAG_FILE \&\& echo "CONFLICT   \2" || echo "\0"/e'; 
}

#======================================================================
# T H E   M A I N   H A N D L E R   A N D   P R O C E S S I N G 
#======================================================================

# repo commands
................................................................................
    # leaves output needs to be niceified, no need for a function
    "xleaves")
    shift
    $FOSSILEXE leaves "$@" | sed -e :a -e '$!N;s/\n         / /;ta' -e 'P;D'
    exit
    ;;






    xchanges | xstatus)
    fsl_conflicts "$@"
    rm -f $CONFLICT_FLAG_FILE
    exit
    ;;

    xci | xcommit)
    fsl_conflicts changes "$@"
    if [ ! -e $CONFLICT_FLAG_FILE ]; then
	rm -f $CONFLICT_FLAG_FILE
	read -p "ERROR: Conflicts detected. Type \"yes\" to continue: " -e ANSWER
	if [ $ANSWER = "yes" ]; then
	    $FOSSILEXE "$@"
	else
	    exit 1
	fi
    else
	$FOSSILEXE "$@"