@@ -44,16 +44,6 @@ def call_fxn(*args, **kwargs):
44
44
return decorated_fxn
45
45
46
46
47
- def mq_patches_applied ():
48
- """Check if there are any applied MQ patches."""
49
- cmd = 'hg qapplied'
50
- with subprocess .Popen (cmd .split (),
51
- stdout = subprocess .PIPE ,
52
- stderr = subprocess .PIPE ) as st :
53
- bstdout , _ = st .communicate ()
54
- return st .returncode == 0 and bstdout
55
-
56
-
57
47
def get_git_branch ():
58
48
"""Get the symbolic name for the current git branch"""
59
49
cmd = "git rev-parse --abbrev-ref HEAD" .split ()
@@ -98,16 +88,8 @@ def get_base_branch():
98
88
@status ("Getting the list of files that have been added/changed" ,
99
89
info = lambda x : n_files_str (len (x )))
100
90
def changed_files (base_branch = None ):
101
- """Get the list of changed or added files from Mercurial or git."""
102
- if os .path .isdir (os .path .join (SRCDIR , '.hg' )):
103
- if base_branch is not None :
104
- sys .exit ('need a git checkout to check PR status' )
105
- cmd = 'hg status --added --modified --no-status'
106
- if mq_patches_applied ():
107
- cmd += ' --rev qparent'
108
- with subprocess .Popen (cmd .split (), stdout = subprocess .PIPE ) as st :
109
- filenames = [x .decode ().rstrip () for x in st .stdout ]
110
- elif os .path .exists (os .path .join (SRCDIR , '.git' )):
91
+ """Get the list of changed or added files from git."""
92
+ if os .path .exists (os .path .join (SRCDIR , '.git' )):
111
93
# We just use an existence check here as:
112
94
# directory = normal git checkout/clone
113
95
# file = git worktree directory
@@ -129,7 +111,7 @@ def changed_files(base_branch=None):
129
111
filename = filename .split (' -> ' , 2 )[1 ].strip ()
130
112
filenames .append (filename )
131
113
else :
132
- sys .exit ('need a Mercurial or git checkout to get modified files' )
114
+ sys .exit ('need a git checkout to get modified files' )
133
115
134
116
filenames2 = []
135
117
for filename in filenames :
0 commit comments