diff -r 336a614f35a3 Tools/scripts/patchcheck.py --- a/Tools/scripts/patchcheck.py Sun Feb 19 10:17:30 2012 -0500 +++ b/Tools/scripts/patchcheck.py Sun Feb 19 19:22:08 2012 +0100 @@ -36,6 +36,21 @@ return decorated_fxn +def mq_changed_files(): + """Get the files that changed due mq applied patches. + + For more information see: hg help qdiff + """ + files = [] + cmd = 'hg qdiff' + with subprocess.Popen(cmd.split(), stdout=subprocess.PIPE) as st: + for x in st.stdout: + line = x.decode().rstrip() + if line.startswith('diff -r'): + files.append(line.split()[-1]) + return files + + @status("Getting the list of files that have been added/changed", info=lambda x: n_files_str(len(x))) def changed_files(): @@ -43,9 +58,13 @@ if not os.path.isdir(os.path.join(SRCDIR, '.hg')): sys.exit('need a checkout to get modified files') + files = [] cmd = 'hg status --added --modified --no-status' with subprocess.Popen(cmd.split(), stdout=subprocess.PIPE) as st: - return [x.decode().rstrip() for x in st.stdout] + files += [x.decode().rstrip() for x in st.stdout] + + files += mq_changed_files() + return files def report_modified_files(file_paths):