Mercurial > hg
view tests/test-revert @ 2328:f789602ba840
hgweb.manifest: revno of manifest and changelog aren't always the same
In the v4l-dvb repo, the manifest revno and the changelog revno are not
in sync. This happened because the same patch was applied to the same
revision in two different branches, resulting in the same manifest text,
with the same parents and so the first revision was reused.
Since hgweb.manifest was assuming the revnos of the manifest and of the
changelog were always the same, clicking on manifest -> bz2 in the
v4l-dvb site would download the wrong revision.
Use the linkrev to go from manifest revision to changelog revision.
This still won't be perfect since the page will still talk about
"manifest for changeset XYZ", where XYZ was the first changeset to have
this manifest, which is not necessarily the same changeset that the user
clicked to get to this page - but at least the contents will be the
same.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Sat, 20 May 2006 15:34:19 -0300 |
parents | e9a0ed9ed4d9 |
children | 890e285c52a1 |
line wrap: on
line source
#!/bin/sh hg init echo 123 > a echo 123 > c echo 123 > e hg add a c e hg commit -m "first" -d "1000000 0" a c e echo 123 > b echo %% should show b unknown hg status echo 12 > c echo %% should show b unknown and c modified hg status hg add b echo %% should show b added and c modified hg status hg rm a echo %% should show a removed, b added and c modified hg status hg revert a echo %% should show b added, copy saved, and c modified hg status hg revert b echo %% should show b unknown, and c modified hg status hg revert --no-backup c echo %% should show unknown: b hg status echo %% should show a b c e ls echo %% should verbosely save backup to e.orig echo z > e hg revert -v echo %% should say no changes needed hg revert a echo %% should say file not managed echo q > q hg revert q rm q echo %% should say file not found hg revert notfound hg rm a hg commit -m "second" -d "1000000 0" echo z > z hg add z hg st echo %% should add a, forget z hg revert -r0 echo %% should forget a hg revert -rtip rm -f a *.orig echo %% should silently add a hg revert -r0 a hg st a hg update -C chmod +x c hg revert echo %% should print non-executable test -x c || echo non-executable chmod +x c hg commit -d '1000001 0' -m exe chmod -x c hg revert echo %% should print executable test -x c && echo executable echo %% issue 241 hg init a cd a echo a >> a hg commit -A -d '1 0' -m a echo a >> a hg commit -d '2 0' -m a hg update 0 mkdir b echo b > b/b hg revert -rtip true