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