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