Changeset 679381247dc8…
Parent 6cdd04ab5631…
by
Changes to one file · Browse files at 679381247dc8 Showing diff from parent 6cdd04ab5631 Diff from another changeset...
@@ -1160,12 +1160,22 @@
return orig(ui, repo, *pats, **opts)
-# Calling purge with --all will cause the kbfiles to be deleted, but doesn't
-# re-populate them. We must do it explicitly. It doesn't hurt anything to
-# be safe and update them the rest of the time after calling purge, either.
+# Calling purge with --all will cause the kbfiles to be deleted.
+# Override repo.status to prevent this from happening.
def override_purge(orig, ui, repo, *dirs, **opts):
+ oldstatus = repo.status
+ def override_status(node1='.', node2=None, match=None, ignored=False,
+ clean=False, unknown=False, listsubrepos=False):
+ r = oldstatus(node1, node2, match, ignored, clean, unknown,
+ listsubrepos)
+ bfdirstate = bfutil.open_bfdirstate(ui, repo)
+ modified, added, removed, deleted, unknown, ignored, clean = r
+ unknown = [f for f in unknown if bfdirstate[f] == '?']
+ ignored = [f for f in ignored if bfdirstate[f] == '?']
+ return modified, added, removed, deleted, unknown, ignored, clean
+ repo.status = override_status
orig(ui, repo, *dirs, **opts)
- bfcommands.update_bfiles(repo.ui, repo)
+ repo.status = oldstatus
def uisetup(ui):
# Disable auto-status for some commands which assume that all
|
Loading...