mirror of
https://github.com/facebook/sapling.git
synced 2024-12-29 08:02:24 +03:00
c6aa2d3125
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
22 lines
410 B
Perl
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 .
|
|
|