source-integration icon indicating copy to clipboard operation
source-integration copied to clipboard

Branches in branch mappings cannot contain a '/'

Open Nick-Hall opened this issue 7 years ago • 7 comments

When I click "Update Mappings" with a branch set to "maintenance/gramps50" it changes to "gramps50".

Nick-Hall avatar Jun 15 '17 23:06 Nick-Hall

Which VCS plugin is this with ?

dregad avatar Jun 16 '17 09:06 dregad

Nevermind, I just saw you mentioned this in #229

dregad avatar Jun 16 '17 09:06 dregad

I'm not able to reproduce this. screenshot-20170616-1202

Which version of SI plugin are you using ?

dregad avatar Jun 16 '17 10:06 dregad

We are using Source Control Integration 2.0.3 and Source GitHub Integration 2.0.0.

Nick-Hall avatar Jun 16 '17 10:06 Nick-Hall

I found the problem. The branch name cannot be modified. I created a mapping with "gramps50" by mistake, and then tried to change it to "maintenance/gramps50".

The solution was to delete the mapping and create a new one.

Nick-Hall avatar Jun 16 '17 11:06 Nick-Hall

The branch name cannot be modified

Thanks for the feedback. I never realized that until today... And in fact I'm not sure it can be fixed easily as the table uses repo_id + branch name as primary key, and not an arbitrary ID field.

To avoid future confusion, the simplest would be to make the field read-only.

I'll also check if it's feasible to modify the code to allow updating the branch name, but that might require a schema change.

dregad avatar Jun 19 '17 07:06 dregad

To avoid future confusion, the simplest would be to make the field read-only.

#243 has been opened to track this as a workaround

This issue remains open to track the better fix, which would require adding a primary key to the branch table.

dregad avatar Sep 14 '17 13:09 dregad