sapling/tests/test-phabdiff.t
Wez Furlong 7972567aef phabdiff: make phabdiff more URL-agnostic
Summary: We want out phabricator diff parsers to recognize both https://phabricator.intern.facebook.com/ and https://phabricator.fb.com/ URLs (and a bigger class as well).

Test Plan:
- updated some tests (for `phabdiff` and `pullcreatemarkers` other files don't even seem to be used)
- ran tests
- tested phabdiff manually as well:
{F60696023}

Reviewers: #sourcecontrol, andersonmat, mitrandir, simpkins, lcharignon, quark, ttung, ikostia, rmcelroy

Reviewed By: ikostia, rmcelroy

Subscribers: wez, rmcelroy, net-systems-diffs@, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3229776

Tasks: 11013909, 11017978

Signature: t1:3229776:1461839346:08b9b3414e43ff9966bc05591ca5662ef9691aac
2016-04-28 10:55:06 -07:00

29 lines
716 B
Perl

$ PYTHONPATH=$TESTDIR/..:$PYTHONPATH
$ echo "[extensions]" >> $HGRCPATH
$ echo "gitlookup = $TESTDIR/../phabdiff.py" >> $HGRCPATH
Setup repo
$ hg init repo
$ cd repo
Test phabdiff template mapping
$ echo a > a
$ hg commit -Aqm "Differential Revision: https://phabricator.fb.com/D1234
> Task ID: 2312"
$ hg log --template "{phabdiff}\n"
D1234
$ echo c > c
$ hg commit -Aqm "Differential Revision: http://phabricator.intern.facebook.com/D1245
> Task ID: 2312"
$ hg log -r . --template "{phabdiff}\n"
D1245
$ echo b > b
$ hg commit -Aqm "Differential Revision: https://phabricator.fb.com/D5678
> Tasks: 32, 44"
$ hg log -r . --template "{phabdiff}: {tasks}\n"
D5678: 32 44