Last active
November 18, 2015 07:56
-
-
Save FMCorz/a5a7bad419ce9b296f81 to your computer and use it in GitHub Desktop.
Using MDK as a module to fetch a branch from the tracker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import mdk | |
from mdk.tools import parseBranch | |
from mdk.moodle import Moodle | |
from mdk.fetch import FetchTracker | |
logging.basicConfig(format='%(message)s', level=logging.DEBUG) | |
M = Moodle('/home/fred/www/repositories/sm/moodle', 'sm') | |
# mdl = parseBranch(M.currentBranch())['issue'] | |
mdl = 'MDL-52119' | |
f = FetchTracker(M) | |
f.setFromTracker(mdl, M.get('branch')) | |
f.fetch() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import sys | |
from mdk.moodle import Moodle | |
from mdk.fetch import FetchTracker | |
logging.basicConfig(format='%(message)s', level=logging.DEBUG) | |
M = Moodle('/home/fred/www/repositories/sm/moodle', 'sm') | |
mdl = 'MDL-' + sys.argv[1] | |
branch = sys.argv[2] | |
f = FetchTracker(M) | |
f.setFromTracker(mdl, sys.argv[2]) | |
print f.getPullInfo(mdl) | |
f.fetch() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment