+t-inarchive-copy () {
+ local vm=$1
+ local from=${2:-sid}
+ local to=${3:-stable}
+ egrep "^${vm//./\\.}" aq/package.$from.$p >>aq/package.$to.$p
+ t-aq-archive-updated $to $p
+}
+
+copy-check-good () {
+ git diff $vtag
+ t-refs-same refs/remotes/dgit/dgit/$tosuite
+ t-ref-head
+ t-has-parent-or-is HEAD $vtag
+}
+
+copy-check () {
+ local vm=$1
+ local tosuite=${2:-stable}
+ t-inarchive-copy $vm '' $tosuite
+
+ vtag=$(v=$vm t-v-tag)
+
+ cd $p
+ t-refs-same-start
+ t-dgit fetch $tosuite
+ git merge --ff-only dgit/dgit/$tosuite
+
+ copy-check-good
+ local fetched; fetched=$(t-sametree-parent HEAD)
+ cd ..