view tests/fish-merge @ 599:765182a4c843

[PATCH] Add RSS support to hgweb -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [PATCH] Add RSS support to hgweb From: Goffredo Baroncelli <kreijack@libero.it> with the two small patches below, now hgweb can act as feed source. Two kinds ofobjects can be tracked: the changelong and the files. This can be useful if anyone would track the changes of a file ( and because git has it, mercurial have to has ). To check the changelog the url is http://127.0.0.1:8000/pippo.pluto?cmd=changelog;style=rss To check a file ( the mercurial/hgweb.py for examples ) the url is http://127.0.0.1:8000/?cmd=filelog;file=mercurial/hgweb.py;filenode=0;style=rss The first patch adds a new filter for the template: the filter is named rfc822date, and translates the date from the touple format to a rfc822 style date. The second patch adds the templates needed to create the rss pages. Tested with akgregator ( kde ). [tweaked by mpm: add Content-type: text/xml add support for URL to header() add header with link and content type add RSS links on the normal pages] manifest hash: 170c03d50490d7160097f59abdde1a5073d2ba82 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCyFmLywK+sNU5EO8RApkrAKCYF/vZ3DwdMXPBds2LxGEX8+tK5QCfTeOc ZhPN8Xjt2cD3wMbNXMcoNSo= =COlM -----END PGP SIGNATURE-----
author mpm@selenic.com
date Sun, 03 Jul 2005 13:32:59 -0800
parents 4fc63e22b1fe
children 95c258ee5264 8f5637f0a0c0 0902ffece4b4
line wrap: on
line source

#!/bin/sh

set -e
set -x

# skip commit logs
export HGMERGE=tkmerge
export EDITOR=true

rm -rf m m1 m2
mkdir m
cd m

echo "m     this  that"
echo "this" > a
echo "that" > b
hg init
hg addremove
hg commit
echo "a:" `hg dump a` "b:" `hg dump b`
echo

cd ..
echo "m2    this  that "
mkdir m2
cd m2
hg branch ../m
hg checkout
echo "a:" `hg dump a` "b:" `hg dump b`
echo

cd ../m
echo "m     this1 that "
echo "this1" > a
hg commit
echo "a:" `hg dump a` "b:" `hg dump b`
echo

cd ..
echo "m1    this1 that "
mkdir m1
cd m1
hg branch ../m
hg checkout
echo "a:" `hg dump a` "b:" `hg dump b`
echo

cd ../m1
echo "m1    this1 that1"
echo "that1" > b
hg commit
echo "a:" `hg dump a` "b:" `hg dump b`
echo

cd ../m2
echo "m2    this  that2"
echo "that2" > b
hg commit
echo "a:" `hg dump a` "b:" `hg dump b`
echo

cd ../m1
echo "m1:m2 this1 that1 that2"
hg merge ../m2 # b should conflict, a should be fine
echo "a:" `hg dump a` "b:" `hg dump b`
echo

cd ../m2
echo "m2    this2 that2"
echo "this2" > a
hg commit
echo "a:" `hg dump a` "b:" `hg dump b`
echo

cd ../m2
echo "m2:m this12 that2"
hg merge ../m # a should conflict, b should be fine
echo "a:" `hg dump a` "b:" `hg dump b`
echo

# now here's the interesting bit
# if we choose ancestor by file, no conflicts
# otherwise we've got two equally close ancestors, each with a conflict
# if we go back to the root, we'll have both conflicts again
echo "m2:m1 this12 that12"
hg merge ../m1 # should be clean
echo "a:" `hg dump a` "b:" `hg dump b`
echo