Show More
@@ -2002,67 +2002,69 b' class queue(object):' | |||
|
2002 | 2002 | |
|
2003 | 2003 | bmlist = repo[top].bookmarks() |
|
2004 | 2004 | |
|
2005 | dsguard = None | |
|
2006 | try: | |
|
2007 | dsguard = dirstateguard.dirstateguard(repo, b'mq.refresh') | |
|
2008 | if diffopts.git or diffopts.upgrade: | |
|
2009 | copies = {} | |
|
2010 |
f |
|
|
2011 |
s |
|
|
2012 | # during qfold, the source file for copies may | |
|
2013 | # be removed. Treat this as a simple add. | |
|
2014 | if src is not None and src in repo.dirstate: | |
|
2015 | copies.setdefault(src, []).append(dst) | |
|
2016 |
repo.dirstate |
|
|
2017 | # remember the copies between patchparent and qtip | |
|
2018 | for dst in aaa: | |
|
2019 | src = ctx[dst].copysource() | |
|
2020 |
|
|
|
2021 |
|
|
|
2022 |
|
|
|
2023 | ) | |
|
2024 |
|
|
|
2025 |
|
|
|
2026 | # we can't copy a file created by the patch itself | |
|
2027 |
|
|
|
2028 | del copies[dst] | |
|
2029 |
f |
|
|
2030 |
|
|
|
2031 | repo.dirstate.copy(src, dst) | |
|
2032 | else: | |
|
2033 | for dst in a: | |
|
2034 |
|
|
|
2035 |
|
|
|
2036 |
|
|
|
2037 |
|
|
|
2038 | for f in r: | |
|
2039 |
repo.dirstate. |
|
|
2040 | # if the patch excludes a modified file, mark that | |
|
2041 | # file with mtime=0 so status can see it. | |
|
2042 | mm = [] | |
|
2043 | for i in pycompat.xrange(len(m) - 1, -1, -1): | |
|
2044 |
|
|
|
2045 | mm.append(m[i]) | |
|
2046 |
|
|
|
2047 | for f in m: | |
|
2048 | repo.dirstate.normal(f) | |
|
2049 |
for f in m |
|
|
2050 |
repo.dirstate.normal |
|
|
2051 |
for f in |
|
|
2052 |
repo.dirstate. |
|
|
2053 | ||
|
2054 | user = ph.user or ctx.user() | |
|
2055 | ||
|
2056 | oldphase = repo[top].phase() | |
|
2057 | ||
|
2058 | # assumes strip can roll itself back if interrupted | |
|
2059 | repo.setparents(*cparents) | |
|
2060 | self.applied.pop() | |
|
2061 | self.applieddirty = True | |
|
2062 | strip(self.ui, repo, [top], update=False, backup=False) | |
|
2063 | dsguard.close() | |
|
2064 | finally: | |
|
2065 |
|
|
|
2005 | with repo.dirstate.parentchange(): | |
|
2006 | # XXX do we actually need the dirstateguard | |
|
2007 | dsguard = None | |
|
2008 | try: | |
|
2009 | dsguard = dirstateguard.dirstateguard(repo, b'mq.refresh') | |
|
2010 | if diffopts.git or diffopts.upgrade: | |
|
2011 | copies = {} | |
|
2012 | for dst in a: | |
|
2013 | src = repo.dirstate.copied(dst) | |
|
2014 | # during qfold, the source file for copies may | |
|
2015 | # be removed. Treat this as a simple add. | |
|
2016 | if src is not None and src in repo.dirstate: | |
|
2017 | copies.setdefault(src, []).append(dst) | |
|
2018 | repo.dirstate.add(dst) | |
|
2019 | # remember the copies between patchparent and qtip | |
|
2020 | for dst in aaa: | |
|
2021 | src = ctx[dst].copysource() | |
|
2022 | if src: | |
|
2023 | copies.setdefault(src, []).extend( | |
|
2024 | copies.get(dst, []) | |
|
2025 | ) | |
|
2026 | if dst in a: | |
|
2027 | copies[src].append(dst) | |
|
2028 | # we can't copy a file created by the patch itself | |
|
2029 | if dst in copies: | |
|
2030 | del copies[dst] | |
|
2031 | for src, dsts in pycompat.iteritems(copies): | |
|
2032 | for dst in dsts: | |
|
2033 | repo.dirstate.copy(src, dst) | |
|
2034 | else: | |
|
2035 | for dst in a: | |
|
2036 | repo.dirstate.add(dst) | |
|
2037 | # Drop useless copy information | |
|
2038 | for f in list(repo.dirstate.copies()): | |
|
2039 | repo.dirstate.copy(None, f) | |
|
2040 | for f in r: | |
|
2041 | repo.dirstate.remove(f) | |
|
2042 | # if the patch excludes a modified file, mark that | |
|
2043 | # file with mtime=0 so status can see it. | |
|
2044 | mm = [] | |
|
2045 | for i in pycompat.xrange(len(m) - 1, -1, -1): | |
|
2046 | if not match1(m[i]): | |
|
2047 | mm.append(m[i]) | |
|
2048 | del m[i] | |
|
2049 | for f in m: | |
|
2050 | repo.dirstate.normal(f) | |
|
2051 | for f in mm: | |
|
2052 | repo.dirstate.normallookup(f) | |
|
2053 | for f in forget: | |
|
2054 | repo.dirstate.drop(f) | |
|
2055 | ||
|
2056 | user = ph.user or ctx.user() | |
|
2057 | ||
|
2058 | oldphase = repo[top].phase() | |
|
2059 | ||
|
2060 | # assumes strip can roll itself back if interrupted | |
|
2061 | repo.setparents(*cparents) | |
|
2062 | self.applied.pop() | |
|
2063 | self.applieddirty = True | |
|
2064 | strip(self.ui, repo, [top], update=False, backup=False) | |
|
2065 | dsguard.close() | |
|
2066 | finally: | |
|
2067 | release(dsguard) | |
|
2066 | 2068 | |
|
2067 | 2069 | try: |
|
2068 | 2070 | # might be nice to attempt to roll back strip after this |
General Comments 0
You need to be logged in to leave comments.
Login now