Patchwork D6411: absorb: fix interactive mode I didn't know existed

login
register
mail settings
Submitter phabricator
Date May 20, 2019, 9:36 p.m.
Message ID <8ed8c1629abc4299631d0cc9cf1a31ce@localhost.localdomain>
Download mbox | patch
Permalink /patch/40159/
State Not Applicable
Headers show

Comments

phabricator - May 20, 2019, 9:36 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG86f17fc31aa8: absorb: fix interactive mode I didn&#039;t know existed (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6411?vs=15200&id=15202

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

AFFECTED FILES
  hgext/absorb.py
  tests/test-absorb.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-absorb.t b/tests/test-absorb.t
--- a/tests/test-absorb.t
+++ b/tests/test-absorb.t
@@ -399,6 +399,23 @@ 
   
   1 changesets affected
   99b4ae7 foo
+  $ hg absorb --dry-run --interactive --print-changes
+  diff -r 99b4ae712f84 foo.py
+  1 hunks, 1 lines changed
+  examine changes to 'foo.py'? [Ynesfdaq?] y
+  
+  @@ -1,1 +1,1 @@
+  -
+  +bla
+  record this change to 'foo.py'? [Ynesfdaq?] y
+  
+  showing changes for foo.py
+          @@ -0,1 +0,1 @@
+  99b4ae7 -
+  99b4ae7 +bla
+  
+  1 changesets affected
+  99b4ae7 foo
   $ hg absorb --apply-changes
   1 of 1 chunk(s) applied
   $ hg diff -c .
diff --git a/hgext/absorb.py b/hgext/absorb.py
--- a/hgext/absorb.py
+++ b/hgext/absorb.py
@@ -935,7 +935,7 @@ 
     if opts.get('interactive'):
         diff = patch.diff(repo, stack[-1].node(), targetctx.node(), matcher)
         origchunks = patch.parsepatch(diff)
-        chunks = cmdutil.recordfilter(ui, origchunks)[0]
+        chunks = cmdutil.recordfilter(ui, origchunks, matcher)[0]
         targetctx = overlaydiffcontext(stack[-1], chunks)
     fm = None
     if opts.get('print_changes') or not opts.get('apply_changes'):