equal
deleted
inserted
replaced
1080 self.ui.warn(_(b"patch %s is empty\n") % patchname) |
1080 self.ui.warn(_(b"patch %s is empty\n") % patchname) |
1081 patcherr, files, fuzz = 0, [], 0 |
1081 patcherr, files, fuzz = 0, [], 0 |
1082 |
1082 |
1083 if merge and files: |
1083 if merge and files: |
1084 # Mark as removed/merged and update dirstate parent info |
1084 # Mark as removed/merged and update dirstate parent info |
1085 with repo.dirstate.parentchange(): |
1085 with repo.dirstate.parentchange(repo): |
1086 for f in files: |
1086 for f in files: |
1087 repo.dirstate.update_file_p1(f, p1_tracked=True) |
1087 repo.dirstate.update_file_p1(f, p1_tracked=True) |
1088 p1 = repo.dirstate.p1() |
1088 p1 = repo.dirstate.p1() |
1089 repo.setparents(p1, merge) |
1089 repo.setparents(p1, merge) |
1090 |
1090 |
1828 |
1828 |
1829 tobackup = set(a + m + r) & tobackup |
1829 tobackup = set(a + m + r) & tobackup |
1830 if keepchanges and tobackup: |
1830 if keepchanges and tobackup: |
1831 raise error.Abort(_(b"local changes found, qrefresh first")) |
1831 raise error.Abort(_(b"local changes found, qrefresh first")) |
1832 self.backup(repo, tobackup) |
1832 self.backup(repo, tobackup) |
1833 with repo.dirstate.parentchange(): |
1833 with repo.dirstate.parentchange(repo): |
1834 for f in a: |
1834 for f in a: |
1835 repo.wvfs.unlinkpath(f, ignoremissing=True) |
1835 repo.wvfs.unlinkpath(f, ignoremissing=True) |
1836 repo.dirstate.update_file( |
1836 repo.dirstate.update_file( |
1837 f, p1_tracked=False, wc_tracked=False |
1837 f, p1_tracked=False, wc_tracked=False |
1838 ) |
1838 ) |
1986 files.update(x) |
1986 files.update(x) |
1987 match = scmutil.matchfiles(repo, files) |
1987 match = scmutil.matchfiles(repo, files) |
1988 |
1988 |
1989 bmlist = repo[top].bookmarks() |
1989 bmlist = repo[top].bookmarks() |
1990 |
1990 |
1991 with repo.dirstate.parentchange(): |
1991 with repo.dirstate.parentchange(repo): |
1992 # XXX do we actually need the dirstateguard |
1992 # XXX do we actually need the dirstateguard |
1993 dsguard = None |
1993 dsguard = None |
1994 try: |
1994 try: |
1995 dsguard = dirstateguard.dirstateguard(repo, b'mq.refresh') |
1995 dsguard = dirstateguard.dirstateguard(repo, b'mq.refresh') |
1996 if diffopts.git or diffopts.upgrade: |
1996 if diffopts.git or diffopts.upgrade: |