commit - fbbb53b90ee30e5fde6281e4b06b3fc1d689e083
commit + 49c543a6fe888394ca86e6399c706a9965486134
blob - e59e019d01dee6cf8c0d851c8d4b5ed6beb5c176
blob + 3b683b736207663881b76ad7dc8fe66657258335
--- regress/cmdline/add.sh
+++ regress/cmdline/add.sh
local testroot=`test_init add_basic`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got add foo > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init double_add`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got add foo > /dev/null)
(cd $testroot/wt && got add foo > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got add failed unexpectedly" >&2
test_done "$testroot" 1
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init multiple_add`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "new file" > $testroot/wt/bar
echo "new file" > $testroot/wt/baz
(cd $testroot/wt && got add foo bar baz > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got add failed unexpectedly" >&2
test_done "$testroot" 1
return 1
echo "A foo" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init add_file_in_new_subdir`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got add new/foo > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init add_deleted`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo -n > $testroot/stdout.expected
(cd $testroot/wt && got add beta > $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got add command succeeded unexpectedly" >&2
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "1"
echo "got: beta: file has unexpected status" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
local testroot=`test_init add_directory`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got add . > $testroot/stdout 2> $testroot/stderr)
- ret="$?"
+ ret=$?
echo "got: adding directories requires -R option" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got add -I . > $testroot/stdout 2> $testroot/stderr)
- ret="$?"
+ ret=$?
echo "got: adding directories requires -R option" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo 'A epsilon/zeta2' >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo 'A tree1/foo' > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo -n '' > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo 'A tree2/foo' > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo "A repo2" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
# This currently fails with "work tree must be updated"...
(cd $testroot/wt && got commit -m 'add file repo2' \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "commit succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo -n "got: work tree must be updated " > $testroot/stderr.expected
echo "before these changes can be committed" >> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
local testroot=`test_init add_symlink`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "A alpha.link" > $testroot/stdout.expected
(cd $testroot/wt && got add alpha.link > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "A epsilon.link" > $testroot/stdout.expected
(cd $testroot/wt && got add epsilon.link > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "A passwd.link" > $testroot/stdout.expected
(cd $testroot/wt && got add passwd.link > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "A epsilon/beta.link" > $testroot/stdout.expected
(cd $testroot/wt && got add epsilon/beta.link > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "A nonexistent.link" > $testroot/stdout.expected
(cd $testroot/wt && got add nonexistent.link > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
blob - 548dac7cec6a0bef830836a1220db040da604b7e
blob + 71210cda27e4286934db7aa6882ed109ca1ad397
--- regress/cmdline/backout.sh
+++ regress/cmdline/backout.sh
local testroot=`test_init backout_basic`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "D new" >> $testroot/stdout.expected
echo "Backed out commit $bad_commit" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "alpha" > $testroot/content.expected
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo 'D new' >> $testroot/stdout.expected
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init backout_edits_for_file_since_deleted`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
>> $testroot/stdout.expected
echo "in the work tree: 1" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo -n '' > $testroot/stdout.expected
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit0=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
>> $testroot/stdout.expected
echo "in the work tree: 1" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "zeta" > $testroot/content.expected
cat $testroot/wt/epsilon/zeta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo -n '' > $testroot/stdout.expected
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
blob - a9916124c369cb2ba1bac4634cd2e80573716a5a
blob + e88c01aa511a2049c9fece87f2e78bb8e9f274b7
--- regress/cmdline/blame.sh
+++ regress/cmdline/blame.sh
> $testroot/${file}.blame.git)
cmp -s $testroot/${file}.blame.git $testroot/${file}.blame.got
- ret="$?"
- if [ "$ret" != "0" -a "$xfail" = "" ]; then
+ ret=$?
+ if [ $ret -ne 0 -a "$xfail" = "" ]; then
diff -u $testroot/${file}.blame.git $testroot/${file}.blame.got
return 1
fi
local testroot=`test_init blame_basic`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "3) $short_commit3 $d $GOT_AUTHOR_8 3" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
blame_cmp "$testroot" "alpha"
- ret="$?"
+ ret=$?
test_done "$testroot" "$ret"
}
local tag=1.0.0
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "2) $short_commit2 $d $GOT_AUTHOR_8 2" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
blame_cmp "$testroot" "alpha"
- ret="$?"
+ ret=$?
test_done "$testroot" "$ret"
}
local testroot=`test_init blame_file_single_line`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "1) $short_commit1 $d $GOT_AUTHOR_8 1" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
blame_cmp "$testroot" "alpha"
- ret="$?"
+ ret=$?
test_done "$testroot" "$ret"
}
local testroot=`test_init blame_file_single_line_no_newline`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "1) $short_commit1 $d $GOT_AUTHOR_8 1" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init blame_all_lines_replaced`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "8) $short_commit1 $d $GOT_AUTHOR_8 8" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init blame_lines_shifted_up`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "8) $short_commit1 $d $GOT_AUTHOR_8 8" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
blame_cmp "$testroot" "alpha"
- ret="$?"
+ ret=$?
test_done "$testroot" "$ret"
}
local testroot=`test_init blame_lines_shifted_down`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
blame_cmp "$testroot" "alpha"
- ret="$?"
+ ret=$?
test_done "$testroot" "$ret"
}
local testroot=`test_init blame_commit_subsumed`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
blame_cmp "$testroot" "alpha"
- ret="$?"
+ ret=$?
test_done "$testroot" "$ret"
}
local testroot=`test_init blame_blame_h`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got commit -m "change 5" > /dev/null)
blame_cmp "$testroot" "got_blame.h"
- ret="$?"
+ ret=$?
test_done "$testroot" "$ret"
}
local testroot=`test_init blame_added_on_branch`
got branch -r $testroot/repo -c master newbranch
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
got checkout -b newbranch $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "3) $short_commit3 $d $GOT_AUTHOR_8 3" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
# Attempt a (nonsensical) blame of a submodule.
got blame -r $testroot/repo repo2 \
> $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "blame command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: object $submodule_id not found" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
# got blame dereferences symlink to a regular file
got blame -r $testroot/repo alpha.link > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "blame command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" -a "$xfail" = "" ]; then
+ ret=$?
+ if [ $ret -ne 0 -a "$xfail" = "" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "1"
return 1
# got blame dereferences symlink with relative path
got blame -r $testroot/repo epsilon/beta.link > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "blame command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" -a "$xfail" = "" ]; then
+ ret=$?
+ if [ $ret -ne 0 -a "$xfail" = "" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "1"
return 1
got blame -r $testroot/repo epsilon.link > $testroot/stdout \
2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "blame command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
# blame dereferences symlink to a directory
echo "got: /epsilon: wrong type of object" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "1"
return 1
# got blame fails if symlink target does not exist in repo
got blame -r $testroot/repo passwd.link > $testroot/stdout \
2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "blame command succeeded unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "got: /etc/passwd: no such entry found in tree" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "1"
return 1
got blame -r $testroot/repo nonexistent.link > $testroot/stdout \
2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "blame command succeeded unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "got: /nonexistent: no such entry found in tree" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "1"
return 1
local testroot=`test_init blame_lines_shifted_skip`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "7) $short_commit2 $d $GOT_AUTHOR_8 Q" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
blame_cmp "$testroot" "alpha"
- ret="$?"
+ ret=$?
test_done "$testroot" "$ret"
}
blob - f49f14f4cb25858d75221abe2eef12ed8b318ae2
blob + 8e459f575af5f369a7a0987fa5f5eb2e1680b947
--- regress/cmdline/branch.sh
+++ regress/cmdline/branch.sh
# Create a branch based on repository's HEAD reference
got branch -r $testroot/repo newbranch
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got branch command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
# Ensure that Git recognizes the branch Got has created
(cd $testroot/repo && git checkout -q newbranch)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "git checkout command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
git_commit $testroot/repo -m "committing to delta on newbranch"
got checkout -b newbranch $testroot/repo $testroot/wt >/dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got checkout command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
echo "modified delta on branch" > $testroot/content.expected
cat $testroot/wt/gamma/delta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
# Create a branch based on the work tree's branch
(cd $testroot/wt && got branch -n refs/heads/anotherbranch)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/repo && git checkout -q anotherbranch)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "git checkout command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
# Create a branch based on another specific branch
(cd $testroot/wt && got branch -n -c master yetanotherbranch)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/repo && git checkout -q yetanotherbranch)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "git checkout command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
# Create a branch based on a specific commit
local commit_id=`git_show_head $testroot/repo`
got branch -r $testroot/repo -c $commit_id commitbranch
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got branch command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/repo && git checkout -q commitbranch)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "git checkout command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
for b in branch1 branch2 branch3; do
got branch -r $testroot/repo $b
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got branch command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
echo " branch3: $commit_id" >> $testroot/stdout.expected
echo " master: $commit_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got checkout $testroot/repo $testroot/wt >/dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got checkout command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
echo " branch3: $commit_id" >> $testroot/stdout.expected
echo "* master: $commit_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo " branch3: $commit_id" >> $testroot/stdout.expected
echo "~ master: $commit_id2" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got update command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
echo " branch3: $commit_id" >> $testroot/stdout.expected
echo "* master: $commit_id2" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update -b branch1 > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got update command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
echo " branch3: $commit_id" >> $testroot/stdout.expected
echo " master: $commit_id2" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
for b in branch1 branch2 branch3; do
got branch -r $testroot/repo $b
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got branch command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
done
got branch -d branch2 -r $testroot/repo > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got branch command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
echo " branch3: $commit_id" >> $testroot/stdout.expected
echo " master: $commit_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "refs/heads/branch3: $commit_id" >> $testroot/stdout.expected
echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
got branch -d bogus_branch_name -r $testroot/repo \
> $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got branch succeeded unexpectedly"
test_done "$testroot" "$ret"
return 1
echo "got: reference refs/heads/bogus_branch_name not found" \
> $testroot/stderr.expected
cmp -s $testroot/stderr $testroot/stderr.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo "refs/remotes/origin/master: $commit_id" \
>> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got branch -d origin/branch1 -r $testroot/repo > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got branch command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
got branch -d refs/remotes/origin/branch3 -r $testroot/repo \
> $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got branch command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
echo "refs/remotes/origin/master: $commit_id" \
>> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit_id=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt >/dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got checkout command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
echo "got: will not delete this work tree's current branch" \
> $testroot/stderr.expected
cmp -s $testroot/stderr $testroot/stderr.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
for b in branch1 branch2 branch3; do
got branch -r $testroot/repo $b
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got branch command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
(cd $testroot/repo && git pack-refs --all)
got branch -d refs/heads/branch2 -r $testroot/repo > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got update command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
echo " branch3: $commit_id" >> $testroot/stdout.expected
echo " master: $commit_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "refs/heads/branch3: $commit_id" >> $testroot/stdout.expected
echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
got branch -d bogus_branch_name -r $testroot/repo \
> $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got update succeeded unexpectedly"
test_done "$testroot" "$ret"
return 1
echo "got: reference refs/heads/bogus_branch_name not found" \
> $testroot/stderr.expected
cmp -s $testroot/stderr $testroot/stderr.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
for b in branch1 branch2 branch3; do
got branch -r $testroot/repo $b
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got branch command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
done
got checkout $testroot/repo $testroot/wt >/dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got checkout command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got branch > $testroot/stdout)
echo "master" > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update -b branch1 > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got update command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got branch > $testroot/stdout)
echo "branch1" > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
blob - 332aac7daf0b874612728683bc951e0b30605f86
blob + f73f4a345848c012f6f17f10fba4accf493f8ae0
--- regress/cmdline/cat.sh
+++ regress/cmdline/cat.sh
echo "alpha" > $testroot/stdout.expected
got cat -r $testroot/repo $alpha_id > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "$delta_id 0100644 delta" > $testroot/stdout.expected
got cat -r $testroot/repo $gamma_id > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
got cat -r $testroot/repo $commit_id > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "alpha" > $testroot/stdout.expected
got cat -r $testroot/repo alpha > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "$delta_id 0100644 delta" > $testroot/stdout.expected
got cat -r $testroot/repo gamma > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "alpha" > $testroot/stdout.expected
got cat -r $testroot/repo -c $commit_id alpha > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "modified alpha" > $testroot/stdout.expected
got cat -r $testroot/repo -c $commit_id2 alpha > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
for arg in master $commit_id3; do
got cat -r $testroot/repo $arg > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
got cat -r $testroot/repo $commit_id2 > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "new file called master" > $testroot/stdout.expected
got cat -r $testroot/repo -P master > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "new file called $commit_id2" > $testroot/stdout.expected
got cat -r $testroot/repo -P $commit_id2 > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
got cat -r $testroot/repo repo2 > $testroot/stdout \
> $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "cat command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: object $submodule_id not found" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
got cat -r $testroot/repo repo2 > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
echo -n "alpha" > $testroot/stdout.expected
got cat -r $testroot/repo $alpha_link_id > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo -n "../beta" > $testroot/stdout.expected
got cat -r $testroot/repo $epsilon_beta_link_id > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo -n "epsilon" > $testroot/stdout.expected
got cat -r $testroot/repo $epsilon_link_id > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo -n "/etc/passwd" > $testroot/stdout.expected
got cat -r $testroot/repo $passwd_link_id > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo -n "nonexistent" > $testroot/stdout.expected
got cat -r $testroot/repo $nonexistent_link_id > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
blob - 14a25416da706b0bced0477529b71a35b28914d1
blob + d5f017d307e68809b88a4ef9d579902a290129ef
--- regress/cmdline/checkout.sh
+++ regress/cmdline/checkout.sh
echo "Now shut up and hack" >> $testroot/stdout.expected
got checkout $testroot/repo $testroot/wt > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
$testroot/wt/gamma/delta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
fi
test_done "$testroot" "$ret"
mkdir $testroot/wt
got checkout $testroot/repo $testroot/wt > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
$testroot/wt/gamma/delta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
fi
test_done "$testroot" "$ret"
got checkout $testroot/repo $testroot/wt > $testroot/stdout \
2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "checkout succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: $testroot/wt: directory exists and is not empty" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
echo "Now shut up and hack" >> $testroot/stdout.expected
got checkout $testroot/repo $testroot/wt > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
ls -l $testroot/wt/xfile | grep -q '^-rwx'
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "file is not executable" >&2
ls -l $testroot/wt/xfile >&2
fi
local head_rev=`git_show_head $testroot/repo`
got checkout -b master -c $head_rev $testroot/repo $testroot/wt \
> $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
test_done "$testroot" "1"
return 1
fi
echo -n "" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "'got branch -c $head_rev BRANCH_NAME'" \
>> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo "Now shut up and hack" >> $testroot/stdout.expected
got checkout -c $tag $testroot/repo $testroot/wt > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
$testroot/wt/gamma/delta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
fi
test_done "$testroot" "$ret"
echo "Now shut up and hack" >> $testroot/stdout.expected
got checkout $testroot/repo $testroot/wt > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
$testroot/wt/gamma/delta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
fi
test_done "$testroot" "$ret"
got checkout $testroot/repo $testroot/wt \
> $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "writable and running 'got update' will prevent this" \
>> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
$testroot/wt/gamma/delta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
fi
chmod -R u+w $testroot/repo # make repo cleanup work
got checkout $testroot/repo $testroot/wt > $testroot/stdout \
2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "checkout succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "got: $testroot/wt: directory exists and is not empty" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo "Now shut up and hack" >> $testroot/stdout.expected
got checkout -E $testroot/repo $testroot/wt > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "Now shut up and hack" >> $testroot/stdout.expected
got checkout -E $testroot/repo $testroot/wt > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
$testroot/wt/gamma/delta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "Now shut up and hack" >> $testroot/stdout.expected
got checkout -E $testroot/repo $testroot/wt > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
$testroot/wt/gamma/delta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit_id=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got checkout failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "Now shut up and hack" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/alpha.link > $testroot/stdout
echo "alpha" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/epsilon.link > $testroot/stdout
echo "epsilon" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cp $testroot/wt/passwd.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/passwd2.link > $testroot/stdout
echo "passwd.link" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/epsilon/beta.link > $testroot/stdout
echo "../beta" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/nonexistent.link > $testroot/stdout
echo "nonexistent" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cp $testroot/wt/dotgotfoo.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
fi
test_done "$testroot" "$ret"
git_commit $testroot/repo -m "add symlinks"
(cd $testroot && got checkout $testroot/repo wt > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
readlink $testroot/wt/alpha.link > $testroot/stdout
echo "alpha" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/epsilon.link > $testroot/stdout
echo "epsilon" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cp $testroot/wt/passwd.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/epsilon/beta.link > $testroot/stdout
echo "../beta" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/nonexistent.link > $testroot/stdout
echo "nonexistent" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cp $testroot/wt/dotgotfoo.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
fi
test_done "$testroot" "$ret"
got checkout $testroot/repo $testroot/wt \
> $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got checkout command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
fi
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
printf "\nNow shut up and hack\n" >> $testroot/stdout.expected
got checkout -q $testroot/repo $testroot/wt > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
$testroot/wt/gamma/delta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
fi
test_done "$testroot" "$ret"
blob - ca1e787e193580d85479d0f3a60497b0559d95a8
blob + 15c8d5decf9f20816bd1d23ebed6d2d56437e4f1
--- regress/cmdline/cherrypick.sh
+++ regress/cmdline/cherrypick.sh
local testroot=`test_init cherrypick_basic`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Merged commit $branch_rev" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "modified alpha on branch" > $testroot/content.expected
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "new file on branch" > $testroot/content.expected
cat $testroot/wt/epsilon/new > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "Merged commit $branch_rev2" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init cherrypick_root_commit`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Merged commit $root_commit" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "modified new file on branch" >> $testroot/content.expected
cat $testroot/wt/epsilon/new > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init cherrypick_into_work_tree_with_conflicts`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "C alpha" > $testroot/stdout.expected
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got cherrypick $branch_rev \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "cherrypick succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
>> $testroot/stderr.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/content.expected $testroot/wt/alpha
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/wt/alpha
fi
test_done "$testroot" "$ret"
local second_rev=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got cherrypick $branch_rev \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "cherrypick succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
>> $testroot/stderr.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
echo "A .gitmodules" > $testroot/stdout.expected
echo "Merged commit $commit_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
echo "This is a file called repo2" > $testroot/wt/repo2
(cd $testroot/wt && got add repo2 > /dev/null)
(cd $testroot/wt && got commit -m 'add file repo2' > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "commit failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "A .gitmodules" > $testroot/stdout.expected
echo "Merged commit $commit_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "A .gitmodules" > $testroot/stdout.expected
echo "M repo2" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
passwd.link@ -> /etc/passwd
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "A zeta.link" >> $testroot/stdout.expected
echo "Merged commit $commit_id2" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/alpha.link > $testroot/stdout
echo "beta" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/dotgotfoo.link > $testroot/stdout
echo ".got/foo" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/epsilon.link > $testroot/stdout
echo "gamma" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cp $testroot/wt/passwd.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/epsilon/beta.link > $testroot/stdout
echo "../gamma/delta" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got commit -m 'commit cherrypick result' \
> /dev/null 2>$testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got commit succeeded unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "outside of paths under version control" \
>> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got commit -S -m 'commit cherrypick result' \
> /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got commit failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
zeta.link@ -> epsilon/zeta
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
>> $testroot/stdout.expected
echo "the work tree: 1" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cp $testroot/wt/alpha.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "this is unversioned file boo" > $testroot/content.expected
cp $testroot/wt/boo.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
cp $testroot/wt/epsilon.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
cp $testroot/wt/passwd.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
cp $testroot/wt/epsilon/beta.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo '>>>>>>>' >> $testroot/content.expected
cp $testroot/wt/dotgotfoo.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo -n "" >> $testroot/content.expected
cp $testroot/wt/dotgotbar.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
cp $testroot/wt/new.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "M new.link" >> $testroot/stdout.expected
echo "D nonexistent.link" >> $testroot/stdout.expected
(cd $testroot/wt && got status > $testroot/stdout)
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
local commit_id=`git_show_head $testroot/repo`
got checkout -b bar $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got checkout failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got commit -m "add file on branch bar" > /dev/null)
got checkout -b bar -p epsilon $testroot/repo $testroot/wt2 > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got checkout failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "Merged commit $commit_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local ccc_commit=`git_show_head $testroot/repo`
got checkout -b newbranch $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Files with new merge conflicts: 1" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local ccc_commit=`git_show_head $testroot/repo`
got checkout -b newbranch $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Files with new merge conflicts: 1" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local base_commit=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Merged commit $branch_rev2" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got diff |
egrep -v '^(diff|blob|file)' > $testroot/diff)
cmp -s $testroot/diff.expected $testroot/diff
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/diff.expected $testroot/diff
fi
local testroot=`test_init cherrypick_same_branch`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "in the work tree: 1" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init cherrypick_dot_on_a_line_by_itself`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Merged commit $branch_rev" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
printf "modified\n:delta\n.\non\n:branch\n" > $testroot/content.expected
cat $testroot/wt/gamma/delta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
fi
test_done "$testroot" "$ret"
local commit_id0=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Merged commit $commit_id1" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
chmod 755 $testroot/content.expected
cp $testroot/wt/foo $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "Merged commit $commit_id2" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
chmod 755 $testroot/content.expected
cp $testroot/wt/foo $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "Files with new merge conflicts: 1" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo '>>>>>>>' >> $testroot/content.expected
cp $testroot/wt/foo $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo -n '? ' >> $testroot/stdout.expected
(cd $testroot/wt && ls foo-2-* >> $testroot/stdout.expected)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "Files with new merge conflicts: 1" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
>> $testroot/content.expected
cp $testroot/wt/foo $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
chmod 755 $testroot/content.expected
cat $testroot/wt/foo-1-* > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
chmod 755 $testroot/content.expected
cat $testroot/wt/foo-2-* > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "Merged commit $commit_id4" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
blob - d950aa95587abfc3c97d43aa360191d8fd9fc808
blob + 06fe38880f4015429de2b40bbdae85ed128d5925
--- regress/cmdline/cleanup.sh
+++ regress/cmdline/cleanup.sh
got branch -r $testroot/repo newbranch >/dev/null
got checkout -b newbranch $testroot/repo $testroot/wt >/dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got checkout command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
gotadmin cleanup -a -n -q -r $testroot/repo > $testroot/stdout
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
ls -R $testroot/repo/.git/objects > $testroot/objects-after
cmp -s $testroot/objects-before $testroot/objects-after
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/objects-before $testroot/objects-after
test_done "$testroot" "$ret"
return 1
# cleanup should remove loose objects that belonged to the branch
gotadmin cleanup -a -q -r $testroot/repo > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "gotadmin cleanup failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
fi
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
# no pack files should exist yet
ls $testroot/repo/.git/objects/pack/ > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
gotadmin cleanup -a -n -q -r $testroot/repo > $testroot/stdout
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
ls -R $testroot/repo/.git/objects > $testroot/objects-after
cmp -s $testroot/objects-before $testroot/objects-after
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/objects-before $testroot/objects-after
test_done "$testroot" "$ret"
return 1
# cleanup should remove all loose objects
gotadmin cleanup -a -q -r $testroot/repo > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "gotadmin cleanup failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
fi
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
ret=1
break
done
- if [ "$ret" = "1" ]; then
+ if [ $ret -eq 1 ]; then
break
fi
done
# cleanup should now refuse to purge objects
gotadmin cleanup -a -q -r $testroot/repo > $testroot/stdout \
2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "gotadmin cleanup succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "this implies that objects must not be deleted" \
>> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
# no pack files should exist yet
ls $testroot/repo/.git/objects/pack/ > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
# cleanup should now refuse to purge objects
gotadmin cleanup -a -q -r $testroot/repo > $testroot/stdout \
2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "gotadmin cleanup succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "be restored or 'gotadmin cleanup -p' must be run" \
>> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
fi
gotadmin cleanup -a -r $testroot/repo -p -n > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "gotadmin cleanup failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
packidx_path=$testroot/repo/.git/objects/pack/pack-${packhash}.idx
echo "$packidx_path could be removed" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
gotadmin cleanup -a -r $testroot/repo -p > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "gotadmin cleanup failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
fi
echo "$packidx_path removed" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
# cleanup should now attempt to purge objects
gotadmin cleanup -a -q -r $testroot/repo > $testroot/stdout \
2> $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "gotadmin cleanup failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
blob - 0e24ae3c91470f97788ef2e7a418a85ac613d339
blob + 7a0c9fac946246753a140a7bcc326eb9d7dd52a0
--- regress/cmdline/clone.sh
+++ regress/cmdline/clone.sh
local commit_id=`git_show_head $testroot/repo`
got clone -q $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
fi
got log -l0 -p -r $testroot/repo > $testroot/log-repo
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got log command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
fi
got log -l0 -p -r $testroot/repo > $testroot/log-repo-clone
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got log command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/log-repo $testroot/log-repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "log -p output of cloned repository differs" >&2
test_done "$testroot" "$ret"
return 1
fi
got ref -l -r $testroot/repo > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got ref -l -r $testroot/repo-clone > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
}
EOF
cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/got.conf.expected \
$testroot/repo-clone/got.conf
test_done "$testroot" "$ret"
fetch = refs/tags/*:refs/tags/*
EOF
cmp -s $testroot/repo-clone/config $testroot/config.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/config.expected \
$testroot/repo-clone/config
fi
got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
got clone -l $testurl/repo > $testroot/stdout 2>$testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
got ref -l -r $testroot/repo >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
| grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
got clone -q -b foo $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
}
EOF
cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/got.conf.expected \
$testroot/repo-clone/got.conf
test_done "$testroot" "$ret"
fetch = refs/tags/*:refs/tags/*
EOF
cmp -s $testroot/repo-clone/config $testroot/config.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/config.expected \
$testroot/repo-clone/config
fi
| grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
got clone -q -a $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
}
EOF
cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/got.conf.expected \
$testroot/repo-clone/got.conf
test_done "$testroot" "$ret"
fetch = refs/tags/*:refs/tags/*
EOF
cmp -s $testroot/repo-clone/config $testroot/config.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/config.expected \
$testroot/repo-clone/config
fi
| grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
got clone -q -m $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
}
EOF
cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/got.conf.expected \
$testroot/repo-clone/got.conf
test_done "$testroot" "$ret"
fetch = refs/tags/*:refs/tags/*
EOF
cmp -s $testroot/repo-clone/config $testroot/config.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/config.expected \
$testroot/repo-clone/config
fi
| grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
got clone -q -m -a $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
}
EOF
cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/got.conf.expected \
$testroot/repo-clone/got.conf
test_done "$testroot" "$ret"
fetch = refs/tags/*:refs/tags/*
EOF
cmp -s $testroot/repo-clone/config $testroot/config.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/config.expected \
$testroot/repo-clone/config
fi
| grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
got clone -q -R hoo $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
}
EOF
cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/got.conf.expected \
$testroot/repo-clone/got.conf
test_done "$testroot" "$ret"
fetch = refs/tags/*:refs/tags/*
EOF
cmp -s $testroot/repo-clone/config $testroot/config.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/config.expected \
$testroot/repo-clone/config
fi
| grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
got clone -q -R hoo/boo/zoo -b foo $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
}
EOF
cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/got.conf.expected \
$testroot/repo-clone/got.conf
test_done "$testroot" "$ret"
fetch = refs/tags/*:refs/tags/*
EOF
cmp -s $testroot/repo-clone/config $testroot/config.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/config.expected \
$testroot/repo-clone/config
fi
| grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
got clone -q -R hoo -m $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
}
EOF
cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/got.conf.expected \
$testroot/repo-clone/got.conf
test_done "$testroot" "$ret"
fetch = refs/tags/*:refs/tags/*
EOF
cmp -s $testroot/repo-clone/config $testroot/config.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/config.expected \
$testroot/repo-clone/config
fi
got branch -r $testroot/repo -c $commit_id bar
got clone -q -b foo -b bar $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
}
EOF
cmp -s $testroot/repo-clone/got.conf $testroot/got.conf.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/got.conf.expected \
$testroot/repo-clone/got.conf
test_done "$testroot" "$ret"
fetch = refs/tags/*:refs/tags/*
EOF
cmp -s $testroot/repo-clone/config $testroot/config.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/config.expected \
$testroot/repo-clone/config
fi
blob - d878260cbb0d118bc817382895282a23ad5f98d7
blob + e590a17fa75734f18f299a52ca02118739f13b2b
--- regress/cmdline/commit.sh
+++ regress/cmdline/commit.sh
local testroot=`test_init commit_basic`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Created commit $head_rev" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init commit_new_subdir`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Created commit $head_rev" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init commit_subdir`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Created commit $head_rev" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init commit_single_file`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Created commit $head_rev" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local first_commit=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
"changes can be committed" > $testroot/stderr.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo "modified alpha" > $testroot/wt/alpha
(cd $testroot/wt && got commit -m 'changed alpha ' > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "commit failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "M alpha" > $testroot/stdout.expected
echo "Created commit $head_rev" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init commit_added_subdirs`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Created commit $head_rev" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init commit_deleted_subdirs`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Created commit $head_rev" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "beta" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local initial_rev=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
> $testroot/stderr.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
local testroot=`test_init commit_single_file_multiple`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Created commit $head_rev" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
local testroot=`test_init commit_added_and_modified_in_same_dir`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Created commit $head_rev" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit1=`git_show_head $testroot/repo`
got checkout -p gamma $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Created commit $commit2" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
got diff -r $testroot/repo $commit1 $commit2 > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "Created commit $commit3" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
got diff -r $testroot/repo $commit2 $commit3 > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init commit_dir_path`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Created commit $head_rev" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "M alpha" > $testroot/stdout.expected
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init commit_selected_paths`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got commit -m 'many paths' nonexistent alpha \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "commit succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: nonexistent: bad path" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo "Created commit $head_rev" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
got checkout -b refs/remotes/origin/master \
$testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got commit -m 'change alpha' \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "commit succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo '"refs/heads/" reference namespace' \
>> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
local testroot=`test_init commit_no_email`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "is required for compatibility with Git" \
>> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init commit_tree_entry_sorting`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
# Let git-fsck verify the newly written tree to make sure Git is happy
(cd $testroot/repo && git fsck --strict \
> $testroot/fsck.stdout 2> $testroot/fsck.stderr)
- ret="$?"
+ ret=$?
test_done "$testroot" "$ret"
}
local testroot=`test_init commit_gotconfig_author`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "modified alpha" > $testroot/wt/alpha
(cd $testroot/wt && got commit -m 'test gotconfig author' > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/repo && got log -l1 | grep ^from: > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "from: Flan Luck <flan_luck@openbsd.org>" \
> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init commit_gotconfig_worktree_author`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "modified alpha" > $testroot/wt/alpha
(cd $testroot/wt && got commit -m 'test gotconfig author' > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/repo && got log -l1 | grep ^from: > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "from: Flan Squee <flan_squee@openbsd.org>" \
> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init commit_gitconfig_author`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "modified alpha" > $testroot/wt/alpha
(cd $testroot/wt && got commit -m 'test gitconfig author' > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/repo && got log -l1 | grep ^from: > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "from: Flan Luck <flan_luck@openbsd.org>" \
> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init commit_xbit_change`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got commit -mx > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got commit failed unexpectedly"
test_done "$testroot" "$ret"
return 1
echo 'm alpha' > $testroot/stdout.expected
echo "Created commit $commit_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got commit -mx > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got commit failed unexpectedly"
test_done "$testroot" "$ret"
return 1
echo 'm alpha' > $testroot/stdout.expected
echo "Created commit $commit_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
chmod $mode $testroot/wt/alpha
(cd $testroot/wt && got commit -mm > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got commit failed unexpectedly"
test_done "$testroot" "$ret"
return 1
echo 'M alpha' > $testroot/stdout.expected
echo "Created commit $commit_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "$alpha_id $expected_mode alpha" > $testroot/stdout.expected
got cat -r $testroot/repo $tree_id | grep 'alpha$' > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
return $ret
local testroot=`test_init commit_normalizes_filemodes`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
modes="600 400 460 640 440 660 444 666"
for m in $modes; do
commit_check_mode "$m" "0100644"
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
break
fi
done
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
modes="700 500 570 750 550 770 555 777"
for m in $modes; do
commit_check_mode "$m" "0100755"
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
break
fi
done
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/repo && git commit -q -m 'adding submodule')
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "checkout failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "" > $testroot/stdout.expected
(cd $testroot/wt && got commit -m 'modify alpha' > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "commit failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "Created commit $head_rev" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
readlink $wtpath/alpha.link > $testroot/stdout
echo "alpha" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
return 1
fi
readlink $wtpath/epsilon.link > $testroot/stdout
echo "epsilon" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
return 1
fi
echo -n "/etc/passwd" > $testroot/content.expected
cp $wtpath/passwd.link $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "cp command failed unexpectedly" >&2
return 1
fi
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
return 1
fi
readlink $wtpath/epsilon/beta.link > $testroot/stdout
echo "../beta" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
return 1
fi
readlink $wtpath/nonexistent.link > $testroot/stdout
echo "nonexistent" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
return 1
fi
local testroot=`test_init commit_symlink`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got commit -m 'test commit_symlink' \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got commit succeeded unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "symbolic link points outside of paths under version control" \
>> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo "Created commit $head_rev" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
# verify created in-repository tree
got checkout $testroot/repo $testroot/wt2 > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
check_symlinks $testroot/wt2
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
# 'got update' should reinstall passwd.link as a regular file
(cd $testroot/wt && got update > /dev/null)
check_symlinks $testroot/wt
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got commit -m 'test commit_symlink' \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got commit succeeded unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "symbolic link points outside of paths under version control" \
>> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo "Created commit $head_rev" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
passwd.link@ -> /etc/passwd
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init commit_fix_bad_symlink`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got checkout failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
# create another work tree which will contain the "bad" symlink
got checkout $testroot/repo $testroot/wt2 > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got checkout failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "Created commit $head_rev" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/passwd.link > $testroot/stdout
echo "alpha" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
return 1
fi
# Update the other work tree; the bad symlink should be fixed
(cd $testroot/wt2 && got update > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got checkout failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt2/passwd.link > $testroot/stdout
echo "alpha" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
return 1
fi
local testroot=`test_init commit_prepared_logmsg`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Created commit $head_rev" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got log -l 1 > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "Created commit $head_rev" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got log -l 1 > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init commit_large_file`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Created commit $head_rev" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
new_id=`get_blob_id $testroot/repo "" new`
got cat -r $testroot/repo $new_id > $testroot/new
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "commit failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
fi
cmp -s $testroot/new $testroot/wt/new
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/new $testroot/wt/new
fi
test_done "$testroot" "$ret"
blob - df81db689facacce41e7257238b81e939bc87e2a
blob + 26f717faa35b5906f8abb7c9f459f633ebaa09dc
--- regress/cmdline/common.sh
+++ regress/cmdline/common.sh
(cd $repo && git fsck --strict \
> $testroot/fsck.stdout 2> $testroot/fsck.stderr)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo -n "git fsck: "
cat $testroot/fsck.stderr
echo "git fsck failed; leaving test data in $testroot"
local testroot="$1"
git_fsck $testroot $testroot/repo
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
return $ret
fi
blob - 20900fc5fd72f1cac044afaa917e0c224220d5f9
blob + 74dae87bde2cac25abaa0af2a1c84df2209884ca
--- regress/cmdline/diff.sh
+++ regress/cmdline/diff.sh
local head_rev=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got diff > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/repo && got diff 2> $testroot/stderr)
echo "got: no got work tree found" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
(cd $testroot/repo && got diff $head_rev foo 2> $testroot/stderr)
echo "got: foo: object not found" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "got: nonexistent: No such file or directory" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got diff new alpha epsilon beta > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
# different order of arguments results in same output order
(cd $testroot/wt && got diff alpha new epsilon beta \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "diff failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
got br -r $testroot/repo -c master new > /dev/null
(cd $testroot/wt && got diff new alpha epsilon beta \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "diff failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo master > $testroot/wt/master
(cd $testroot/wt && got add master > /dev/null)
(cd $testroot/wt && got diff master new > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "diff failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "diff refs/heads/master refs/heads/new" > $testroot/stdout.expected
# diff between the branches is empty
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
# same without a work tree
(cd $testroot/repo && got diff master new > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "diff failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
fi
echo "diff refs/heads/master refs/heads/new" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
# same with -r argument
got diff -r $testroot/repo master new > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "diff failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
fi
echo "diff refs/heads/master refs/heads/new" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
# -P can be used to force use of paths
(cd $testroot/wt && got diff -P new master > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "diff failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo '@@ -0,0 +1 @@' >> $testroot/stdout.expected
echo '+new file' >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
# -P can only be used in a work tree
got diff -r $testroot/repo -P new master 2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "diff succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: -P option can only be used when diffing a work tree" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo '@@ -0,0 +1 @@' >> $testroot/stdout.expected
echo '+new file' >> $testroot/stdout.expected
(cd $testroot/wt && got diff new > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "diff failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
# diff with just one object ID argument results in
# interpretation of argument as a path
(cd $testroot/wt && got diff $head_rev 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "diff succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: $head_rev: No such file or directory" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
# interpretation of arguments as paths
(cd $testroot/wt && got diff new $head_rev master \
> $testroot/stout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "diff succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo '@@ -0,0 +1 @@' >> $testroot/stdout.expected
echo '+new file' >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "got: $head_rev: No such file or directory" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
return 1
fi
local base_commit=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got diff > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
got diff -r $testroot/repo $commit_id0 $tag1 > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
got diff -r $testroot/repo $tag1 $tag2 > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
got diff -r $testroot/repo $commit_id0 $tag1 > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
got diff -r $testroot/repo $tag1 $tag2 > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit_id0=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo 'file + alpha' >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
# Currently fails with "wrong type of object" error
got diff -r $testroot/repo $epsilon_id $submodule_id \
> $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "diff command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: wrong type of object" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
return 1
fi
local commit_id1=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo '\ No newline at end of file' >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
echo '\ No newline at end of file' >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local head_rev=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got diff > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -a -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got diff -a > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -a -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got diff -a > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -a -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
beta_id0=`get_blob_id $testroot/repo "" beta`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got diff -c master > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got diff -c $commit_id0 -c master \
> $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got diff -c $commit_id0 -c $commit_id1 \
> $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/repo && got diff -c $commit_id0 -c $commit_id1 alpha \
> $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got diff -c $commit_id0 -c $commit_id1 alpha \
> $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/repo && got diff -c $commit_id0 -c $commit_id1 \
beta new > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
# more than two -c options are not allowed
(cd $testroot/repo && got diff -c $commit_id0 -c $commit_id1 -c foo \
2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "diff succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
fi
echo "got: too many -c options used" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
# use of -c options implies a repository diff; use with -P is an error
(cd $testroot/wt && got diff -c $commit_id0 -c $commit_id1 -P foo \
2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "diff succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: -P option can only be used when diffing a work tree" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
# use of -c options implies a repository diff; use with -s is an error
(cd $testroot/wt && got diff -c $commit_id0 -c $commit_id1 -s foo \
2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "diff succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: -s option can only be used when diffing a work tree" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
# three arguments imply use of path filtering (repository case)
(cd $testroot/repo && got diff $commit_id0 $commit_id1 foo \
2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "diff succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: specified paths cannot be resolved: no got work tree found" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
# three arguments imply use of path filtering (work tree case)
(cd $testroot/wt && got diff $commit_id0 master foo \
2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "diff succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: $commit_id0: No such file or directory" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
got checkout $testroot/repo $testroot/wt > /dev/null
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
ret=$?
- if [ $ret != 0 ]; then
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
blob - 5b536e8cfc092fb0ac4d203d6360716d2f94ff5b
blob + a47da6f0af1aa406f84e1d46e3d290ad42d50012
--- regress/cmdline/fetch.sh
+++ regress/cmdline/fetch.sh
local commit_id=`git_show_head $testroot/repo`
got clone -q $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
local commit_id2=`git_show_head $testroot/repo`
got ref -l -r $testroot/repo-clone > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
got fetch -q -r $testroot/repo-clone > $testroot/stdout \
2> $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got fetch command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got log -l0 -p -r $testroot/repo > $testroot/log-repo
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got log command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
fi
got log -l0 -p -r $testroot/repo > $testroot/log-repo-clone
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got log command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/log-repo $testroot/log-repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "log -p output of cloned repository differs" >&2
test_done "$testroot" "$ret"
return 1
fi
got ref -l -r $testroot/repo > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/heads/master: $commit_id2" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got ref -l -r $testroot/repo-clone > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
got clone -q $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
(cd $testroot/repo-clone && got fetch -q -l \
> $testroot/stdout 2>$testroot/stderr)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got fetch command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
got ref -l -r $testroot/repo > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit_id=`git_show_head $testroot/repo`
got clone -q $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
local commit_id3=`git_show_head $testroot/repo`
got fetch -q -r $testroot/repo-clone -b foo > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got fetch command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got fetch -q -r $testroot/repo-clone -b master > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got fetch command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit_id=`git_show_head $testroot/repo`
got clone -q $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
# refs/hoo/boo/zoo is missing because it is outside of refs/heads
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got fetch -q -a -r $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got fetch command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
| grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
got clone -q $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got fetch -q -a -r $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got fetch command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
| grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
got clone -a -q $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
got branch -r $testroot/repo -d foo >/dev/null
got fetch -q -r $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got fetch command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got fetch -d -q -r $testroot/repo-clone > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got fetch command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
| grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
got clone -a -m -q $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
got branch -r $testroot/repo -d foo >/dev/null
got fetch -q -r $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got fetch command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got fetch -d -q -r $testroot/repo-clone > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got fetch command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
| grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
got clone -a -q $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got fetch -a -q -r $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got fetch command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
got fetch -r $testroot/repo-clone 2> $testroot/stderr | \
tail -n 1 > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got fetch command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got fetch -q -t -r $testroot/repo-clone > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got fetch command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id2" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit_id=`git_show_head $testroot/repo`
got clone -q $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
got fetch -q -r $testroot/repo-clone -R refs/remotes/origin/main \
> $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got fetch command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
> $testroot/stderr.expected
cmp -s $testroot/stderr $testroot/stderr.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
fi
got fetch -q -r $testroot/repo-clone -R refs/hoo
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got fetch command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit_id=`git_show_head $testroot/repo`
got clone -m -q $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/hoo/boo/zoo: refs/heads/master" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
got fetch -r $testroot/repo-clone -R refs/hoo \
2> $testroot/stderr | grep ^Replacing > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got fetch command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "refs/hoo/boo/zoo: $commit_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit_id=`git_show_head $testroot/repo`
got clone -q $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit_id=`git_show_head $testroot/repo`
got clone -q $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
got ref -r $testroot/repo-clone -d refs/remotes/origin/HEAD > /dev/null
got fetch -q -r $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got fetch command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
got tag -r $testroot/repo -c $commit_id -m tag "1.0" >/dev/null
got clone -q $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
> $testroot/stderr.expected
(cd $testroot/repo-clone && got fetch -q nonexistent \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got fetch command succeeded unexpectedly" >&2
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "1"
(cd $testroot/repo-clone && got fetch -q -l foobar \
> $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got fetch command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
got ref -l -r $testroot/repo > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
}
EOF
(cd $testroot/wt && got fetch -q -l barbaz > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got fetch command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
got ref -l -r $testroot/repo > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
got ref -l -r $testroot/repo-clone > $testroot/stdout
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit_id=`git_show_head $testroot/repo`
got clone -q $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
fi
got ref -l -r $testroot/repo-clone > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
got fetch -q -r $testroot/repo-clone -X > $testroot/stdout \
2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got fetch command succeeded unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "got: -X option requires a remote name" > $testroot/stderr.expected
cmp -s $testroot/stderr $testroot/stderr.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
got fetch -q -r $testroot/repo-clone -X origin > $testroot/stdout \
2> $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got fetch command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got ref -l -r $testroot/repo-clone > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
blob - c944b6d2017466ab5b2bd1f3d69c28fff83eb0b1
blob + b15d00ef680f545b9c19d914b7c9d87cf23b1c8f
--- regress/cmdline/histedit.sh
+++ regress/cmdline/histedit.sh
> $testroot/diff.expected
got checkout -c $orig_commit $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "modified alpha on master" > $testroot/content.expected
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "new file on master" > $testroot/content.expected
cat $testroot/wt/epsilon/new > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "commit $new_commit1" >> $testroot/stdout.expected
echo "commit $orig_commit" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
> $testroot/diff
sed -i -e "s/$old_commit2/$new_commit2/" $testroot/diff.expected
cmp -s $testroot/diff.expected $testroot/diff
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/diff.expected $testroot/diff
test_done "$testroot" "$ret"
return 1
echo 'Already up-to-date' > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "$old_commit2" >> $testroot/stdout.expected
echo -n > $testroot/stderr.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
(cd $testroot/repo && got histedit -l > $testroot/stdout)
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
> $testroot/diff.expected
got checkout -c $orig_commit $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "modified alpha on master" > $testroot/content.expected
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "new file on master" > $testroot/content.expected
cat $testroot/wt/epsilon/new > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "commit $new_commit2" >> $testroot/stdout.expected
echo "commit $orig_commit" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
> $testroot/diff
sed -i -e "s/$old_commit2/$new_commit1/" $testroot/diff.expected
cmp -s $testroot/diff.expected $testroot/diff
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/diff.expected $testroot/diff
fi
test_done "$testroot" "$ret"
> $testroot/diff.expected
got checkout -c $orig_commit $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "$f" > $testroot/content.expected
cat $testroot/wt/$f > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "commit $new_commit2 (master)" > $testroot/stdout.expected
echo "commit $orig_commit" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
sed -i -e "s/$old_commit1/$orig_commit/" $testroot/diff.expected
sed -i -e "s/$old_commit2/$new_commit2/" $testroot/diff.expected
cmp -s $testroot/diff.expected $testroot/diff
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/diff.expected $testroot/diff
fi
test_done "$testroot" "$ret"
local old_commit3=`git_show_head $testroot/repo`
got checkout -c $orig_commit $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "modified alpha on master" > $testroot/content.expected
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "new file on master" > $testroot/content.expected
cat $testroot/wt/epsilon/new > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "commit $new_commit2 (master)" > $testroot/stdout.expected
echo "commit $orig_commit" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local old_commit2=`git_show_head $testroot/repo`
got checkout -c $orig_commit $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Stopping histedit for amending commit $old_commit1" \
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got stage alpha > /dev/null)
(cd $testroot/wt && got histedit -c > $testroot/stdout \
2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "histedit succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "these changes must be committed or unstaged first" \
>> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "edited modified alpha on master" > $testroot/content.expected
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "new file on master" > $testroot/content.expected
cat $testroot/wt/epsilon/new > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "commit $new_commit1" >> $testroot/stdout.expected
echo "commit $orig_commit" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local old_commit2=`git_show_head $testroot/repo`
got checkout -c $orig_commit $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got histedit -F $testroot/histedit-script \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "histedit succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
local old_commit2=`git_show_head $testroot/repo`
got checkout -c $orig_commit $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got histedit -F $testroot/histedit-script \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "histedit succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
local old_commit2=`git_show_head $testroot/repo`
got checkout -c $orig_commit $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Stopping histedit for amending commit $old_commit1" \
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "$f" > $testroot/content.expected
cat $testroot/wt/$f > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "new file on master" > $testroot/content.expected
cat $testroot/wt/epsilon/new > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "? epsilon/new" > $testroot/stdout.expected
echo "? unversioned-file" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "commit $new_commit1" >> $testroot/stdout.expected
echo "commit $orig_commit" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
got checkout -c $orig_commit -p gamma $testroot/repo \
$testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got histedit -F $testroot/histedit-script \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "histedit succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
>> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
rm -rf $testroot/wt
got checkout -c $orig_commit -p epsilon $testroot/repo \
$testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "zeta" > $testroot/content.expected
cat $testroot/wt/zeta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got log -l3 | grep ^commit > $testroot/stdout)
echo "commit $orig_commit (master)" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
got checkout -c $orig_commit -p gamma $testroot/repo \
$testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got histedit -F $testroot/histedit-script \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "histedit succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
>> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
rm -rf $testroot/wt
got checkout -c $orig_commit -p epsilon $testroot/repo \
$testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Stopping histedit for amending commit $old_commit1" \
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "modified zeta" > $testroot/content.expected
cat $testroot/wt/zeta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "M zeta"> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "commit $new_commit1 (master)" > $testroot/stdout.expected
echo "commit $orig_commit" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
> $testroot/diff
sed -i -e "s/$old_commit1/$new_commit1/" $testroot/diff.expected
cmp -s $testroot/diff.expected $testroot/diff
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/diff.expected $testroot/diff
fi
test_done "$testroot" "$ret"
local commit1=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got checkout failed unexpectedly"
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got commit -m 'change alpha' \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got commit failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
local commit2=`git_show_head $testroot/repo`
got ref -r $testroot/repo -c master refs/remotes/origin/master
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got ref failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
fi
(cd $testroot/wt && got update -b origin/master -c $commit1 >/dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got update failed unexpectedly"
test_done "$testroot" "$ret"
return 1
echo '"refs/heads/" reference namespace' \
>> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
local old_commit2=`git_show_head $testroot/repo`
got checkout -c $orig_commit $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got histedit -F $testroot/histedit-script \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "histedit failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local short_old_commit2=`trim_obj_id 28 $old_commit2`
got checkout -c $orig_commit $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got histedit -F $testroot/histedit-script \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "histedit failed unexpectedly:" >&2
cat $testroot/stderr >&2
test_done "$testroot" "$ret"
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got ci -m "commitA" alpha >/dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "commit failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got ci -m "commitB" beta >/dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "commit failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got ci -m "commitC" epsilon/new >/dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "commit failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got histedit -c \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "histedit failed unexpectedly:" >&2
cat $testroot/stderr >&2
test_done "$testroot" "$ret"
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local old_commit2=`git_show_head $testroot/repo`
got checkout -c $orig_commit $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got histedit -F $testroot/histedit-script \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "histedit succeeded unexpectedly:" >&2
cat $testroot/stdout >&2
test_done "$testroot" "$ret"
echo "in histedit script" >> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
local old_commit3=`git_show_head $testroot/repo`
got checkout -c $orig_commit $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got log -l3 | grep ^commit > $testroot/stdout)
echo "commit $new_commit1 (master)" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
got tree -r $testroot/repo epsilon > $testroot/stdout
echo "zeta" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local old_commit3=`git_show_head $testroot/repo`
got checkout -c $orig_commit $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "modified alpha on master" > $testroot/content.expected
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "new file on master" > $testroot/content.expected
cat $testroot/wt/epsilon/new > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "commit $new_commit1 (master)" > $testroot/stdout.expected
echo "commit $orig_commit" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local old_commit3=`git_show_head $testroot/repo`
got checkout -c $orig_commit $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "modified alpha on master" > $testroot/content.expected
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "new file on master" > $testroot/content.expected
cat $testroot/wt/epsilon/new > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "commit $new_commit1 (master)" > $testroot/stdout.expected
echo "commit $orig_commit" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local old_commit2=`git_show_head $testroot/repo`
got checkout -c $orig_commit $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Stopping histedit for amending commit $old_commit1" \
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "Stopping histedit for amending commit $old_commit2" \
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "edited modified alpha on master" > $testroot/content.expected
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "new file on master" > $testroot/content.expected
cat $testroot/wt/epsilon/new > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "commit $new_commit1" >> $testroot/stdout.expected
echo "commit $orig_commit" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
(cd $testroot/wt/ && got commit -m 'modified alpha on master' \
alpha > /dev/null)
- ret="$?"
+ ret=$?
if [ "$?" != 0 ]; then
echo "got commit failed unexpectedly" >&2
test_done "$testroot" "$ret"
echo "pick $top_commit" > "$testroot/histedit-script"
(cd $testroot/wt/ && got update -c $orig_commit > /dev/null)
- ret="$?"
+ ret=$?
if [ "$?" != 0 ]; then
echo "got update failed unexpectedly" >&2
test_done "$testroot" "$ret"
(cd $testroot/wt && got histedit -F "$testroot/histedit-script" \
> /dev/null)
- ret="$?"
+ ret=$?
if [ "$?" != 0 ]; then
echo "got histedit failed unexpectedly" >&2
test_done "$testroot" "$ret"
cp $testroot/wt/alpha $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
blob - f90827299e298d8d6dcedf838627c59d16f80333
blob + 5fd35f7af5ce6affa60ec097e6dc2a85866e1596
--- regress/cmdline/import.sh
+++ regress/cmdline/import.sh
got import -m 'init' -r $testroot/repo $testroot/tree \
> $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "Now shut up and hack" >> $testroot/stdout.expected
got checkout $testroot/repo $testroot/wt > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
$testroot/wt/gamma/delta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
fi
test_done "$testroot" "$ret"
got import -b master -m 'init' -r $testroot/repo $testroot/tree \
> $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "import command should have failed but did not"
test_done "$testroot" "1"
return 1
echo "got: import target branch already exists" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
got import -b newbranch -m 'init' -r $testroot/repo $testroot/tree \
> $testroot/stdout
- ret="$?"
+ ret=$?
test_done "$testroot" "$ret"
}
got import -I alpha -I '*lta*' -I '*silon' \
-m 'init' -r $testroot/repo $testroot/tree > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
echo "alpha" > $testroot/tree/notempty/alpha
got import -m 'init' -r $testroot/repo $testroot/tree > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
got tree -r $testroot/repo -R > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
got import -m 'init' -r $testroot/repo $testroot/tree \
> $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "$id_alpha_link alpha.link@ -> alpha" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
blob - 603d7296146a6348c4964490d45c51c943f89e96
blob + 59f3d74f6c80fbf6c7182efae1d36295d9a4134f
--- regress/cmdline/integrate.sh
+++ regress/cmdline/integrate.sh
local master_commit=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got rebase newbranch > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got rebase failed unexpectedly"
test_done "$testroot" "$ret"
return 1
local new_commit2=`git_show_head $testroot/repo`
(cd $testroot/wt && got update -b master > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got update failed unexpectedly"
test_done "$testroot" "$ret"
return 1
echo "Integrated refs/heads/newbranch into refs/heads/master" \
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "modified delta on branch" > $testroot/content.expected
cat $testroot/wt/gamma/delta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "modified alpha on branch" > $testroot/content.expected
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "new file on branch" > $testroot/content.expected
cat $testroot/wt/epsilon/new > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "commit $new_commit1" >> $testroot/stdout.expected
echo "commit $master_commit" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got update > $testroot/stdout)
echo "Already up-to-date" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local new_commit2=`git_show_head $testroot/repo`
got checkout -b master $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got integrate newbranch \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got integrate succeeded unexpectedly"
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "got: specified branch must be rebased first" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo "commit $master_commit (master)" > $testroot/stdout.expected
echo "commit $init_commit" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "commit $new_commit1" >> $testroot/stdout.expected
echo "commit $init_commit" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/repo && got branch -l > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got rebase failed unexpectedly"
test_done "$testroot" "$ret"
return 1
echo " master: $master_commit" > $testroot/stdout.expected
echo " newbranch: $new_commit2" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local master_commit=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got rebase newbranch > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got rebase failed unexpectedly"
test_done "$testroot" "$ret"
return 1
rm -r $testroot/wt
got checkout -b master -p epsilon $testroot/repo $testroot/wt \
> /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got checkout failed unexpectedly"
test_done "$testroot" "$ret"
return 1
echo "Integrated refs/heads/newbranch into refs/heads/master" \
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local master_commit=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got rebase newbranch > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got rebase failed unexpectedly"
test_done "$testroot" "$ret"
return 1
# attempt to integrate master into newbranch (wrong way around)
(cd $testroot/wt && got update -b newbranch > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got update failed unexpectedly"
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got integrate master \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got integrate succeeded unexpectedly"
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "got: specified branch must be rebased first" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
local testroot=`test_init integrate_replace_symlink_with_file`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "checkout failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
echo "into refs/heads/master" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/alpha.link > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
fi
test_done "$testroot" "$ret"
local testroot=`test_init integrate_replace_file_with_symlink`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "checkout failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
echo "into refs/heads/master" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/alpha > $testroot/stdout
echo "beta" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
blob - fb11f286780b130bb30e7694ace57e52e5548050
blob + f13bd9029079658e7f658b35c11dc4ca7a6f70f7
--- regress/cmdline/log.sh
+++ regress/cmdline/log.sh
(cd $testroot/repo && got log $p | \
grep ^commit > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/repo/epsilon && got log $p | \
grep ^commit > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/repo/.git && got log $p | \
grep ^commit > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
local head_commit=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got log $p | \
grep ^commit > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt/epsilon && got log $p | \
grep ^commit > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt/epsilon && got log d/$p | \
grep ^commit > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
local delta_rev=`git_show_head $testroot/repo`
got checkout -p epsilon $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got log | grep ^commit > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got log $p | \
grep ^commit > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
local tag2="2.0.0"
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got log -l1 -c $tag | grep ^commit \
> $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got log -l1 -c $tag2 | grep ^commit \
> $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit_id0=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "commit $commit_id3 (master)" > $testroot/stdout.expected
(cd $testroot/wt && got log -l1 | grep ^commit > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && env GOT_LOG_DEFAULT_LIMIT=2 got log | \
grep ^commit > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "commit $commit_id1" >> $testroot/stdout.expected
echo "commit $commit_id0" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && env GOT_LOG_DEFAULT_LIMIT=1 got log -l0 | \
grep ^commit > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "0"
local commit_id0=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "commit $commit_id1 (master)" > $testroot/stdout.expected
# This used to fail with 'got: no such entry found in tree'
(cd $testroot/wt && got log -l1 -p new > $testroot/stdout.patch)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got log command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
fi
grep ^commit $testroot/stdout.patch > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
(cd $testroot/repo && got log this/does/not/exist \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "log command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "got: this/does/not/exist: no such entry found in tree" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
local commit_id0=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got log -x $commit_id3 | grep ^commit \
> $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got log -c $commit_id3 -x $commit_id1 | \
grep ^commit > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got log -x foo | grep ^commit \
> $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/repo && got log -c foo -x foo | grep ^commit \
> $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/repo && got log -x foo | grep ^commit \
> $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
# got will refuse -x with a non-existent commit
(cd $testroot/wt && got log -x nonexistent \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "log command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: reference nonexistent not found" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
local empty_sha1=da39a3ee5e6b4b0d3255bfef95601890afd80709
(cd $testroot/wt && got log -x $empty_sha1 \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "log command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: commit $empty_sha1: object not found" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
local commit_id0=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "commit $commit_id3 (master)" >> $testroot/stdout.expected
(cd $testroot/wt && got log -R | grep ^commit > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "commit $commit_id3 (master)" >> $testroot/stdout.expected
(cd $testroot/wt && got log -R -l2 | grep ^commit > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got log -R -c $commit_id3 -x $commit_id1 | \
grep ^commit > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got log -R -s 'commit[12]' | \
grep ^commit > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "commit $commit_id3 (master)" >> $testroot/stdout.expected
echo " A new" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
make_test_tree $testroot/tree
got import -mm -b foo -r $testroot/other-repo $testroot/tree >/dev/null
got checkout -b foo $testroot/other-repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got log -r $testroot/repo $p | \
grep ^commit > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt/epsilon && got log -r $testroot/repo $p | \
grep ^commit > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt/epsilon && got log -r $testroot/repo epsilon/d/$p | \
grep ^commit > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
local commit_id0=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo " A gamma/delta" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
got log -r $testroot/repo -l1 repo2 | grep ^commit > $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
got log -r $testroot/repo -l1 -P repo2 | grep '^ [MDmA]' \
> $testroot/stdout
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
got log -p -r $testroot/repo -l1 repo2 \
> $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "log command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: object $submodule_id not found" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
# log -P does not show the changed submodule path
got log -P -r $testroot/repo -l1 repo2 > $testroot/stdout.full
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "log command failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
blob - e56a0bd381bdbeb93ee755f1e1279e9598388578
blob + 0d03d0c83a725429e9a8d665b4e26dcbfe287e8c
--- regress/cmdline/merge.sh
+++ regress/cmdline/merge.sh
local branch_commit5=`git_show_branch_head $testroot/repo newbranch`
got checkout -b master $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got checkout failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
# need a divergant commit on the main branch for 'got merge'
(cd $testroot/wt && got merge newbranch \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got merge succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
>> $testroot/stderr.expected
echo "'got integrate' instead" >> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
# need an up-to-date work tree for 'got merge'
(cd $testroot/wt && got merge newbranch \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got merge succeeded unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
> $testroot/stderr.expected
echo "to merge a branch" >> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got update failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
# must not use a mixed-commit work tree with 'got merge'
(cd $testroot/wt && got update -c $commit0 alpha > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got update failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got merge newbranch \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got merge succeeded unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "the entire work tree must be updated first" \
>> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got update failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
# must not have staged files with 'got merge'
echo "modified file alpha" > $testroot/wt/alpha
(cd $testroot/wt && got stage alpha > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got stage failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got merge newbranch \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got merge succeeded unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
fi
echo "got: alpha: file is staged" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got unstage alpha > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got unstage failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
# must not have local changes with 'got merge'
(cd $testroot/wt && got merge newbranch \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got merge succeeded unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "these changes must be committed or reverted first" \
>> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got revert alpha > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got revert failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got merge newbranch > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got merge failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo $merge_commit >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "modified delta on branch" > $testroot/content.expected
cat $testroot/wt/gamma/delta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "modified alpha on branch" > $testroot/content.expected
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "new file on branch" > $testroot/content.expected
cat $testroot/wt/epsilon/new > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/symlink > $testroot/stdout
echo "alpha" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "commit $master_commit" >> $testroot/stdout.expected
echo "commit $commit0" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
git_show_head $testroot/repo >> $testroot/stdout.expected
echo >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "parent 1: $master_commit" > $testroot/stdout.expected
echo "parent 2: $branch_commit5" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got tree -r $testroot/repo -c $merge_commit -R > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got tree failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
symlink@ -> alpha
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local branch_commit3=`git_show_branch_head $testroot/repo newbranch`
got checkout -b master $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got checkout failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
# need an up-to-date work tree for 'got merge'
(cd $testroot/wt && got update > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got update failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got merge newbranch \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got merge succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "G gamma/delta" >> $testroot/stdout.expected
echo "Files with new merge conflicts: 1" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "got: conflicts must be resolved before merging can continue" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo "A epsilon/new" >> $testroot/stdout.expected
echo "M gamma/delta" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
>> $testroot/content.expected
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "modified alpha by both branches" > $testroot/wt/alpha
(cd $testroot/wt && got merge -c > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got merge failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo $merge_commit >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "modified delta on branch" > $testroot/content.expected
cat $testroot/wt/gamma/delta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "modified alpha by both branches" > $testroot/content.expected
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "new file on branch" > $testroot/content.expected
cat $testroot/wt/epsilon/new > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "commit $master_commit" >> $testroot/stdout.expected
echo "commit $commit0" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo 'Already up-to-date' > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "parent 1: $master_commit" > $testroot/stdout.expected
echo "parent 2: $branch_commit3" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local branch_commit4=`git_show_branch_head $testroot/repo newbranch`
got checkout -b master $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got checkout failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
# need an up-to-date work tree for 'got merge'
(cd $testroot/wt && got update > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got update failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got merge newbranch \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got merge succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "A symlink" >> $testroot/stdout.expected
echo "Files with new merge conflicts: 1" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "got: conflicts must be resolved before merging can continue" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo "A symlink" >> $testroot/stdout.expected
echo "? unversioned-file" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got merge -a > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got merge failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "delta" > $testroot/content.expected
cat $testroot/wt/gamma/delta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "modified alpha on master" > $testroot/content.expected
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "beta" > $testroot/content.expected
cat $testroot/wt/beta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "? unversioned-file" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "commit $master_commit (master)" > $testroot/stdout.expected
echo "commit $commit0" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo 'Already up-to-date' > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local branch_commit0=`git_show_branch_head $testroot/repo newbranch`
got checkout -b master $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got checkout failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
# need an up-to-date work tree for 'got merge'
(cd $testroot/wt && got update > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got update failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got merge newbranch \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got merge succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "C alpha" >> $testroot/stdout.expected
echo "Files with new merge conflicts: 1" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "got: conflicts must be resolved before merging can continue" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo "C alpha" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "work tree and must be continued or aborted first" \
>> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
got checkout -p epsilon -b master $testroot/repo $testroot/wt \
> /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got checkout failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
# need an up-to-date work tree for 'got merge'
(cd $testroot/wt && got update > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got update failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got merge newbranch \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got merge succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
> $testroot/stderr.expected
echo "of this work tree's path prefix" >> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
local branch_commit0=`git_show_branch_head $testroot/repo newbranch`
got checkout -b master $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got checkout failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
# need an up-to-date work tree for 'got merge'
(cd $testroot/wt && got update > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got update failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got merge newbranch \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got merge succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
>> $testroot/stdout.expected
echo "in the work tree: 1" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "required before the merge operation is continued" \
>> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo "M gamma/delta" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
local branch_commitk=`git_show_branch_head $testroot/repo newbranch`
got checkout -b master $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got checkout failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
# need an up-to-date work tree for 'got merge'
(cd $testroot/wt && got update > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got update failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got merge newbranch \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got merge succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "C alpha" >> $testroot/stdout.expected
echo "Files with new merge conflicts: 1" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "got: conflicts must be resolved before merging can continue" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo "C alpha" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
# resolve the conflict by reverting all changes; now it is no-op merge
(cd $testroot/wt && got revert alpha > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got revert failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got merge -c > $testroot/stdout \
2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got merge succeeded unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
> $testroot/stderr.expected
echo "no changes to commit" >> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo -n "" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
$testroot/tree > /dev/null
got checkout -b master $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got checkout failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got merge files > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got merge failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
Merged refs/heads/files into refs/heads/master: $merge_commit0
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
# try to merge again while no new changes are available
(cd $testroot/wt && got merge files > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got merge failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
fi
echo "Already up-to-date" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
git_commit $testroot/repo -m "lots of changes"
(cd $testroot/wt && got update > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got update failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
# we should now be able to merge more changes from files branch
(cd $testroot/wt && got merge files > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got merge failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local branch_commit0=`git_show_branch_head $testroot/repo newbranch`
got checkout -b master $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got checkout failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
# need an up-to-date work tree for 'got merge'
(cd $testroot/wt && got update > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got update failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got merge -n newbranch \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got merge failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "Merge of refs/heads/newbranch interrupted on request" \
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "M alpha" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "modified alpha on branch" > $testroot/content.expected
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
# continue the merge
(cd $testroot/wt && got merge -c > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got merge failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo $merge_commit >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "commit $master_commit" >> $testroot/stdout.expected
echo "commit $commit0" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo 'Already up-to-date' > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "parent 1: $master_commit" > $testroot/stdout.expected
echo "parent 2: $branch_commit0" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
blob - 2ac3207e191fd1b940a418ffd18b2c0b82a89dff
blob + 3f911d52d624e56029f65b90ea0a9203bbf8def6
--- regress/cmdline/pack.sh
+++ regress/cmdline/pack.sh
# no pack files should exist yet
ls $testroot/repo/.git/objects/pack/ > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
gotadmin pack -r $testroot/repo > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "gotadmin pack failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
ret=1
break
done
- if [ "$ret" = "1" ]; then
+ if [ $ret -eq 1 ]; then
break
fi
done
# no pack files should exist yet
ls $testroot/repo/.git/objects/pack/ > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got branch -r $testroot/repo mybranch
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
got checkout -b mybranch $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got commit -m "edit alpha" >/dev/null)
gotadmin pack -r $testroot/repo -x master > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "gotadmin pack failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "found excluded object $id in pack file" >&2
ret=1
fi
- if [ "$ret" = "1" ]; then
+ if [ $ret -eq 1 ]; then
break
fi
done
- if [ "$ret" = "1" ]; then
+ if [ $ret -eq 1 ]; then
test_done "$testroot" "$ret"
return 1
fi
ret=1
break
done
- if [ "$ret" = "1" ]; then
+ if [ $ret -eq 1 ]; then
break
fi
done
# no pack files should exist yet
ls $testroot/repo/.git/objects/pack/ > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got branch -r $testroot/repo mybranch
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
got checkout -b mybranch $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
local commit1=`git_show_branch_head $testroot/repo mybranch`
gotadmin pack -r $testroot/repo master > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "gotadmin pack failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "found excluded object $id in pack file" >&2
ret=1
fi
- if [ "$ret" = "1" ]; then
+ if [ $ret -eq 1 ]; then
break
fi
done
- if [ "$ret" = "1" ]; then
+ if [ $ret -eq 1 ]; then
test_done "$testroot" "$ret"
return 1
fi
# no pack files should exist yet
ls $testroot/repo/.git/objects/pack/ > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got branch -r $testroot/repo mybranch
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
got checkout -b mybranch $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
gotadmin pack -r $testroot/repo -x master master \
> /dev/null 2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "gotadmin pack succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "gotadmin: not enough objects to pack" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
# no pack files should exist yet
ls $testroot/repo/.git/objects/pack/ > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got branch -r $testroot/repo mybranch
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
got checkout -b mybranch $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
# should then be excluded while packing 'mybranch' since they
# are already packed
gotadmin pack -r $testroot/repo master > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "gotadmin pack failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
fi
gotadmin pack -r $testroot/repo mybranch > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "gotadmin pack failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "found excluded object $id in pack file" >&2
ret=1
fi
- if [ "$ret" = "1" ]; then
+ if [ $ret -eq 1 ]; then
break
fi
done
- if [ "$ret" = "1" ]; then
+ if [ $ret -eq 1 ]; then
test_done "$testroot" "$ret"
return 1
fi
ret=1
break
done
- if [ "$ret" = "1" ]; then
+ if [ $ret -eq 1 ]; then
break
fi
done
# no pack files should exist yet
ls $testroot/repo/.git/objects/pack/ > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got branch -r $testroot/repo mybranch
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
got checkout -b mybranch $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
# pack objects belonging to the 'master' branch
gotadmin pack -r $testroot/repo master > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "gotadmin pack failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
# pack mybranch, including already packed objects on the
# 'master' branch which are reachable from mybranch
gotadmin pack -r $testroot/repo -a mybranch > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "gotadmin pack failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
ret=1
break
done
- if [ "$ret" = "1" ]; then
+ if [ $ret -eq 1 ]; then
break
fi
done
# no pack files should exist yet
ls $testroot/repo/.git/objects/pack/ > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got branch -r $testroot/repo mybranch
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
got checkout -b mybranch $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
gotadmin pack -r $testroot/repo refs/got/worktree/ \
> $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "gotadmin pack succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "gotadmin: not enough objects to pack" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
blob - c629d068ddf4ae78f0a2184ea064823c4c1926de
blob + 5e74b959165a7294b2db81a0c1423f2573dd875f
--- regress/cmdline/rebase.sh
+++ regress/cmdline/rebase.sh
local master_commit=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "modified delta on branch" > $testroot/content.expected
cat $testroot/wt/gamma/delta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "modified alpha on branch" > $testroot/content.expected
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "new file on branch" > $testroot/content.expected
cat $testroot/wt/epsilon/new > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "commit $new_commit1" >> $testroot/stdout.expected
echo "commit $master_commit (master)" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo 'Already up-to-date' > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
$d_0 $GOT_AUTHOR_11 adding the test tree
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "got: refs/got/backup/rebase/master/: no such reference found" \
> $testroot/stderr.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo "$orig_commit2" >> $testroot/stdout.expected
echo -n > $testroot/stderr.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
(cd $testroot/repo && got rebase -l > $testroot/stdout)
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init rebase_ancestry_check`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Updated to refs/heads/newbranch: ${newbranch_id}" \
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
local master_commit=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
>> $testroot/stdout.expected
echo ": committing to alpha on newbranch" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "got: conflicts must be resolved before rebasing can continue" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
>> $testroot/content.expected
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "C alpha" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got stage alpha > /dev/null)
(cd $testroot/wt && got rebase -c > $testroot/stdout \
2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "rebase succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "these changes must be committed or unstaged first" \
>> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "commit $new_commit1 (newbranch)" > $testroot/stdout.expected
echo "commit $master_commit (master)" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local master_commit=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
>> $testroot/stdout.expected
echo ": committing to alpha on newbranch" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "got: conflicts must be resolved before rebasing can continue" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
>> $testroot/content.expected
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "C alpha" > $testroot/stdout.expected
echo "? unversioned-file" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "modified alpha on master" > $testroot/content.expected
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "commit $orig_commit1 (newbranch)" > $testroot/stdout.expected
echo "commit $init_commit" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local master_commit=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
>> $testroot/stdout.expected
echo ": committing to alpha on newbranch" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "got: conflicts must be resolved before rebasing can continue" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
>> $testroot/content.expected
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "C alpha" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
> $testroot/stdout.expected
echo "commit $init_commit" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local master_commit=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
>> $testroot/stdout.expected
echo ": committing to alpha on newbranch" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "got: conflicts must be resolved before rebasing can continue" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
>> $testroot/content.expected
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "C alpha" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "work tree and must be continued or aborted first" \
>> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
local master_commit=`git_show_head $testroot/repo`
got checkout -p epsilon $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
> $testroot/stderr.expected
echo "of this work tree's path prefix" >> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
local master_commit=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo -n > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
sed -i -e "s/$orig_commit1/$new_commit1/" $testroot/log.expected
sed -i -e "s/$orig_commit2/$new_commit2/" $testroot/log.expected
cmp -s $testroot/log.expected $testroot/log
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/log.expected $testroot/log
fi
local testroot=`test_init rebase_no_commits_to_rebase`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "got: no commits to rebase" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo "Rebase of refs/heads/newbranch aborted" \
> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got update > $testroot/stdout)
echo "Already up-to-date" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit0=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Switching work tree to refs/heads/master" \
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
> $testroot/stdout 2> $testroot/stderr)
echo -n "" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
echo "got: rebase operation not in progress" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got branch -n > $testroot/stdout)
echo "master" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "commit $commit1" >> $testroot/stdout.expected
echo "commit $commit0" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/repo && got rebase -l > $testroot/stdout)
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
got checkout -c $master_commit1 $testroot/repo $testroot/wt \
> /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
> $testroot/stderr.expected
echo "used to rebase a branch" >> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo "commit $master_commit1" >> $testroot/stdout.expected
echo "commit $initial_commit" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local master_commit=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "modified delta on branch" > $testroot/content.expected
cat $testroot/wt/gamma/delta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "modified alpha on master" > $testroot/content.expected
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "commit $new_commit1" >> $testroot/stdout.expected
echo "commit $master_commit (master)" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
(cd $testroot/wt && got update -b master > /dev/null)
(cd $testroot/wt && got rebase newbranch > $testroot/stdout \
2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "rebase succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
>> $testroot/stdout.expected
echo "in the work tree: 2" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
>> $testroot/stderr.expected
echo "rebase operation is continued" >> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
# ignore the missing changes and continue
(cd $testroot/wt && got rebase -c > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "rebase failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "modified delta on branch" > $testroot/content.expected
cat $testroot/wt/gamma/delta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "commit $master_commit (master)" >> $testroot/stdout.expected
echo "commit $commit0" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local master_commit=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
# this would error out with 'got: file index is corrupt'
(cd $testroot/wt && got status > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got status command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got status > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got status command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "commit $new_commit1" >> $testroot/stdout.expected
echo "commit $master_commit (master)" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
blob - 10a8438410f2c35df7e8078209395627a43d2cb8
blob + 85881196beb482de5fdcb7e3c4ec5112a287758c
--- regress/cmdline/ref.sh
+++ regress/cmdline/ref.sh
# Create a ref pointing at a commit ID
got ref -r $testroot/repo -c $commit_id refs/heads/commitref
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
# Create a ref based on repository's HEAD reference
got ref -r $testroot/repo -c HEAD refs/heads/newref
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
# Ensure that Git recognizes the ref Got has created
(cd $testroot/repo && git checkout -q newref)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "git checkout command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
# Ensure Got recognizes the new ref
got checkout -b newref $testroot/repo $testroot/wt >/dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got checkout command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
# Create a head ref based on another specific ref
(cd $testroot/wt && got ref -c refs/heads/master refs/heads/anotherref)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/repo && git checkout -q anotherref)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "git checkout command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
# Create a symbolic ref
(cd $testroot/wt && got ref -s refs/heads/master refs/heads/symbolicref)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/repo && git checkout -q symbolicref)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "git checkout command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
# Attempt to create a symbolic ref pointing at a non-reference
(cd $testroot/wt && got ref -s $commit_id refs/heads/symbolicref \
2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got ref command succeeded unexpectedly"
test_done "$testroot" "1"
return 1
echo "got: reference $commit_id not found" > $testroot/stderr.expected
cmp -s $testroot/stderr $testroot/stderr.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
# Attempt to create a reference without specifying a name
(cd $testroot/wt && got ref -c $commit_id 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got ref command succeeded unexpectedly"
test_done "$testroot" "1"
return 1
fi
grep -q '^usage: got ref' $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "unexpected usage error message: " >&2
cat $testroot/stderr >&2
test_done "$testroot" "$ret"
# Attempt to create a symbolic reference without specifying a name
(cd $testroot/wt && got ref -s refs/heads/symbolicref \
2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got ref command succeeded unexpectedly"
test_done "$testroot" "1"
return 1
fi
grep -q '^usage: got ref' $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "unexpected usage error message: " >&2
cat $testroot/stderr >&2
test_done "$testroot" "$ret"
# Change HEAD
got ref -r $testroot/repo -s refs/heads/newref HEAD
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
# Ensure that Git recognizes the ref Got has created
(cd $testroot/repo && git checkout -q HEAD)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "git checkout command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
# Ensure Got recognizes the new ref
(cd $testroot/wt && got update -b HEAD >/dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got update command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
echo "refs/heads/symbolicref: refs/heads/master" \
>> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
for b in ref1 ref2 ref3; do
got ref -r $testroot/repo -c refs/heads/master refs/heads/$b
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
done
got ref -d -r $testroot/repo refs/heads/ref2 > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
fi
echo "Deleted refs/heads/ref2: $commit_id" > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "refs/heads/ref1: $commit_id" >> $testroot/stdout.expected
echo "refs/heads/ref3: $commit_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
got ref -r $testroot/repo -d refs/heads/bogus_ref_name \
> $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got ref succeeded unexpectedly"
test_done "$testroot" "$ret"
return 1
echo "got: reference refs/heads/bogus_ref_name not found" \
> $testroot/stderr.expected
cmp -s $testroot/stderr $testroot/stderr.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo "refs/heads/ref1: $commit_id" >> $testroot/stdout.expected
echo "refs/heads/ref3: $commit_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "refs/heads/ref1: $commit_id" >> $testroot/stdout.expected
echo "refs/heads/ref3: $commit_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
# Create a tag pointing at a commit ID
got tag -r $testroot/repo -c $commit_id -m "1.0" "1.0" >/dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got tag command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
# Create a ref based on repository's HEAD reference
got ref -r $testroot/repo -c HEAD refs/foo/zoo
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
# Create a head ref based on another specific ref
(cd $testroot/repo && got ref -c refs/heads/master refs/foo/bar/baz)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
# Create a HEAD ref in the namespace of a remote repository
(cd $testroot/repo && got ref -s refs/heads/master \
refs/remotes/origin/HEAD)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
>> $testroot/stdout.expected
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "refs/foo/bar/baz: $commit_id" > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "refs/foo/bar/baz: $commit_id" > $testroot/stdout.expected
echo "refs/foo/zoo: $commit_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "got: $r: bad reference name" > $testroot/stderr.expected
cmp -s $testroot/stderr $testroot/stderr.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
blob - 608abc82cbefff93d4d24717552a9b9a1f703761
blob + 53e50a517d427f5e9cae1a7f8809b8098360d3a8
--- regress/cmdline/revert.sh
+++ regress/cmdline/revert.sh
local testroot=`test_init revert_basic`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got revert epsilon/zeta > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/epsilon/zeta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
fi
test_done "$testroot" "$ret"
local testroot=`test_init revert_rm`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got revert beta > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/beta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
fi
test_done "$testroot" "$ret"
local testroot=`test_init revert_add`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got revert new > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/new > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init revert_multiple`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got revert alpha epsilon/zeta > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/epsilon/zeta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
fi
test_done "$testroot" "$ret"
local testroot=`test_init revert_file_in_new_subdir`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "R newdir/new" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "? newdir/new" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init revert_no_arguments`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "modified epsilon/zeta" > $testroot/wt/epsilon/zeta
(cd $testroot/wt && got revert > $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "revert command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "usage: got revert [-p] [-F response-script] [-R] path ..." \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
local testroot=`test_init revert_directory`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "modified epsilon/zeta" > $testroot/wt/epsilon/zeta
(cd $testroot/wt && got revert . > $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got revert command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: reverting directories requires -R option" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo 'R epsilon/zeta' > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/epsilon/zeta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
fi
test_done "$testroot" "$ret"
local testroot=`test_init revert_directory_unknown`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo 'R alpha' > $testroot/stdout.expected
echo 'R epsilon/zeta' >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/epsilon/new_file > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/epsilon/zeta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
fi
local commit_id=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
printf "n\nn\nn\n" > $testroot/patchscript
(cd $testroot/wt && got revert -F $testroot/patchscript -p \
numbers > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got revert command failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
revert this change? [y/n/q] n
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo "M numbers" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got diff > $testroot/stdout)
cmp -s $testroot/numbers.diff $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/numbers.diff $testroot/stdout
test_done "$testroot" "$ret"
return 1
printf "y\nn\nn\n" > $testroot/patchscript
(cd $testroot/wt && got revert -F $testroot/patchscript -p \
numbers > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got revert command failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
revert this change? [y/n/q] n
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo "M numbers" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
EOF
(cd $testroot/wt && got diff > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
revert this change? [y/n/q] n
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo "M numbers" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
+c
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
revert this change? [y/n/q] y
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
5
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit_id=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "A epsilon/new" > $testroot/stdout.expected
echo "revert this addition? [y/n] n" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo "A epsilon/new" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "revert this addition? [y/n] y" >> $testroot/stdout.expected
echo "R epsilon/new" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo "? epsilon/new" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit_id=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "D beta" > $testroot/stdout.expected
echo "revert this deletion? [y/n] n" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo "D beta" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "revert this deletion? [y/n] y" >> $testroot/stdout.expected
echo "R beta" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit_id=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
printf "y\n" > $testroot/patchscript
(cd $testroot/wt && got revert -F $testroot/patchscript -p \
numbers > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got revert command failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
M numbers (change 1 of 1)
revert this change? [y/n/q] y
EOF
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got revert command failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got diff > $testroot/stdout)
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init revert_added_subtree`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got revert -R . > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init revert_deleted_subtree`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got revert -R . > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
R zeta.link
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/alpha.link > $testroot/stdout
echo "alpha" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/epsilon.link > $testroot/stdout
echo "epsilon" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cp $testroot/wt/passwd.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/epsilon/beta.link > $testroot/stdout
echo "../beta" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/nonexistent.link > $testroot/stdout
echo "nonexistent" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/dotgotfoo.link > $testroot/stdout
echo ".got/foo" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/zeta.link > $testroot/stdout
echo "epsilon/zeta" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "? dotgotfoo.link" > $testroot/stdout.expected
echo "? new.link" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
return 1
fi
printf "y\nn\ny\nn\ny\ny\nn\ny\ny\n" > $testroot/patchscript
(cd $testroot/wt && got revert -F $testroot/patchscript -p -R . \
> $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got revert command failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
R zeta3.link
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/alpha.link > $testroot/stdout
echo "alpha" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/epsilon.link > $testroot/stdout
echo "epsilon" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cp $testroot/wt/passwd.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/epsilon/beta.link > $testroot/stdout
echo "../gamma" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/nonexistent.link > $testroot/stdout
echo "nonexistent" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/dotgotfoo.link > $testroot/stdout
echo ".got/foo" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/zeta2.link > $testroot/stdout
echo "epsilon/zeta" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/zeta3.link > $testroot/stdout
echo "beta" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "D zeta.link" >> $testroot/stdout.expected
echo "? zeta3.link" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
return 1
fi
blob - f82d2c0f4b893ae2e6c20f40ea0f892622559bec
blob + b48ce4011c7e953f442dffb07e92ceeb2fc2a62b
--- regress/cmdline/rm.sh
+++ regress/cmdline/rm.sh
local testroot=`test_init rm_basic`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got rm alpha beta > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
local testroot=`test_init rm_with_local_mods`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got rm beta 2>$testroot/stderr)
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got rm -f beta > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
local testroot=`test_init double_rm`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo -n > $testroot/stderr.expected
(cd $testroot/wt && got rm $fflag beta > $testroot/stdout \
2> $testroot/stderr)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got rm command failed unexpectedly" >&2
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
fi
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
local testroot=`test_init rm_and_add_elsewhere`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo '! alpha' > $testroot/stdout.expected
echo '? epsilon/alpha' >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got rm alpha > $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" == "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got rm command succeeded unexpectedly" >&2
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "1"
echo -n '' > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "got: alpha: No such file or directory" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got rm -f alpha > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got rm command failed unexpectedly" >&2
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
echo 'D alpha' > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
# While here, test behaviour of rm on files in unversioned status.
(cd $testroot/wt && got rm epsilon/alpha > $testroot/stdout \
2> $testroot/stderr)
- ret="$?"
- if [ "$ret" == "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got rm command succeeded unexpectedly" >&2
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "1"
echo -n '' > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "got: epsilon/alpha: file has unexpected status" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
# And test the same case with -f.
(cd $testroot/wt && got rm -f epsilon/alpha > $testroot/stdout \
2> $testroot/stderr)
- ret="$?"
- if [ "$ret" == "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got rm command succeeded unexpectedly" >&2
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "1"
echo -n '' > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "got: epsilon/alpha: file has unexpected status" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got add epsilon/alpha > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo 'D alpha' > $testroot/stdout.expected
echo 'A epsilon/alpha' >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init rm_directory`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got rm . > $testroot/stdout 2> $testroot/stderr)
- ret="$?"
+ ret=$?
echo "got: removing directories requires -R option" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo 'D gamma/delta' >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo -n '' > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo -n '' > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
local testroot=`test_init rm_directory_keep_files`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got rm . > $testroot/stdout 2> $testroot/stderr)
- ret="$?"
+ ret=$?
echo "got: removing directories requires -R option" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo 'D gamma/delta' >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo 'D gamma/delta' >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo '? gamma/delta' >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
local testroot=`test_init rm_subtree`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
git_commit $testroot/repo -m "add symlinks"
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
epsilon/beta.link nonexistent.link > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init rm_status_code`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got rm -s Mx beta 2>$testroot/stderr)
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got rm -R -s '!' . >$testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
(cd $testroot/wt && got rm -R -s 'M!' . >$testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "1"
return 1
echo 'D epsilon/zeta' >> $testroot/stdout.expected
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "1"
return 1
local testroot=`test_init rm_nonexistent_directory`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got rm epsilon > $testroot/stdout \
2> $testroot/stderr)
- ret="$?"
- if [ "$ret" == "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got rm command succeeded unexpectedly" >&2
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "1"
echo -n '' > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "got: epsilon: No such file or directory" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got rm -f epsilon > $testroot/stdout \
2> $testroot/stderr)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got rm command failed unexpectedly" >&2
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
echo -n '' > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo -n '' > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
blob - 3eb8e7e29c0385103d644e4f76b51d8f5f478922
blob + f96b6f089a1474bc624180cf278501ffb7f16af7
--- regress/cmdline/send.sh
+++ regress/cmdline/send.sh
local commit_id=`git_show_head $testroot/repo`
got clone -q $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
local commit_id2=`git_show_head $testroot/repo`
got send -q -r $testroot/repo > $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got send command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got ref -l -r $testroot/repo > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got ref -l -r $testroot/repo-clone > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
got tree -r $testroot/repo -c $commit_id2 -i -R \
> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got send -r $testroot/repo > $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got send command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo 'Connecting to "origin" 127.0.0.1' > $testroot/stdout.expected
echo "Already up-to-date" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
git_fsck "$testroot" "$testroot/repo-clone"
- ret="$?"
+ ret=$?
test_done "$testroot" "$ret"
}
local commit_id=`git_show_head $testroot/repo`
got clone -q $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt-clone && got commit -m 'change alpha' >/dev/null)
got send -q -r $testroot/repo > $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got send command succeeded unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "got: refs/heads/master: fetch and rebase required" \
> $testroot/stderr.expected
cmp -s $testroot/stderr $testroot/stderr.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
fi
git_fsck "$testroot" "$testroot/repo-clone"
- ret="$?"
+ ret=$?
test_done "$testroot" "$ret"
}
local commit_id=`git_show_head $testroot/repo`
got clone -q $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
# non-default remote requires an explicit argument
got send -q -r $testroot/repo -f > $testroot/stdout \
2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got send command succeeded unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "got: origin: remote repository not found" \
> $testroot/stderr.expected
cmp -s $testroot/stderr $testroot/stderr.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
got send -q -r $testroot/repo -f foobar > $testroot/stdout \
2> $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got send command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got ref -l -r $testroot/repo > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got ref -l -r $testroot/repo-clone > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
git_fsck "$testroot" "$testroot/repo-clone"
- ret="$?"
+ ret=$?
test_done "$testroot" "$ret"
}
got branch -r $testroot/repo branch1
got clone -a -q $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
got branch -r $testroot/repo-clone branch2
got ref -l -r $testroot/repo-clone > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
# time is not allowed.
got send -q -r $testroot/repo -d branch1 -b branch1 \
> $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got send command succeeded unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
> $testroot/stderr.expected
echo ": reference cannot be deleted" >> $testroot/stderr.expected
cmp -s $testroot/stderr $testroot/stderr.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
got send -q -r $testroot/repo -d refs/heads/branch1 origin \
> $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got send command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
got send -r $testroot/repo -d refs/heads/branch2 origin \
> $testroot/stdout 2>$testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got send command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
# branchX exists in neither repository
got send -q -r $testroot/repo -d refs/heads/branchX origin \
> $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got send command succeeded unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "repository: no such reference found" >> $testroot/stderr.expected
echo "got: no such reference found" >> $testroot/stderr.expected
cmp -s $testroot/stderr $testroot/stderr.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
# References outside of refs/heads/ cannot be deleted with 'got send'.
got send -q -r $testroot/repo -d refs/tags/1.0 origin \
> $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got send command succeeded unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
>> $testroot/stderr.expected
echo "got: no such reference found" >> $testroot/stderr.expected
cmp -s $testroot/stderr $testroot/stderr.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
fi
got ref -l -r $testroot/repo > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got ref -l -r $testroot/repo-clone > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
git_fsck "$testroot" "$testroot/repo-clone"
- ret="$?"
+ ret=$?
test_done "$testroot" "$ret"
}
(cd $testroot/repo && git config receive.denyCurrentBranch ignore)
got clone -q $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
local commit_id2=`git_show_head $testroot/repo-clone`
(cd $testroot/wt && got send -q > $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got send command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got ref -l -r $testroot/repo > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/heads/master: $commit_id2" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got ref -l -r $testroot/repo-clone > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
git_fsck "$testroot" "$testroot/repo-clone"
- ret="$?"
+ ret=$?
test_done "$testroot" "$ret"
}
local commit_id=`git_show_head $testroot/repo`
got clone -q $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
| tr -d ' ' | cut -d: -f2`
got send -q -r $testroot/repo -T > $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got send command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got ref -l -r $testroot/repo > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/tags/2.0: $tag_id2" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got ref -l -r $testroot/repo-clone > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/tags/2.0: $tag_id2" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "tag 1.0 $tag_id" > $testroot/stdout.expected
echo "tag 2.0 $tag_id2" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
# Send the same tags again. This should be a no-op.
got send -q -r $testroot/repo -T > $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got send command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
got send -q -r $testroot/repo -t 1.0 > $testroot/stdout \
2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got send command succeeded unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "got: refs/tags/1.0: tag already exists on server" \
> $testroot/stderr.expected
cmp -s $testroot/stderr $testroot/stderr.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
# attempting the same with -T should fail, too
got send -q -r $testroot/repo -T > $testroot/stdout \
2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got send command succeeded unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "got: refs/tags/1.0: tag already exists on server" \
> $testroot/stderr.expected
cmp -s $testroot/stderr $testroot/stderr.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo "tag 1.0 $tag_id" > $testroot/stdout.expected
echo "tag 2.0 $tag_id2" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
# overwrite the 1.0 tag only
got send -q -r $testroot/repo -t 1.0 -f > $testroot/stdout \
2> $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got send command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "tag 1.0 $tag_id3" > $testroot/stdout.expected
echo "tag 2.0 $tag_id2" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
# Send the new commit in isolation.
got send -q -r $testroot/repo > $testroot/stdout \
2> $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got send command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
got send -r $testroot/repo -t 3.0 > $testroot/stdout.raw \
2> $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got send command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
fi
git_fsck "$testroot" "$testroot/repo-clone"
- ret="$?"
+ ret=$?
test_done "$testroot" "$ret"
}
local commit_id=`git_show_head $testroot/repo`
got clone -q $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
local commit_id3=`git_show_head $testroot/repo`
got send -q -r $testroot/repo -T > $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got send command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got ref -l -r $testroot/repo > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got ref -l -r $testroot/repo-clone > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "tag 1.0 $tag_id" > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
git_fsck "$testroot" "$testroot/repo-clone"
- ret="$?"
+ ret=$?
test_done "$testroot" "$ret"
}
(cd $testroot/repo && git config receive.denyCurrentBranch ignore)
got clone -q $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
local commit_id2=`git_show_branch_head $testroot/repo-clone foo`
(cd $testroot/wt && got send -q > $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got send command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got ref -l -r $testroot/repo > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got ref -l -r $testroot/repo-clone > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
git_fsck "$testroot" "$testroot/repo-clone"
- ret="$?"
+ ret=$?
test_done "$testroot" "$ret"
}
(cd $testroot/repo && git config receive.denyCurrentBranch ignore)
got clone -q $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
local commit_id4=`git_show_branch_head $testroot/repo-clone bar`
got ref -l -r $testroot/repo-clone > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
got send -a -q -r $testroot/repo-clone -b master > $testroot/stdout \
2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got send command succeeded unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "got: -a and -b options are mutually exclusive" \
> $testroot/stderr.expected
cmp -s $testroot/stderr $testroot/stderr.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
got send -a -q -r $testroot/repo-clone > $testroot/stdout \
2> $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got send command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got ref -l -r $testroot/repo > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/heads/master: $commit_id2" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got ref -l -r $testroot/repo-clone > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
git_fsck "$testroot" "$testroot/repo-clone"
- ret="$?"
+ ret=$?
test_done "$testroot" "$ret"
}
got init $testroot/repo2
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
local commit_id2=`git_show_head $testroot/repo`
got send -q -r $testroot/repo > $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got send command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
got ref -r $testroot/repo2 -s refs/heads/master HEAD
got ref -l -r $testroot/repo > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got ref -l -r $testroot/repo2 > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/heads/master: $commit_id2" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got send -r $testroot/repo > $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got send command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo 'Connecting to "origin" 127.0.0.1' > $testroot/stdout.expected
echo "Already up-to-date" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
git_fsck "$testroot" "$testroot/repo2"
- ret="$?"
+ ret=$?
test_done "$testroot" "$ret"
}
local commit_id=`git_show_head $testroot/repo`
got clone -q $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
}
EOF
got ref -l -r $testroot/repo > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/heads/master: $commit_id" >> $testroot/stdout.expected
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
# fetch tag 2.0 from repo-clone2
got fetch -q -r $testroot/repo > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got fetch command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
fi
got ref -l -r $testroot/repo > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
echo "refs/tags/2.0: $tag_id2" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
# send tag 1.0 to repo-clone
got send -q -r $testroot/repo -t 1.0 > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got send command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
fi
got ref -l -r $testroot/repo-clone > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "refs/tags/1.0: $tag_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
git_fsck "$testroot" "$testroot/repo-clone"
- ret="$?"
+ ret=$?
test_done "$testroot" "$ret"
}
local commit_id=`git_show_head $testroot/repo`
got clone -q $testurl/repo $testroot/repo-clone
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got clone command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
}
EOF
got ref -l -r $testroot/repo-clone > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
got branch -r $testroot/repo foo
got send -q -r $testroot/repo > $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got send command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
fi
got ref -l -r $testroot/repo-clone > $testroot/stdout
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
git_fsck "$testroot" "$testroot/repo-clone"
- ret="$?"
+ ret=$?
test_done "$testroot" "$ret"
}
blob - 2f126fac8cca3afed8a2b489b7d7e3223c308752
blob + e16d9854340821bff1be14c3086fbe1a59b26843
--- regress/cmdline/stage.sh
+++ regress/cmdline/stage.sh
local testroot=`test_init stage_basic`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got stage > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init stage_no_changes`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got stage alpha beta > $testroot/stdout \
2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got stage command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: no changes to stage" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init stage_unversioned`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "M alpha" > $testroot/stdout.expected
echo "? unversioned-file" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got stage > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got stage command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo " M alpha" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got stage unversioned-file > $testroot/stdout \
2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got stage command succeed unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: no changes to stage" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
local testroot=`test_init stage_nonexistent`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "got: nonexistent-file: No such file or directory" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
local testroot=`test_init stage_list`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
cut -d' ' -f3 | tr -d '\n' >> $testroot/stdout.expected)
echo " A foo" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cut -d' ' -f3 | tr -d '\n' > $testroot/stdout.expected)
echo " M alpha" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local initial_commit=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got stage alpha > $testroot/stdout \
2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got stage command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
> $testroot/stderr.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
local initial_commit=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "modified alpha again" > $testroot/wt/alpha
(cd $testroot/wt && got stage alpha > $testroot/stdout \
2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got stage command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
> $testroot/stderr.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
local testroot=`test_init double_stage`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "got: no changes to stage" > $testroot/stderr.expected
(cd $testroot/wt && got stage alpha 2> $testroot/stderr)
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got stage beta \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got stage command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
fi
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "got: no changes to stage" > $testroot/stderr.expected
(cd $testroot/wt && got stage foo 2> $testroot/stderr)
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
printf "q\n" > $testroot/patchscript
(cd $testroot/wt && got stage -F $testroot/patchscript -p \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got stage command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
fi
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "got: no changes to stage" > $testroot/stderr.expected
(cd $testroot/wt && got stage foo 2> $testroot/stderr)
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo ' A foo' >> $testroot/stdout.expected
(cd $testroot/wt && got stage alpha beta foo > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init stage_status`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo ' A foo' > $testroot/stdout.expected
(cd $testroot/wt && got status foo > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo ' D beta' > $testroot/stdout.expected
(cd $testroot/wt && got status beta > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init stage_add_already_staged_file`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "got: $f: file has unexpected status" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init stage_rm_already_staged_file`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got rm beta \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got rm command failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
fi
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
echo -n > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo "got: $f: file is staged" > $testroot/stderr.expected
(cd $testroot/wt && got rm $f \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got rm command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
fi
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init stage_revert`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "modified added file again" >> $testroot/wt/foo
(cd $testroot/wt && got revert alpha > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "revert command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "R alpha" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "modified alpha" > $testroot/content.expected
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo 'MA foo' >> $testroot/stdout.expected
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got revert alpha > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "revert command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "modified alpha" > $testroot/content.expected
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got revert beta > $testroot/stdout \
2> $testroot/stderr)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "revert command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got revert foo > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "revert command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "R foo" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "new file" > $testroot/content.expected
cat $testroot/wt/foo > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo ' A foo' >> $testroot/stdout.expected
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got revert foo > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "revert command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "new file" > $testroot/content.expected
cat $testroot/wt/foo > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo ' A foo' >> $testroot/stdout.expected
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got revert -R . > $testroot/stdout \
2> $testroot/stderr)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "revert command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "R alpha" > $testroot/stdout.expected
echo "R foo" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo ' A foo' >> $testroot/stdout.expected
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local head_commit=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got diff -s > $testroot/stdout)
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got diff > $testroot/stdout)
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo '+new file changed' >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo '+new file' >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local orig_commit=`git_show_head $testroot/repo`
got checkout -c $orig_commit $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got histedit -F $testroot/histedit-script \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got histedit command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: alpha: file is staged" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local master_commit=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got rebase newbranch \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got rebase command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: alpha: file is staged" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init stage_update`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout \
2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got update command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: alpha: file is staged" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init stage_commit_non_staged`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "modified file" > $testroot/wt/gamma/delta
(cd $testroot/wt && got commit -m "change delta" gamma/delta \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got commit command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: gamma/delta: file is not staged" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init stage_commit_out_of_date`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got commit -m "try to commit" > $testroot/stdout \
2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got commit command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "can be committed" >> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "got: alpha: file is staged" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got unstage > /dev/null)
(cd $testroot/wt && got update > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got update command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "D beta" >> $testroot/stdout.expected
echo "A foo" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got stage > /dev/null)
(cd $testroot/wt && got commit -m "try again" > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got commit command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "D beta" >> $testroot/stdout.expected
echo "Created commit $commit_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local first_commit=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got commit -m "staged changes" \
> $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got commit command failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "Created commit $head_commit" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo '+new file' >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit_id=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
printf "n\nn\nn\n" > $testroot/patchscript
(cd $testroot/wt && got stage -F $testroot/patchscript -p \
numbers > $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got stage command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
stage this change? [y/n/q] n
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "got: no changes to stage" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo "M numbers" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
stage this change? [y/n/q] n
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo "MM numbers" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo " 9" >> $testroot/stdout.expected
echo " 10" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got unstage >/dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got stage command failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo "M numbers" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
stage this change? [y/n/q] y
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo "MM numbers" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "-16" >> $testroot/stdout.expected
echo "+c" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit_id=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
stage this change? [y/n/q] n
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo "MM numbers" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
stage this change? [y/n/q] y
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo "MM numbers" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
+c
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
5
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit_id=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "A epsilon/new" > $testroot/stdout.expected
echo "stage this addition? [y/n] y" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo " A epsilon/new" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "@@ -0,0 +1 @@" >> $testroot/stdout.expected
echo "+new" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit_id=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "A epsilon/new" > $testroot/stdout.expected
echo "stage this addition? [y/n] y" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo " A epsilon/new" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got stage -F $testroot/patchscript -p \
epsilon/new > $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got stage command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: no changes to stage" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit_id=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "D beta" > $testroot/stdout.expected
echo "stage this deletion? [y/n] y" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo " D beta" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "@@ -1 +0,0 @@" >> $testroot/stdout.expected
echo "-beta" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit_id=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "D beta" > $testroot/stdout.expected
echo "stage this deletion? [y/n] y" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo " D beta" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got stage -F $testroot/patchscript -p beta \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got stage command succeeded unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "got: no changes to stage" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit_id=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
printf "y\nq\nn\n" > $testroot/patchscript
(cd $testroot/wt && got stage -F $testroot/patchscript -p \
> $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got stage command failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
stage this deletion? [y/n] n
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "MM numbers" > $testroot/stdout.expected
echo "D zzz" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo " 4" >> $testroot/stdout.expected
echo " 5" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit_id=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
printf "y\n" > $testroot/patchscript
(cd $testroot/wt && got stage -F $testroot/patchscript -p \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got stage command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo -n "stage this change? [y/n/q] " >> $testroot/stdout.expected
echo "got: invalid patch choice" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo "M numbers" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got diff -s > $testroot/stdout)
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local head_commit=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got add zeta.link > /dev/null)
(cd $testroot/wt && got stage > $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "got stage succeeded unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "symbolic link points outside of paths under version control" \
>> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
A zeta.link
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo '\ No newline at end of file' >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got commit -m "staged symlink" \
> $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got commit command failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "D nonexistent.link" >> $testroot/stdout.expected
echo "Created commit $commit_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got tree -r $testroot/repo -c $commit_id > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got tree command failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
zeta.link@ -> gamma/delta
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
return 1
fi
echo 'this is regular file alpha.link' > $testroot/content.expected
cp $testroot/wt/alpha.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo -n ".got/bar" > $testroot/content.expected
cp $testroot/wt/dotgotbar.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "this is regular file foo" > $testroot/content.expected
cp $testroot/wt/dotgotfoo.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/epsilon.link > $testroot/stdout
echo "gamma" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo -n "/etc/passwd" > $testroot/content.expected
cp $testroot/wt/passwd.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/zeta.link > $testroot/stdout
echo "gamma/delta" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
local head_commit=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
stage this addition? [y/n] y
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo '\ No newline at end of file' >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got commit -m "staged symlink" \
> $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got commit command failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "D nonexistent.link" >> $testroot/stdout.expected
echo "Created commit $commit_id" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
got tree -r $testroot/repo -c $commit_id > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got tree command failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
zeta.link@ -> gamma/delta
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
return 1
fi
echo 'this is regular file alpha.link' > $testroot/content.expected
cp $testroot/wt/alpha.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/dotgotbar.link > $testroot/stdout
echo ".got/bar" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "this is regular file foo" > $testroot/content.expected
cp $testroot/wt/dotgotfoo.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/epsilon.link > $testroot/stdout
echo "gamma" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo -n "/etc/passwd" > $testroot/content.expected
cp $testroot/wt/passwd.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/zeta.link > $testroot/stdout
echo "gamma/delta" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
blob - f96cb55c8433319268b0b22d1615907b94f37ce7
blob + 4639246145d93e24cbf89dd139a7c9891de5c9be
--- regress/cmdline/status.sh
+++ regress/cmdline/status.sh
local testroot=`test_init status_basic`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
chmod 700 $testroot/wt/bar
git_commit $testroot/repo -m "add subdir with files"
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
git_commit $testroot/repo -m "add subdir with files"
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init status_obstructed`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status epsilon/zeta > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
git_commit $testroot/repo -m "added numbers file"
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
git_commit $testroot/repo -m "first commit"
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
git_commit $testroot/repo -m "first commit"
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
git_commit $testroot/repo -m "added numbers file"
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
git_commit $testroot/repo -m "added numbers file"
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init status_empty_dir`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got status epsilon > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init status_empty_dir_unversioned_file`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got status epsilon > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init status_many_paths`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
> $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init status_cvsignore`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status epsilon > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status epsilon/new > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt/gamma && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
? foop
EOF
(cd $testroot/wt && got status -I > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got status failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init status_gitignore`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt/gamma && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
? foop
EOF
(cd $testroot/wt && got status -I > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got status failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init status_status_code`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got status -s xDM \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "status succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: invalid status code 'x'" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo 'M alpha' > $testroot/stdout.expected
(cd $testroot/wt && got status -s M > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo 'D beta' > $testroot/stdout.expected
(cd $testroot/wt && got status -s D > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo '? foo' >> $testroot/stdout.expected
(cd $testroot/wt && got status -s !\? > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo 'A new' > $testroot/stdout.expected
(cd $testroot/wt && got status -s A > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo ' A new' > $testroot/stdout.expected
(cd $testroot/wt && got status -s A > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo 'MA new' > $testroot/stdout.expected
(cd $testroot/wt && got status -s A > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo 'MA new' >> $testroot/stdout.expected
(cd $testroot/wt && got status -s M > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
local testroot=`test_init status_suppress`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got status -S A -s M \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "status succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: -s and -S options are mutually exclusive" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status -s A -S M \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "status succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: -S and -s options are mutually exclusive" \
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status -S xDM \
> $testroot/stdout 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "status succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: invalid status code 'x'" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo 'M alpha' > $testroot/stdout.expected
(cd $testroot/wt && got status -S D\?A! > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo 'D beta' > $testroot/stdout.expected
(cd $testroot/wt && got status -S M\?A! > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo '? foo' >> $testroot/stdout.expected
(cd $testroot/wt && got status -S MDA > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo 'A new' > $testroot/stdout.expected
(cd $testroot/wt && got status -S MD\?! > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo ' A new' > $testroot/stdout.expected
(cd $testroot/wt && got status -S MD\?! > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo 'MA new' >> $testroot/stdout.expected
(cd $testroot/wt && got status -S D\?! > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo 'M alpha' > $testroot/stdout.expected
(cd $testroot/wt && got status -S AD\?! > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status -S MD\?! > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
local testroot=`test_init status_empty_file`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
blob - 6e76b311f1077b2317955711690448d4be3efebc
blob + ab908a49f4d848281c7d725df6742a474700a0e1
--- regress/cmdline/tag.sh
+++ regress/cmdline/tag.sh
# Create a tag based on repository's HEAD reference
got tag -m 'test' -r $testroot/repo -c HEAD $tag > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got ref command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
| grep "^refs/tags/$tag" | tr -d ' ' | cut -d: -f2`
echo "Created tag $tag_id" > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
# Ensure that Git recognizes the tag Got has created
(cd $testroot/repo && git checkout -q $tag)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "git checkout command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
# Ensure Got recognizes the new tag
got checkout -c $tag $testroot/repo $testroot/wt >/dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got checkout command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
# Create a tag based on implied worktree HEAD ref
(cd $testroot/wt && got tag -m 'test' $tag2 > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
| grep "^refs/tags/$tag2" | tr -d ' ' | cut -d: -f2`
echo "Created tag $tag_id2" > $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/repo && git checkout -q $tag2)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "git checkout command failed unexpectedly"
test_done "$testroot" "$ret"
return 1
local tree_id=`git_show_tree $testroot/repo`
(cd $testroot/wt && got tag -m 'test' -c $tree_id foobar \
2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "git tag command succeeded unexpectedly"
test_done "$testroot" "1"
return 1
echo "got: commit $tree_id: object not found" \
> $testroot/stderr.expected
cmp -s $testroot/stderr $testroot/stderr.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo "refs/tags/$tag: $tag_id" >> $testroot/stdout.expected
echo "refs/tags/$tag2: $tag_id2" >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
echo " test" >> $testroot/stdout.expected
echo " " >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
echo " adding the test tree" >> $testroot/stdout.expected
echo " " >> $testroot/stdout.expected
cmp -s $testroot/stdout $testroot/stdout.expected
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
blob - 9ca64b4d00d541ee2703cb9c58c93091e0ae020b
blob + 75ae4d9639f4152935424d22a9cd67bb41ebacf1
--- regress/cmdline/tree.sh
+++ regress/cmdline/tree.sh
(cd $testroot/wt && got tree > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
local testroot=`test_init tree_branch`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got tree > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
# Currently fails in open(2)
got tree -r $testroot/repo repo2 > $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "tree command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
return 1
fi
# Currently fails with "bad object data"
got tree -r $testroot/repo repo2 > $testroot/stdout 2> $testroot/stderr
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "tree command succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "got: bad object data" >> $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
return 1
fi
blob - 053325225ecc1c55962ba876ee2610f161762fa3
blob + d3635a2490f28f8544c57bf9a75a797727642b1f
--- regress/cmdline/unstage.sh
+++ regress/cmdline/unstage.sh
local testroot=`test_init unstage_basic`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got stage alpha beta foo > /dev/null)
(cd $testroot/wt && got unstage > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got unstage command failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo 'D beta' >> $testroot/stdout.expected
echo 'G foo' >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo 'A foo' >> $testroot/stdout.expected
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init unstage_unversioned`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo ' A foo' >> $testroot/stdout.expected
echo "? unversioned-file" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got unstage > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got unstage command failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo 'D beta' >> $testroot/stdout.expected
echo 'G foo' >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
# unstaging an unversioned path is a no-op
(cd $testroot/wt && got unstage unversioned > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got unstage command failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "? unversioned-file" >> $testroot/stdout.expected
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init unstage_nonexistent`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
# unstaging a non-existent file is a no-op
(cd $testroot/wt && got unstage nonexistent-file > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got unstage command failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit_id=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
sed -i -e 's/^16$/c/' $testroot/wt/numbers
(cd $testroot/wt && got stage > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got stage command failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
printf "n\nn\nn\n" > $testroot/patchscript
(cd $testroot/wt && got unstage -F $testroot/patchscript -p \
numbers > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got unstage command failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
unstage this change? [y/n/q] n
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo " M numbers" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
G numbers
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo "MM numbers" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
+c
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
10
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got stage >/dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got stage command failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo " M numbers" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
G numbers
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo "MM numbers" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
10
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
+c
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got stage >/dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got stage command failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo " M numbers" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
G numbers
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo "M numbers" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got diff -s > $testroot/stdout)
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
+c
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit_id=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "unstage this addition? [y/n] y" >> $testroot/stdout.expected
echo "G epsilon/new" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo "A epsilon/new" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got diff -s > $testroot/stdout)
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "@@ -0,0 +1 @@" >> $testroot/stdout.expected
echo "+new" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit_id=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "unstage this deletion? [y/n] y" >> $testroot/stdout.expected
echo "D beta" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status > $testroot/stdout)
echo "D beta" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got diff -s > $testroot/stdout)
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "@@ -1 +0,0 @@" >> $testroot/stdout.expected
echo "-beta" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local commit_id=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
printf "y\nq\nn\n" > $testroot/patchscript
(cd $testroot/wt && got unstage -F $testroot/patchscript -p \
> $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got unstage command failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
unstage this deletion? [y/n] n
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "MM numbers" > $testroot/stdout.expected
echo " D zzz" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo " 4" >> $testroot/stdout.expected
echo " 5" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "@@ -1 +0,0 @@" >> $testroot/stdout.expected
echo "-zzz" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local head_commit=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
A zeta.link
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got unstage > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got unstage command failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/alpha.link > $testroot/stdout
echo "beta" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/epsilon.link > $testroot/stdout
echo "gamma" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/epsilon/beta.link > $testroot/stdout
echo "../gamma/delta" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "this is regular file foo" > $testroot/content.expected
cp $testroot/wt/dotgotfoo.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/dotgotbar.link > $testroot/stdout
echo ".got/bar" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/zeta.link > $testroot/stdout
echo "gamma/delta" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
local commit_id1=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
A zeta3.link
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
printf "y\nn\ny\nn\ny\ny\nn\ny\ny\n" > $testroot/patchscript
(cd $testroot/wt && got unstage -F $testroot/patchscript -p \
> $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "got unstage command failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
G zeta3.link
EOF
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/alpha.link > $testroot/stdout
echo "gamma/delta" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/epsilon.link > $testroot/stdout
echo "beta" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cp $testroot/wt/passwd.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/epsilon/beta.link > $testroot/stdout
echo "../gamma" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/nonexistent.link > $testroot/stdout
echo "nonexistent2" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/dotgotfoo.link > $testroot/stdout
echo ".got/foo" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/zeta3.link > $testroot/stdout
echo "beta" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "D zeta2.link" >> $testroot/stdout.expected
echo "A zeta3.link" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
return 1
fi
blob - 51b2e89261f318fde6e149922ab6d66ef3629aac
blob + 914cb847c018254515703871e7f5f4db64b790b0
--- regress/cmdline/update.sh
+++ regress/cmdline/update.sh
local testroot=`test_init update_basic`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
fi
test_done "$testroot" "$ret"
local testroot=`test_init update_adds_file`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/gamma/new > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
fi
test_done "$testroot" "$ret"
mkdir $testroot/wtparent
got checkout $testroot/repo $testroot/wtparent/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
chmod u+w $testroot/wtparent
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
local testroot=`test_init update_deletes_dir`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
# check out the epsilon/ sub-tree
got checkout -p epsilon $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update -c $first_rev > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
# check out the epsilon/ sub-tree
got checkout -p epsilon $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update -c $first_rev > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
+ ret=$?
if [ "$?" != "0" ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
local testroot=`test_init update_sibling_dirs_with_common_prefix`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init update_dir_with_dot_sibling`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$ret"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
git_commit $testroot/repo -m "adding a sub-directory beneath epsilon"
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
git_commit $testroot/repo -m "adding a sub-directory beneath epsilon"
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
git_commit $testroot/repo -m "adding initial snake tree"
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
git_commit $testroot/repo -m "adding initial snake tree"
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
git_commit $testroot/repo -m "adding initial tree"
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
local base_commit=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/numbers >> $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
fi
test_done "$testroot" "$ret"
git_commit $testroot/repo -m "adding executable file"
got checkout $testroot/repo $testroot/wt > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo >> $testroot/stdout.expected
(cd $testroot/wt && got update > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
ls -l $testroot/wt/xfile | grep -q '^-rwx'
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "file is not executable" >&2
ls -l $testroot/wt/xfile >&2
fi
git_commit $testroot/repo -m "adding executable file"
got checkout $testroot/repo $testroot/wt > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
ls -l $testroot/wt/xfile | grep -q '^-rwx'
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "file is not executable" >&2
ls -l $testroot/wt/xfile >&2
test_done "$testroot" "$ret"
echo >> $testroot/stdout.expected
(cd $testroot/wt && got update > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
ls -l $testroot/wt/xfile | grep -q '^-rw-'
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "file is unexpectedly executable" >&2
ls -l $testroot/wt/xfile >&2
fi
local testroot=`test_init update_restores_missing_file`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
fi
test_done "$testroot" "$ret"
local testroot=`test_init update_conflict_wt_add_vs_repo_add`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Files with new merge conflicts: 1" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/gamma/new > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo 'M gamma/new' > $testroot/stdout.expected
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init update_conflict_wt_edit_vs_repo_rm`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
git_show_head $testroot/repo >> $testroot/stdout.expected
echo >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/beta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo 'A beta' > $testroot/stdout.expected
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init update_conflict_wt_rm_vs_repo_edit`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
git_show_head $testroot/repo >> $testroot/stdout.expected
echo >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo 'D beta' > $testroot/stdout.expected
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got diff > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init update_conflict_wt_rm_vs_repo_rm`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
git_show_head $testroot/repo >> $testroot/stdout.expected
echo >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got status beta > $testroot/stdout \
2> $testroot/stderr)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
local testroot=`test_init update_partial`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update alpha beta > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/alpha $testroot/wt/beta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got update epsilon > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/epsilon/zeta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
local testroot=`test_init update_partial_add`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update new epsilon/new2 > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/new $testroot/wt/epsilon/new2 > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
fi
test_done "$testroot" "$ret"
local testroot=`test_init update_partial_rm`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
> $testroot/stderr.expected
(cd $testroot/wt && got update alpha epsilon/zeta 2> $testroot/stderr)
- ret="$?"
- if [ "$ret" = "0" ]; then
+ ret=$?
+ if [ $ret -eq 0 ]; then
echo "update succeeded unexpectedly" >&2
test_done "$testroot" "1"
return 1
fi
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
local testroot=`test_init update_partial_dir`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update epsilon > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/epsilon/zeta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
git_commit $testroot/repo -m "modified alpha with git"
got checkout $testroot/repo2 $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update > $testroot/stdout 2> $testroot/stderr)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
fi
test_done "$testroot" "$ret"
local base_commit=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo 'refs/heads/master'> $testroot/head-ref.expected
cmp -s $testroot/head-ref.expected $testroot/wt/.got/head-ref
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/head-ref.expected $testroot/wt/.got/head-ref
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got update -b newbranch > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo 'refs/heads/newbranch'> $testroot/head-ref.expected
cmp -s $testroot/head-ref.expected $testroot/wt/.got/head-ref
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/head-ref.expected $testroot/wt/.got/head-ref
test_done "$testroot" "$ret"
return 1
local testroot=`test_init update_to_commit_on_wrong_branch`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
2> $testroot/stderr)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
git_commit $testroot/repo -m "adding another file"
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "M epsilon/psi" > $testroot/stdout.expected
echo "Created commit $head_rev" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo -n "" > $testroot/stdout.expected
echo "got: work tree must be updated before these changes can be committed" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo "Files with new merge conflicts: 1" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "M epsilon/zeta" > $testroot/stdout.expected
echo "Created commit $head_rev" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
local tag="1.0.0"
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update -c $tag > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
fi
test_done "$testroot" "$ret"
local commit_id1=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
ls -l $testroot/wt/xfile | grep -q '^-rwx'
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "file is not executable" >&2
ls -l $testroot/wt/xfile >&2
test_done "$testroot" "$ret"
echo >> $testroot/stdout.expected
(cd $testroot/wt && got update -c $commit_id1 > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "U xfile" > $testroot/stdout.expected
echo "Updated to refs/heads/master: $commit_id1" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
ls -l $testroot/wt/xfile | grep -q '^-rwx'
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "file is not executable" >&2
ls -l $testroot/wt/xfile >&2
test_done "$testroot" "$ret"
fi
(cd $testroot/wt && got update > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "Updated to refs/heads/master: $commit_id2" \
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
ls -l $testroot/wt/xfile | grep -q '^-rw-'
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "file is unexpectedly executable" >&2
ls -l $testroot/wt/xfile >&2
fi
local commit_id1=`git_show_head $testroot/repo`
got checkout -c $commit_id0 $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
echo "C alpha" > $testroot/stdout.expected
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
fi
cmp -s $testroot/content.expected $testroot/wt/alpha
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/wt/alpha
fi
test_done "$testroot" "$ret"
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
echo "This is a file called repo2" > $testroot/wt/repo2
(cd $testroot/wt && got add repo2 > /dev/null)
(cd $testroot/wt && got commit -m 'add file repo2' > /dev/null)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "commit failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "M repo2" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
local testroot=`test_init update_adds_symlink`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "checkout failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/alpha.link > $testroot/stdout
echo "alpha" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/epsilon.link > $testroot/stdout
echo "epsilon" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cp $testroot/wt/passwd.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/epsilon/beta.link > $testroot/stdout
echo "../beta" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
readlink $testroot/wt/nonexistent.link > $testroot/stdout
echo "nonexistent" > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo 'Already up-to-date' > $testroot/stdout.expected
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
fi
test_done "$testroot" "$ret"
git_commit $testroot/repo -m "add symlink"
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "checkout failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got update > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
local commit_id1=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "checkout failed unexpectedly" >&2
test_done "$testroot" "$ret"
return 1
echo "Files with new merge conflicts: 7" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cp $testroot/wt/alpha.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
cp $testroot/wt/epsilon.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
cp $testroot/wt/passwd.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
cp $testroot/wt/epsilon/beta.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
cp $testroot/wt/nonexistent.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
cp $testroot/wt/dotgotfoo.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
cp $testroot/wt/dotgotbar.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
cp $testroot/wt/new.link $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "M new.link" >> $testroot/stdout.expected
echo "D nonexistent.link" >> $testroot/stdout.expected
(cd $testroot/wt && got status > $testroot/stdout)
- if [ "$ret" != "0" ]; then
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
local commit_id3=`git_show_head $testroot/repo`
got checkout -c $commit_id2 $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
> $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/c > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got update -c $commit_id2 c > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/c > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "got: /c: no such entry found in tree" > $testroot/stderr.expected
cmp -s $testroot/stderr.expected $testroot/stderr
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stderr.expected $testroot/stderr
test_done "$testroot" "$ret"
return 1
echo -n > $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
(cd $testroot/wt && got update -c $commit_id3 > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
blob_id1=`get_blob_id $testroot/repo "" beta`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
>> $testroot/stdout.expected
echo "Files with new merge conflicts: 1" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/beta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "Files not updated because of existing merge conflicts: 1" \
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo 'C beta' > $testroot/stdout.expected
(cd $testroot/wt && got status > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "beta" > $testroot/content.expected
cat $testroot/wt/beta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo "Updated to refs/heads/master: $commit_id1" \
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "changed beta" > $testroot/content.expected
cat $testroot/wt/beta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
fi
test_done "$testroot" "$ret"
blob_id1=`get_blob_id $testroot/repo "" beta`
got checkout -c $commit_id0 $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
# update to the latest commit; this skips beta and the new file
(cd $testroot/wt && got update > $testroot/stdout)
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
echo "update failed unexpectedly" >&2
test_done "$testroot" "1"
return 1
echo "File paths obstructed by a non-regular file: 2" \
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "File paths obstructed by a non-regular file: 1" \
>> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
echo "changed beta" > $testroot/content.expected
cat $testroot/wt/beta > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
fi
test_done "$testroot" "$ret"
local testroot=`test_init update_quiet`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
(cd $testroot/wt && got update -q > $testroot/stdout)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/alpha > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
fi
test_done "$testroot" "$ret"
local commit_id0=`git_show_head $testroot/repo`
got checkout $testroot/repo $testroot/wt > /dev/null
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
test_done "$testroot" "$ret"
return 1
fi
>> $testroot/stdout.expected
echo >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/foo > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
echo "Files with new merge conflicts: 1" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/foo > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/foo-1-* > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/foo-2-* > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
echo >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/foo > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo >> $testroot/stdout.expected
echo "Files with new merge conflicts: 1" >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
cat $testroot/wt/foo > $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
chmod 755 $testroot/content.expected
cp $testroot/wt/foo-1-* $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
chmod 755 $testroot/content.expected
cp $testroot/wt/foo-2-* $testroot/content
cmp -s $testroot/content.expected $testroot/content
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/content.expected $testroot/content
test_done "$testroot" "$ret"
return 1
echo -n '? ' >> $testroot/stdout.expected
(cd $testroot/wt && ls foo-orig-* >> $testroot/stdout.expected)
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
return 1
>> $testroot/stdout.expected
echo >> $testroot/stdout.expected
cmp -s $testroot/stdout.expected $testroot/stdout
- ret="$?"
- if [ "$ret" != "0" ]; then
+ ret=$?
+ if [ $ret -ne 0 ]; then
diff -u $testroot/stdout.expected $testroot/stdout
test_done "$testroot" "$ret"
fi