commit - f08f28be8b51ef7b0fba91edf90b81330031fc35
commit + 117f997e6fe54136bfe028caf8038560a071451c
blob - 1a217d6ed3b9754e118aea878d1450e35c34790d
blob + 88a6dc75585a2d1b900d0d9d747bfb9a2540b8cb
--- regress/cmdline/backout.sh
+++ regress/cmdline/backout.sh
local short_id=$(printf '%.7s' $branch_rev)
local ymd2=`date -u -r $commit_time2 +"%F"`
local short_id2="newbranch"
- local sorted=$(printf "$branch_rev\n$branch_rev2" | sort)
+ local wt_sorted=$(printf "$branch_rev\n$branch_rev2" | sort)
- for r in $sorted; do
+ for r in $wt_sorted; do
echo $sep >> $testroot/stdout.expected
if [ $r == $branch_rev ]; then
echo "backout $r" >> $testroot/stdout.expected
local b2_changeset2=" M epsilon/new2"
date=`date -u -r $b2_commit_time +"%a %b %e %X %Y UTC"`
date2=`date -u -r $b2_commit_time2 +"%a %b %e %X %Y UTC"`
- sorted=$(printf "$branch2_rev\n$branch2_rev2" | sort)
+ local wt2_sorted=$(printf "$branch2_rev\n$branch2_rev2" | sort)
echo -n > $testroot/stdout.expected
- for r in $sorted; do
+ for r in $wt2_sorted; do
echo $sep >> $testroot/stdout.expected
if [ $r == $branch2_rev ]; then
echo "backout $r" >> $testroot/stdout.expected
return 1
fi
- # ensure both wt and wt2 logmsg refs can be retrieved from the repo
- sorted=`printf \
- "$branch_rev\n$branch_rev2\n$branch2_rev\n$branch2_rev2" | sort`
+ # ensure both wt and wt2 logmsg refs can be retrieved and the
+ # work tree UUID is displayed when listing refs from the repo
+ local wt_uuid=$(cat $testroot/wt/.got/uuid)
+ local wt2_uuid=$(cat $testroot/wt2/.got/uuid)
+ local wt_first=`printf "$wt_uuid\n$wt2_uuid" | sort | head -1`
- echo -n > $testroot/stdout.expected
- for r in $sorted; do
- echo "backout $r" >> $testroot/stdout.expected
+ for r in $wt_sorted; do
+ echo -n "backout $r" >> $testroot/wt.list
+ if [ $r == $branch_rev2 ]; then
+ echo -n " (newbranch)" >> $testroot/wt.list
+ fi
+ echo >> $testroot/wt.list
+ echo "work tree: $wt_uuid" >> $testroot/wt.list
done
- (cd $testroot/repo && got backout -l | grep ^backout | \
- sort | cut -f1,2 -d' ' > $testroot/stdout)
+ for r in $wt2_sorted; do
+ echo -n "backout $r" >> $testroot/wt2.list
+ if [ $r == $branch2_rev2 ]; then
+ echo -n " (newbranch2)" >> $testroot/wt2.list
+ fi
+ echo >> $testroot/wt2.list
+ echo "work tree: $wt2_uuid" >> $testroot/wt2.list
+ done
+ if [ $wt_uuid == $wt_first ]; then
+ mv $testroot/wt.list $testroot/stdout.expected
+ cat $testroot/wt2.list >> $testroot/stdout.expected
+ else
+ mv $testroot/wt2.list $testroot/stdout.expected
+ cat $testroot/wt.list >> $testroot/stdout.expected
+ fi
+
+ (cd $testroot/repo && got backout -l | egrep "^(backout|work)" \
+ > $testroot/stdout)
+
cmp -s $testroot/stdout.expected $testroot/stdout
ret=$?
if [ $ret -ne 0 ]; then
blob - 7ce30882e48e407037b62ad30b23c7a28138d709
blob + d90e1face424bb23b3129dd9b67d914a99c1abe4
--- regress/cmdline/cherrypick.sh
+++ regress/cmdline/cherrypick.sh
local short_id=$(printf '%.7s' $branch_rev)
local ymd2=`date -u -r $commit_time2 +"%F"`
local short_id2="newbranch"
- local sorted=$(printf "$branch_rev\n$branch_rev2" | sort)
+ local wt_sorted=$(printf "$branch_rev\n$branch_rev2" | sort)
- for r in $sorted; do
+ for r in $wt_sorted; do
echo $sep >> $testroot/stdout.expected
if [ $r == $branch_rev ]; then
echo "cherrypick $r" >> $testroot/stdout.expected
local b2_changeset2=" M epsilon/new2"
date=`date -u -r $b2_commit_time +"%a %b %e %X %Y UTC"`
date2=`date -u -r $b2_commit_time2 +"%a %b %e %X %Y UTC"`
- sorted=$(printf "$branch2_rev\n$branch2_rev2" | sort)
+ local wt2_sorted=$(printf "$branch2_rev\n$branch2_rev2" | sort)
echo -n > $testroot/stdout.expected
- for r in $sorted; do
+ for r in $wt2_sorted; do
echo $sep >> $testroot/stdout.expected
if [ $r == $branch2_rev ]; then
echo "cherrypick $r" >> $testroot/stdout.expected
return 1
fi
- # ensure both wt and wt2 logmsg refs can be retrieved from the repo
- sorted=`printf \
- "$branch_rev\n$branch_rev2\n$branch2_rev\n$branch2_rev2" | sort`
+ # ensure both wt and wt2 logmsg refs can be retrieved and the
+ # work tree UUID is displayed when listing refs from the repo
+ local wt_uuid=$(cat $testroot/wt/.got/uuid)
+ local wt2_uuid=$(cat $testroot/wt2/.got/uuid)
+ local wt_first=`printf "$wt_uuid\n$wt2_uuid" | sort | head -1`
- echo -n > $testroot/stdout.expected
- for r in $sorted; do
- echo "cherrypick $r" >> $testroot/stdout.expected
+ for r in $wt_sorted; do
+ echo -n "cherrypick $r" >> $testroot/wt.list
+ if [ $r == $branch_rev2 ]; then
+ echo -n " (newbranch)" >> $testroot/wt.list
+ fi
+ echo >> $testroot/wt.list
+ echo "work tree: $wt_uuid" >> $testroot/wt.list
done
- (cd $testroot/repo && got cherrypick -l | grep ^cherrypick | \
- sort | cut -f1,2 -d' ' > $testroot/stdout)
+ for r in $wt2_sorted; do
+ echo -n "cherrypick $r" >> $testroot/wt2.list
+ if [ $r == $branch2_rev2 ]; then
+ echo -n " (newbranch2)" >> $testroot/wt2.list
+ fi
+ echo >> $testroot/wt2.list
+ echo "work tree: $wt2_uuid" >> $testroot/wt2.list
+ done
+ if [ $wt_uuid == $wt_first ]; then
+ mv $testroot/wt.list $testroot/stdout.expected
+ cat $testroot/wt2.list >> $testroot/stdout.expected
+ else
+ mv $testroot/wt2.list $testroot/stdout.expected
+ cat $testroot/wt.list >> $testroot/stdout.expected
+ fi
+
+ (cd $testroot/repo && got cherrypick -l | egrep "^(cherrypick|work)" \
+ > $testroot/stdout)
+
cmp -s $testroot/stdout.expected $testroot/stdout
ret=$?
if [ $ret -ne 0 ]; then