##// END OF EJS Templates
mq: use field names instead of field numbers on scmutil.status...
Augie Fackler -
r44039:2d5b991c default
parent child Browse files
Show More
@@ -1251,16 +1251,19 b' class queue(object):'
1251 1251 return None, None
1252 1252
1253 1253 def putsubstate2changes(self, substatestate, changes):
1254 for files in changes[:3]:
1255 if b'.hgsubstate' in files:
1256 return # already listed up
1254 if isinstance(changes, list):
1255 mar = changes[:3]
1256 else:
1257 mar = (changes.modified, changes.added, changes.removed)
1258 if any((b'.hgsubstate' in files for files in mar)):
1259 return # already listed up
1257 1260 # not yet listed up
1258 1261 if substatestate in b'a?':
1259 changes[1].append(b'.hgsubstate')
1262 mar[1].append(b'.hgsubstate')
1260 1263 elif substatestate in b'r':
1261 changes[2].append(b'.hgsubstate')
1264 mar[2].append(b'.hgsubstate')
1262 1265 else: # modified
1263 changes[0].append(b'.hgsubstate')
1266 mar[0].append(b'.hgsubstate')
1264 1267
1265 1268 def checklocalchanges(self, repo, force=False, refresh=True):
1266 1269 excsuffix = b''
@@ -1377,8 +1380,9 b' class queue(object):'
1377 1380 else:
1378 1381 changes = self.checklocalchanges(repo, force=True)
1379 1382 commitfiles = list(inclsubs)
1380 for files in changes[:3]:
1381 commitfiles.extend(files)
1383 commitfiles.extend(changes.modified)
1384 commitfiles.extend(changes.added)
1385 commitfiles.extend(changes.removed)
1382 1386 match = scmutil.matchfiles(repo, commitfiles)
1383 1387 if len(repo[None].parents()) > 1:
1384 1388 raise error.Abort(_(b'cannot manage merge changesets'))
@@ -1818,7 +1822,8 b' class queue(object):'
1818 1822 if update:
1819 1823 qp = self.qparents(repo, rev)
1820 1824 ctx = repo[qp]
1821 m, a, r, d = repo.status(qp, b'.')[:4]
1825 st = repo.status(qp, b'.')
1826 m, a, r, d = st.modified, st.added, st.removed, st.deleted
1822 1827 if d:
1823 1828 raise error.Abort(_(b"deletions found between repo revs"))
1824 1829
@@ -1910,10 +1915,11 b' class queue(object):'
1910 1915 # and then commit.
1911 1916 #
1912 1917 # this should really read:
1913 # mm, dd, aa = repo.status(top, patchparent)[:3]
1918 # st = repo.status(top, patchparent)
1914 1919 # but we do it backwards to take advantage of manifest/changelog
1915 1920 # caching against the next repo.status call
1916 mm, aa, dd = repo.status(patchparent, top)[:3]
1921 st = repo.status(patchparent, top)
1922 mm, aa, dd = st.modified, st.added, st.removed
1917 1923 ctx = repo[top]
1918 1924 aaa = aa[:]
1919 1925 match1 = scmutil.match(repo[None], pats, opts)
@@ -1927,7 +1933,8 b' class queue(object):'
1927 1933 match1 = scmutil.match(repo[None], opts=opts)
1928 1934 else:
1929 1935 match = scmutil.matchall(repo)
1930 m, a, r, d = repo.status(match=match)[:4]
1936 stb = repo.status(match=match)
1937 m, a, r, d = stb.modified, stb.added, stb.removed, stb.deleted
1931 1938 mm = set(mm)
1932 1939 aa = set(aa)
1933 1940 dd = set(dd)
@@ -1966,7 +1973,8 b' class queue(object):'
1966 1973
1967 1974 # create 'match' that includes the files to be recommitted.
1968 1975 # apply match1 via repo.status to ensure correct case handling.
1969 cm, ca, cr, cd = repo.status(patchparent, match=match1)[:4]
1976 st = repo.status(patchparent, match=match1)
1977 cm, ca, cr, cd = st.modified, st.added, st.removed, st.deleted
1970 1978 allmatches = set(cm + ca + cr + cd)
1971 1979 refreshchanges = [x.intersection(allmatches) for x in (mm, aa, dd)]
1972 1980
General Comments 0
You need to be logged in to leave comments. Login now