sapling/eden/scm/tests/test-globalrevs-svnrev.t
Thomas Orozco c6aa2d3125 globalrevs: verify that convert_revision is a svnrev when falling back
Summary:
When falling back to convert_revision to get the svnrev for a commit to return
it as a globalrev, it seems like it would make sense to verify that the
convert_revision is indeed a svnrev (and not, say, a git commit hash from
hggit).

Reviewed By: farnz

Differential Revision: D20891268

fbshipit-source-id: 2451ad787fcce7b10b6a405f2855313ca51f5b3e
2020-04-07 06:47:26 -07:00

22 lines
410 B
Perl

#chg-compatible
$ enable commitextras
$ enable globalrevs
$ newrepo
Test with a valid svnrev
$ echo data > file
$ hg add file
$ hg commit -m "foo" --extra "convert_revision=svn:1234/foo/trunk/bar@4567"
$ hg log -T '{globalrev}\n' -r .
4567
Test with an invalid svnrev
$ echo moredata > file
$ hg commit -m "foo" --extra "convert_revision=111111"
$ hg log -T '{globalrev}\n' -r .