diff --git a/tests/test-treediscovery-legacy.t b/tests/test-treediscovery-legacy.t new file mode 100644 --- /dev/null +++ b/tests/test-treediscovery-legacy.t @@ -0,0 +1,310 @@ +Tests discovery against servers without getbundle support: + + $ cat >> $HGRCPATH < [ui] + > logtemplate="{rev} {node|short}: {desc} {branches}\n" + > [extensions] + > graphlog= + > EOF + $ cp $HGRCPATH $HGRCPATH-withcap + + $ CAP="getbundle known changegroupsubset" + $ . "$TESTDIR/notcapable" + $ cp $HGRCPATH $HGRCPATH-nocap + $ cp $HGRCPATH-withcap $HGRCPATH + +Setup HTTP server control: + + $ remote=http://localhost:$HGPORT/ + $ export remote + $ start() { + > echo '[web]' > $1/.hg/hgrc + > echo 'push_ssl = false' >> $1/.hg/hgrc + > echo 'allow_push = *' >> $1/.hg/hgrc + > cp $HGRCPATH-nocap $HGRCPATH + > hg serve -R $1 -p $HGPORT -d --pid-file=hg.pid -E errors.log + > cat hg.pid >> $DAEMON_PIDS + > } + $ stop() { + > "$TESTDIR/killdaemons.py" + > cp $HGRCPATH-withcap $HGRCPATH + > } + +Both are empty: + + $ hg init empty1 + $ hg init empty2 + $ start empty2 + $ hg incoming -R empty1 $remote + comparing with http://localhost:$HGPORT/ + no changes found + [1] + $ hg outgoing -R empty1 $remote + comparing with http://localhost:$HGPORT/ + no changes found + [1] + $ hg pull -R empty1 $remote + pulling from http://localhost:$HGPORT/ + no changes found + $ hg push -R empty1 $remote + pushing to http://localhost:$HGPORT/ + no changes found + $ stop + +Base repo: + + $ hg init main + $ cd main + $ hg debugbuilddag -mo '+2:tbase @name1 +3:thead1