]> khamidou — GitHub mirrors - arcanist.git/commit
Improve ArcanistMercurialParser's handling of unusual branch names
authorepriestley <git@epriestley.com>
Wed, 7 Mar 2012 04:14:25 +0000 (20:14 -0800)
committerepriestley <git@epriestley.com>
Wed, 7 Mar 2012 04:14:25 +0000 (20:14 -0800)
commit81019a790ee74cd3bd6bd6ea076da47ddc871ae8
tree25744b6434fdcec2663a80e0b56318e348328d98
parent0e35dc64a9c298fdfd8e7ad8f668d878ab89d8ec
Improve ArcanistMercurialParser's handling of unusual branch names

Summary:
See <https://github.com/facebook/phabricator/issues/97>. Mercurial branch names may contain any characters, but we currently reject branch names with spaces.

NOTE: Mercurial allows you to name branches things like `     ` (five spaces). We do not parse this correctly. Die in a well fire.

Test Plan:
  - Added some horrible-but-possible test cases for crazy branch names.
  - Unit tests now pass.

Reviewers: btrahan, Makinde, killermonk

Reviewed By: btrahan

CC: aran, epriestley
Differential Revision: https://secure.phabricator.com/D1795
src/repository/parser/mercurial/ArcanistMercurialParser.php
src/repository/parser/mercurial/__tests__/ArcanistMercurialParserTestCase.php
src/repository/parser/mercurial/__tests__/data/branches-with-spaces.txt [new file with mode: 0644]