This is an archive of the discontinued Mercurial Phabricator instance.

status: extract active-merge state for reuse
ClosedPublic

Authored by rdamazio on Dec 14 2019, 12:49 AM.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

rdamazio created this revision.Dec 14 2019, 12:49 AM
rdamazio updated this revision to Diff 18845.Dec 18 2019, 12:17 AM
pulkit added a subscriber: pulkit.Dec 18 2019, 2:18 AM

This PR is doing more than one thing. I can see following independent things:

  • rename of inmergestate to activemerge
  • introduction of _formattedpaths which is used in next patch and not related to this one
  • what the commit message says

Can we split them up?

rdamazio retitled this revision from status: make morestatus call out unresolved conflicts after update to status: extract active-merge state for reuse.Dec 19 2019, 2:47 AM
rdamazio updated this revision to Diff 18875.

Can we split them up?

Done. Kept this review as the first of the chain.

pulkit accepted this revision.Dec 19 2019, 6:00 AM
This revision is now accepted and ready to land.Dec 19 2019, 6:00 AM

Amended the following in flight to make black happy:

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -879,11 +879,8 @@ def readmorestatus(repo):
     if activemerge:
         unresolved = sorted(mergestate.unresolved())
     return morestatus(
-        repo.root,
-        unfinishedop,
-        unfinishedmsg,
-        activemerge,
-        unresolved)
+        repo.root, unfinishedop, unfinishedmsg, activemerge, unresolved
+    )
 
 
 def findpossible(cmd, table, strict=False):
This revision was automatically updated to reflect the committed changes.