tests/test-hgweb-filelog
author Edouard Gomez <ed.gomez@free.fr>
Sun, 04 Jan 2009 02:36:48 +0100
changeset 7583 77fec2d270ae
parent 7300 591767e6ea7a
child 7612 069b29656401
permissions -rwxr-xr-x
convert/gnuarch: parse continuation-of revisions in gnuarch source In GNU Arch, continuation-of was often used for: - tagging revisions - continue working on a project in a new archive, because arch was scaling poorly in revision numbers (cat-logs were slow to be parsed and scanned through) - very similar to the previous point, fork his own branch of a project. Parsing this header information will allow to 'follow' new history because it often hints at older/forked/personal revision trees. This patch however just implements the parsing of the continuation-of header. A followup patch will implement the proper use of this new information.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7300
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
     1
hg init test
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
     2
cd test
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
     3
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
     4
echo b > b
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
     5
hg ci -Am "b"
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
     6
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
     7
echo a > a
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
     8
hg ci -Am "first a"
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
     9
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    10
hg rm a
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    11
hg ci -m "del a"
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    12
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    13
echo b > a
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    14
hg ci -Am "second a"
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    15
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    16
hg rm a
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    17
hg ci -m "del2 a"
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    18
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    19
hg log -p
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    20
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    21
hg serve -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    22
cat hg.pid >> $DAEMON_PIDS
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    23
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    24
echo % tip - two revisions
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    25
("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/tip/a')
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    26
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    27
echo % second version - two revisions
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    28
("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/3/a')
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    29
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    30
echo % first deleted - one revision
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    31
("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/2/a')
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    32
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    33
echo % first version - one revision
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    34
("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/1/a')
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    35
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    36
echo % before addition - error
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    37
("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/0/a')
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    38
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    39
echo % errors
591767e6ea7a hgweb: conditionally show file logs for deleted files
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    40
cat errors.log