felipec / git-remote-hg

Transparent bidirectional bridge between Git and Mercurial for Git
GNU General Public License v2.0
369 stars 87 forks source link

Fix "Branch name doesn't conform to GIT standards" #75

Open EricCousineau-TRI opened 6 years ago

EricCousineau-TRI commented 6 years ago

Resolves #74

Uses suggestion from @jan-hudec, using urllib, but keeping (at least some) backwards compatibility with existing source transforms.

Can supersede #7


This change is Reviewable

EricCousineau-TRI commented 6 years ago

Difference from original error in #74:

$ git fetch upstream 
searching for changes
no changes found
From hg::ssh://hg@bitbucket.org/osrf/sdformat
   501ada1..e50fb23  branches/pose_dom -> upstream/branches/pose_dom
 * [new tag]         sdformat3-mentor2_3.99.99%2Bmentor2v1.0 -> sdformat3-mentor2_3.99.99%2Bmentor2v1.0
 * [new tag]         sdformat4-mentor2_4.99.99%2Bmentor2v1.0 -> sdformat4-mentor2_4.99.99%2Bmentor2v1.0
 * [new tag]         sdformat4_4.0.0%7Epre1 -> sdformat4_4.0.0%7Epre1
 * [new tag]         sdformat4_4.0.0%7Epre2 -> sdformat4_4.0.0%7Epre2
 * [new tag]         sdformat4_4.0.0%7Epre3 -> sdformat4_4.0.0%7Epre3
 * [new tag]         sdformat4_4.3.0%7Epre1 -> sdformat4_4.3.0%7Epre1
 * [new tag]         sdformat4_4.3.0%7Epre2 -> sdformat4_4.3.0%7Epre2
 * [new tag]         sdformat5_5.0.0%7Ebeta1 -> sdformat5_5.0.0%7Ebeta1
 * [new tag]         sdformat5_5.0.0%7Ebeta2 -> sdformat5_5.0.0%7Ebeta2
 * [new tag]         sdformat6_6.0.0%7Epre1 -> sdformat6_6.0.0%7Epre1
 * [new tag]         sdformat8_8.0.0%7Epre1 -> sdformat8_8.0.0%7Epre1
felipec commented 5 years ago

It is not clear exactly what the patch does, you need to write more description into the commit message.

Also, you should write a simple test case that reproduces the problem, so that we can add it to the test suite and make sure it's working correctly.

And you please rebase and send the pull request again?