-
Notifications
You must be signed in to change notification settings - Fork 6
Bug 1050131 Write a script to auto-extract from mozilla-central the standalone content into the loop-client git repo #38
Conversation
import os | ||
from datetime import datetime | ||
import subprocess | ||
import pytz, dateutil, dateutil.tz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you import dateutil
you don't need to import dateutil.tz
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, in testing, it appears that both are needed to be imported, so I've added it back again.
nit: In python we usually don't use camelCase for function names. But it is not a big deal. |
# to avoid attempting to port the same cset all the time | ||
lastCset = cset | ||
|
||
if "merge" in cset.description().lower(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this get tripped if somebody happens to use the word "merge" in a checkin comment? If so, perhaps we can find a more robust way to indicate this...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An easy way is to count the number of parents. If there is more than one it is a merge commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, fixed.
Just a few general thoughts: About the hg reverse mapping: In some ideal world, it would either append or prepend and be easily extractible for the future. Also, you might want to change the verbiage from "translate" to "update paths" or something, as this will make it more clear to folks running and reading the script what's going on. You might also run flake8 (the thing we used to lint Talkilla python stuff) before landing so that we have a single coherent style in the script. |
As discussed on irc, it appends with
Fixed
Done and fixed to the standard flake8 defaults. |
…tandalone content into the loop-client git repo. r=natim,dmose
All comments addressed, merging. |
Bug 1050131 Write a script to auto-extract from mozilla-central the standalone content into the loop-client git repo. r=natim,dmose
No description provided.