326 |
@property |
@property |
327 |
def svn_author(self): |
def svn_author(self): |
328 |
if not hasattr(self, '_svn_author'): |
if not hasattr(self, '_svn_author'): |
329 |
p = subprocess.Popen(['svn', 'log', '-q', "--", self.path], stdout=subprocess.PIPE, close_fds=True) |
try: |
330 |
contents = p.stdout.read().strip("\n").splitlines() |
contents = subprocess.check_output(['svn', 'log', '-q', "--", self.path], close_fds=True).strip("\n").splitlines() |
331 |
ecode = p.wait() |
|
|
if ecode == 0: |
|
332 |
for line in contents: |
for line in contents: |
333 |
if ' | ' not in line: |
if ' | ' not in line: |
334 |
continue |
continue |
336 |
fields = line.split(' | ') |
fields = line.split(' | ') |
337 |
if len(fields) >= 3: |
if len(fields) >= 3: |
338 |
self._svn_author = fields[1] |
self._svn_author = fields[1] |
339 |
|
except subprocess.CalledProcessError: |
340 |
|
pass |
341 |
|
|
342 |
if not hasattr(self, '_svn_author'): |
if not hasattr(self, '_svn_author'): |
343 |
return None |
return None |
364 |
def get_downstream_names(): |
def get_downstream_names(): |
365 |
re_file = re.compile(r'^(?P<module>.*?)[_-](?:(?P<oldversion>([0-9]+[\.])*[0-9]+)-)?(?P<version>([0-9]+[\.\-])*[0-9]+)\.(?P<format>(?:tar\.|diff\.)?[a-z][a-z0-9]*)$') |
re_file = re.compile(r'^(?P<module>.*?)[_-](?:(?P<oldversion>([0-9]+[\.])*[0-9]+)-)?(?P<version>([0-9]+[\.\-])*[0-9]+)\.(?P<format>(?:tar\.|diff\.)?[a-z][a-z0-9]*)$') |
366 |
|
|
367 |
p = subprocess.Popen(['urpmf', '--files', '.', "--media", MEDIA], stdout=subprocess.PIPE, close_fds=True) |
contents = subprocess.check_output(['urpmf', '--files', '.', "--media", MEDIA], close_fds=True).strip("\n").splitlines() |
|
contents = p.stdout.read().strip("\n").splitlines() |
|
|
ecode = p.wait() |
|
|
if ecode != 0: |
|
|
sys.exit(1) |
|
368 |
|
|
369 |
FILES = {} |
FILES = {} |
370 |
TARBALLS = {} |
TARBALLS = {} |
417 |
|
|
418 |
matches = upstream & set(downstream.keys()) |
matches = upstream & set(downstream.keys()) |
419 |
for module in matches: |
for module in matches: |
420 |
print "\n".join(downstream[module]) |
print "\n".join(sorted(downstream[module])) |
421 |
|
|
422 |
def cmd_patches(options, parser): |
def cmd_patches(options, parser): |
423 |
upstream = get_upstream_names() |
upstream = get_upstream_names() |