Page MenuHomePhabricator

Convert git-sync-upstream script from bash to python
Closed, DeclinedPublic

Description

Is currently somewhat complicated, so that would simplify things. Also would help send stats to stads easily.

Event Timeline

yuvipanda claimed this task.
yuvipanda raised the priority of this task from to Medium.
yuvipanda updated the task description. (Show Details)
yuvipanda added subscribers: Dzahn, yuvipanda, Aklapper and 2 others.

What is git-sync-upstream ? Where is it ?

I don't agree at all. The script is extremely simple and is just doing some very simple operations with git. I don't see why rewriting this in python would give us any advantage.

(Also, why is this a Beta Cluster project bug? What am I missing/not understanding?)

@greg it's a bc bug because of the task it blocks - I want to move it to python so we can send stats to graphite about how many cherry-picked commits are there, and have it alert on that :)

@Joe I think bash is a terrible language when you aren't just executing a sequence of commands (with or without piping). My personal guideline is to rewrite to python whenever there's more than one control structure in the script and / or when I am going to add a new feature to it, which are both true here.

On second thoughts, a lot of the complexity in that bash script can go away, so I'm just going to do that instead.

Still think complicated bash scripts should be moved to python, though :)