Patchwork D8169: tests: use new, use-case-specific methods from merge module

login
register
mail settings
Submitter phabricator
Date Feb. 26, 2020, 7:14 p.m.
Message ID <differential-rev-PHID-DREV-qws34oqufi75nyslbkdu-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/45349/
State Superseded
Headers show

Comments

phabricator - Feb. 26, 2020, 7:14 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8169

AFFECTED FILES
  mercurial/hg.py
  tests/test-revlog-ancestry.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel
phabricator - Feb. 27, 2020, 7:45 a.m.
pulkit added inline comments.

INLINE COMMENTS

> hg.py:1144
>      unresolved conflicts."""
> -    stats = mergemod.merge(repo[node], force=force, labels=labels,)
> +    stats = mergemod.merge(repo[node], force=force, labels=labels)
>      _showstats(repo, stats)

This seems like unrelated change, I guess it should be part of previous patch.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8169/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8169

To: martinvonz, #hg-reviewers
Cc: pulkit, mercurial-devel
phabricator - Feb. 27, 2020, 4:36 p.m.
martinvonz added a comment.


  Moved formatting fix to parent patch

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8169/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8169

To: martinvonz, #hg-reviewers
Cc: pulkit, mercurial-devel

Patch

diff --git a/tests/test-revlog-ancestry.py b/tests/test-revlog-ancestry.py
--- a/tests/test-revlog-ancestry.py
+++ b/tests/test-revlog-ancestry.py
@@ -25,11 +25,11 @@ 
 
 
 def update(rev):
-    merge.update(repo, rev, branchmerge=False, force=True)
+    merge.clean_update(repo[rev])
 
 
 def merge_(rev):
-    merge.update(repo, rev, branchmerge=True, force=False)
+    merge.merge(repo[rev])
 
 
 if __name__ == '__main__':
diff --git a/mercurial/hg.py b/mercurial/hg.py
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -1141,7 +1141,7 @@ 
 ):
     """Branch merge with node, resolving changes. Return true if any
     unresolved conflicts."""
-    stats = mergemod.merge(repo[node], force=force, labels=labels,)
+    stats = mergemod.merge(repo[node], force=force, labels=labels)
     _showstats(repo, stats)
     if stats.unresolvedcount:
         repo.ui.status(