Patchwork D11714: tests: fix test-convert-git to work w/ "git pull" requiring strategy

login
register
mail settings
Submitter phabricator
Date Oct. 20, 2021, 5:55 p.m.
Message ID <differential-rev-PHID-DREV-rkpjasoh2imjqkbhszwv-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50038/
State Superseded
Headers show

Comments

phabricator - Oct. 20, 2021, 5:55 p.m.
spectral created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  A recent change to git (031e2f7ae195) made it an error to not specify a strategy
  (`--rebase`, `--no-rebase`, `--ff-only`), instead of just the warning it was
  previously. As far as I can tell, `--no-rebase` is the behavior we were getting
  before, and the only one that makes the test work.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  tests/test-convert-git.t

CHANGE DETAILS




To: spectral, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/test-convert-git.t b/tests/test-convert-git.t
--- a/tests/test-convert-git.t
+++ b/tests/test-convert-git.t
@@ -50,7 +50,7 @@ 
   $ echo a >> a
   $ commit -a -m t4.2
   $ git checkout master >/dev/null 2>/dev/null
-  $ git pull --no-commit . other > /dev/null 2>/dev/null
+  $ git pull --no-commit . other --no-rebase > /dev/null 2>/dev/null
   $ commit -m 'Merge branch other'
   $ cd ..
   $ hg convert --config extensions.progress= --config progress.assume-tty=1 \
@@ -137,7 +137,7 @@ 
   $ git add baz
   $ commit -a -m 'add baz'
   $ git checkout master >/dev/null 2>/dev/null
-  $ git pull --no-commit . Bar Baz > /dev/null 2>/dev/null
+  $ git pull --no-commit . Bar Baz --no-rebase > /dev/null 2>/dev/null
   $ commit -m 'Octopus merge'
   $ echo bar >> bar
   $ commit -a -m 'change bar'
@@ -145,7 +145,7 @@ 
   $ echo >> foo
   $ commit -a -m 'change foo'
   $ git checkout master >/dev/null 2>/dev/null
-  $ git pull --no-commit -s ours . Foo > /dev/null 2>/dev/null
+  $ git pull --no-commit -s ours . Foo --no-rebase > /dev/null 2>/dev/null
   $ commit -m 'Discard change to foo'
   $ cd ..
   $ glog()