mnauw / git-remote-hg

Transparent bidirectional bridge between Git and Mercurial for Git
GNU General Public License v2.0
62 stars 5 forks source link

`main.t` test `23 - remote big push force` fails with git 2.35.1 #48

Closed pabs3 closed 2 years ago

pabs3 commented 2 years ago

Forwarding Debian git-remote-hg#1006038.

In Debian, upgrading from git 1:2.34.1-1 in Debian bookworm to git 1:2.35.1-1 in Debian unstable causes main.t test 23 - remote big push force to fail. Switching back to git 1:2.34.1-1 makes it work again.

This is the log from that failure in verbose mode:

expecting success: 
    test_when_finished "rm -rf hgrepo gitrepo*" &&

    setup_big_push

    (
    cd gitrepo &&

    if test "$CAPABILITY_PUSH" = "t"
    then
        check_push 0 --force --all <<-\EOF
        master:forced-update
        good_bmark:forced-update
        branches/good_branch:forced-update
        new_bmark:new
        branches/new_branch:new
        bad_bmark1:forced-update
        bad_bmark2:forced-update
        branches/bad_branch:forced-update
        EOF
    else
        check_push 0 --force --all <<-\EOF
        master
        good_bmark
        branches/good_branch
        new_bmark:new
        branches/new_branch:new
        bad_bmark1:forced-update
        bad_bmark2:forced-update
        branches/bad_branch:forced-update
        EOF
    fi
    ) &&

    check_branch hgrepo default six &&
    check_branch hgrepo good_branch eight &&
    check_branch hgrepo bad_branch nine &&
    check_branch hgrepo new_branch ten &&
    check_bookmark hgrepo good_bmark three &&
    check_bookmark hgrepo bad_bmark1 four &&
    check_bookmark hgrepo bad_bmark2 five &&
    check_bookmark hgrepo new_bmark six

Cloning into 'gitrepo'...
WARNING: capability_push is disabled, only do so when really sure
WARNING: various enhanced features might fail in subtle ways
adding changesets
adding manifests
adding file changes
adding remote bookmark bad_bmark1
adding remote bookmark bad_bmark2
adding remote bookmark good_bmark
added 4 changesets with 4 changes to 1 files
new changesets 6d7a5bc6993c:5b7d9dcafec0
progress revision walk 'bookmarks/master' (1/1)
progress revision 0 'master' (0/2)
progress revision 2 'bad_branch' (0/2)
HEAD is now at 284b5c6 zero
HEAD is now at 284b5c6 zero
HEAD is now at 6bb95b0 good branch
WARNING: capability_push is disabled, only do so when really sure
WARNING: various enhanced features might fail in subtle ways
no changes found
searching for changes
adding changesets
adding manifests
adding file changes
added 9 changesets with 9 changes to 1 files (+7 heads)
To hg::test/trash directory.main/tmp/hgrepo
 + 2377e89...85b16bc branches/bad_branch -> branches/bad_branch (forced update)
   6bb95b0..f00fc03  branches/good_branch -> branches/good_branch
 + a322050...cf5f1c9 bad_bmark1 -> bad_bmark1 (forced update)
 + a322050...1eb0be9 bad_bmark2 -> bad_bmark2 (forced update)
   a322050..aeafffd  good_bmark -> good_bmark
   a322050..5ecae6c  master -> master
 * [new branch]      branches/new_branch -> branches/new_branch
 * [new branch]      new_bmark -> new_bmark
   a322050..5ecae6c  master -> master
   a322050..aeafffd  good_bmark -> good_bmark
   6bb95b0..f00fc03  branches/good_branch -> branches/good_branch
 * [new branch]      new_bmark -> new_bmark
 * [new branch]      branches/new_branch -> branches/new_branch
 + a322050...cf5f1c9 bad_bmark1 -> bad_bmark1 (forced update)
 + a322050...1eb0be9 bad_bmark2 -> bad_bmark2 (forced update)
 + 2377e89...85b16bc branches/bad_branch -> branches/bad_branch (forced update)
--- expected    2022-02-20 07:09:15.389175133 +0000
+++ actual  2022-02-20 07:09:15.641175789 +0000
@@ -1 +1 @@
-six
+four
not ok 23 - remote big push force
#   
#       test_when_finished "rm -rf hgrepo gitrepo*" &&
#   
#       setup_big_push
#   
#       (
#       cd gitrepo &&
#   
#       if test "$CAPABILITY_PUSH" = "t"
#       then
#           check_push 0 --force --all <<-\EOF
#           master:forced-update
#           good_bmark:forced-update
#           branches/good_branch:forced-update
#           new_bmark:new
#           branches/new_branch:new
#           bad_bmark1:forced-update
#           bad_bmark2:forced-update
#           branches/bad_branch:forced-update
#           EOF
#       else
#           check_push 0 --force --all <<-\EOF
#           master
#           good_bmark
#           branches/good_branch
#           new_bmark:new
#           branches/new_branch:new
#           bad_bmark1:forced-update
#           bad_bmark2:forced-update
#           branches/bad_branch:forced-update
#           EOF
#       fi
#       ) &&
#   
#       check_branch hgrepo default six &&
#       check_branch hgrepo good_branch eight &&
#       check_branch hgrepo bad_branch nine &&
#       check_branch hgrepo new_branch ten &&
#       check_bookmark hgrepo good_bmark three &&
#       check_bookmark hgrepo bad_bmark1 four &&
#       check_bookmark hgrepo bad_bmark2 five &&
#       check_bookmark hgrepo new_bmark six
#   
mnauw commented 2 years ago

Looks like that particular check can trigger spuriously based on implementation-defined changes.

pabs3 commented 2 years ago

Thanks for the fix. Would you mind making a new release for this?

-- bye, pabs

https://bonedaddy.net/pabs3/

mnauw commented 2 years ago

It has been a while indeed, so now is as good a time as any. Release/tag pushed (and also uploaded to pypi).

pabs3 commented 2 years ago

Great, thanks. I'll upload it to Debian.

-- bye, pabs

https://bonedaddy.net/pabs3/