Page MenuHomePhabricator

Cannot push to gerrit
Closed, ResolvedPublic

Description

I made changes to MediaWiki/core to complete T248219. I created a new branch and pushed my changes but got the following error..

Do you really want to submit the above commits?
Type 'yes' to confirm, other to cancel: yes
Username for 'https://gerrit.wikimedia.org': gbahdeyboh
Password for 'https://gbahdeyboh@gerrit.wikimedia.org': 
remote: 
remote: Processing changes: refs: 1
remote: Processing changes: refs: 1, done            
remote: ERROR: Implicit Merge of c96b4e1 installer: Fix warningBox arguments in WebInstallerRestart        
remote: ERROR: Implicit Merge of 9feb181 Turn PasswordReset into a service        
remote: ERROR: Implicit Merge of 78e381a Drop HHVM support from MediaWiki        
remote: ERROR: Implicit Merge of 865ac3b Drop strings for wgExternalDiffEngine, deprecated in 1.27 and 1.32        
remote: ERROR: Implicit Merge of 0785acc Merge "Turn PasswordReset into a service" into REL1_34        
remote: ERROR: Implicit Merge of fef192f Merge "Drop strings for wgExternalDiffEngine, deprecated in 1.27 and 1.32" into REL1_34        
remote: ERROR: Implicit Merge of 21a8c90 Include REL1_34 submodules and default settings        
remote: ERROR: Implicit Merge of 755ac5f Services: Convert PermissionManager's static to a const now HHVM is gone        
remote: ERROR: Implicit Merge of 571d305 Services: Convert BlockManager's static to a const now HHVM is gone        
remote: ERROR: Implicit Merge of 716dea9 Merge "Services: Convert BlockManager's static to a const now HHVM is gone" into REL1_34        
remote: ERROR: Implicit Merge of f6633d9 Services: Convert BlobStoreFactory's static to a const now HHVM is gone        
remote: ERROR: Implicit Merge of 29bee07 Optionally require both username and email for password resets        
remote: ERROR: Implicit Merge of 8e0ef3e Services: Convert PasswordReset's static to a const now HHVM is gone        
remote: ERROR: Implicit Merge of fadd327 Make LocalisationCache a service        
remote: ERROR: Implicit Merge of 101493a Services: Convert LocalisationCache's static to a const now HHVM is gone        
remote: ERROR: Implicit Merge of d912ae3 Services: Convert DefaultPreferencesFactory's static to a const now HHVM is gone        
remote: ERROR: Implicit Merge of 96fa73b Disable flaky Selenium test        
remote: ERROR: Implicit Merge of 3bf40e4 Merge "Services: Convert DefaultPreferencesFactory's static to a const now HHVM is gone" into REL1_34        
remote: ERROR: Implicit Merge of 29c25bb Merge "Make LocalisationCache a service" into REL1_34        
remote: ERROR: Implicit Merge of 5444a96 Merge "Services: Convert LocalisationCache's static to a const now HHVM is gone" into REL1_34        
remote: ERROR: Implicit Merge of d60849c Merge "Disable flaky Selenium test" into REL1_34        
remote: ERROR: Implicit Merge of 4bfbf2c Add optional serialization_type and hmac_key param values to RESTBagOStuff        
remote: ERROR: Implicit Merge of 6d5d0c9 HHVM removal: Deprecate and simplify wfIsHHVM()        
remote: ERROR: Implicit Merge of e3537bd Split some Language methods to LanguageNameUtils        
remote: ERROR: Implicit Merge of c8987d7 Services: Convert MWLBFactory's static to a const now HHVM is gone        
remote: ERROR: Implicit Merge of 8c653ee Merge "Split some Language methods to LanguageNameUtils" into REL1_34        
remote: ERROR: Implicit Merge of f8255e8 Update git submodules        
remote: ERROR: Implicit Merge of 2adcdd3 Update git submodules        
remote: ERROR: Implicit Merge of 377a5bd objectcache: Log debug message for backend of WANObjectCache        
remote: ERROR: Implicit Merge of 57f7e67 composer: Correct PHP version requirement from 7.0 to 7.2 once CI lets us        
remote: ERROR: Implicit Merge of bb2e73c Merge "composer: Correct PHP version requirement from 7.0 to 7.2 once CI lets us" into REL1_34        
remote: ERROR: Implicit Merge of dbba623 Set minimum PHP version to 7.2.9        
remote: ERROR: Implicit Merge of c1ac4b2 objectcache: Deprecate ObjectCache::getWANInstance        
remote: ERROR: Implicit Merge of 56f171b NameTableStore: ensure consistency upon rollback.        
remote: ERROR: Implicit Merge of b2e1af5 Merge "NameTableStore: ensure consistency upon rollback." into REL1_34        
remote: ERROR: Implicit Merge of 33415e2 Follow-up Ifa346c8a92: LanguageNameUtils: CONSTRUCTOR_OTPIONS, not constructorOptions        
remote: ERROR: Implicit Merge of 029efe3 Update git submodules        
remote: ERROR: Implicit Merge of 12216dc objectcache: Log debug message for backend of MainObjectStash        
remote: ERROR: Implicit Merge of 79541e1 Session: Remove mcrypt support, dropped from PHP 7.2        
remote: ERROR: Implicit Merge of 3c2e8a0 composer.json: Recommend OpenSSL        
remote: ERROR: Implicit Merge of b1972f3 Run executeGenderCacheFromResultWrapper with titles in prop=linkshere        
remote: ERROR: Implicit Merge of 9e232de Update CREDITS ahead of 1.34.0 release via updateCredits        
remote: ERROR: Implicit Merge of 824ecd9 Tweaks to RELEASE-NOTES needed before tagging 1.34.0-rc.0        
remote: ERROR: Implicit Merge of 88e3a88 rdbms: Restore debug toolbar "Queries" feature        
remote: ERROR: Implicit Merge of 9717609 Setup RELEASE-NOTES for commits after 1.34.0-rc.0        
remote: ERROR: Implicit Merge of 366bf66 profiler: Deprecate ProfilerOutputDb and profileinfo.php        
remote: ERROR: Implicit Merge of 73ef860 localisation: Log debug message for backend of MessageCache        
remote: ERROR: Implicit Merge of cc8da2d Update git submodules        
remote: ERROR: Implicit Merge of dbac27b Fix example Kask configuration in RESTBagOStuff class comment        
remote: ERROR: Implicit Merge of dc7511b Don't apply styling for Special:Contributions on other pages        
remote: ERROR: Implicit Merge of 8eb5df6 Update git submodules        
remote: ERROR: Implicit Merge of 17d8a57 session: Add debug message for the used store class        
remote: ERROR: Implicit Merge of 81aa6d7 Use varargs for MessageLocalizer::msg and similar        
remote: ERROR: Implicit Merge of 248b7e2 Use real variargs for variadic methods        
remote: ERROR: Implicit Merge of fe7a8d9 PPFrame: Use explicit varargs in method parameters        
remote: ERROR: Implicit Merge of 13d176d Use splat operator in signature, not func_get_args        
remote: ERROR: Implicit Merge of 5ff92cd BaseTemplate: Use explicit varargs in method parameters        
remote: ERROR: Implicit Merge of e65f8ac build: Upgrade mediawiki-codesniffer from 26.0.0 to 28.0.0        
remote: ERROR: Implicit Merge of 9ddd146 Revert "Parser: Add Title type hints"        
remote: ERROR: Implicit Merge of ba76dfd Deprecate setting Parser::mTitle to null        
remote: ERROR: Implicit Merge of de64366 Update RELEASE-NOTES-1.34 for various backports        
remote: ERROR: Implicit Merge of 04cea76 Deprecate 'jquery.tabIndex' module        
remote: ERROR: Implicit Merge of 7afced6 resources: Collapse all jQuery UI modules into one deprecated mega-module        
remote: ERROR: Implicit Merge of c3cb10b Fix docs for GetUserBlock hooks        
remote: ERROR: Implicit Merge of e2509cb Merge "resources: Collapse all jQuery UI modules into one deprecated mega-module" into REL1_34        
remote: ERROR: Implicit Merge of 5c0938a Update git submodules        
remote: ERROR: Implicit Merge of be6e8ee Update git submodules        
remote: ERROR: Implicit Merge of d96006b Add release notes for discontinuation of IE6/7 support        
remote: ERROR: Implicit Merge of 2c565dc Parser: Hard deprecate getConverterLanguage        
remote: ERROR: Implicit Merge of e900893 Deprecate Parser implementation methods (will be private in next release)        
remote: ERROR: Implicit Merge of 0974c51 Deprecate Parser::areSubpagesAllowed() / Parser::maybeDoSubpageLink()        
remote: ERROR: Implicit Merge of ce81d00 Deprecate Parser::splitWhitespace() / Parser::createAssocArgs()        
remote: ERROR: Implicit Merge of a997803 Deprecate Parser::replaceLinkHolders / replaceLinkHoldersText        
remote: ERROR: Implicit Merge of 1383202 Deprecate additional public methods of Parser        
remote: ERROR: Implicit Merge of c58f4f9 Merge "Parser: Hard deprecate getConverterLanguage" into REL1_34        
remote: ERROR: Implicit Merge of 326d52f Disable $wgServer autodetection to prevent cache poisoning attacks        
remote: ERROR: Implicit Merge of 38420b3 Merge "Disable $wgServer autodetection to prevent cache poisoning attacks" into REL1_34        
remote: ERROR: Implicit Merge of f0dae32 Hard deprecate `$wgSysopEmailBans`        
remote: ERROR: Implicit Merge of 88905b2 Fix for ArticleRevisionViewCustom hook in DifferenceEngine.php        
remote: ERROR: Implicit Merge of 2524210 ParamValidator: Flag as unstable for 1.34        
remote: ERROR: Implicit Merge of 9c7f673 Do not insert page titles into querycache.qc_value        
remote: ERROR: Implicit Merge of 7ba1880 Update git submodules        
remote: ERROR: Implicit Merge of 62991fc Hard deprecate Parser::disableCache()        
remote: ERROR: Implicit Merge of 18b3c56 Update RELEASE-NOTES        
remote: ERROR: Implicit Merge of 6170b0c Bump $wgVersion 1.34.0-rc.1        
remote: ERROR: Implicit Merge of 8add810 Add section for changes after 1.34.0-rc.1        
remote: ERROR: Implicit Merge of 407d50c Add $wgDiffEngine        
remote: ERROR: Implicit Merge of 2dfeefe Storage: SqlBlobStore no longer needs Language object        
remote: ERROR: Implicit Merge of bea400c Update git submodules        
remote: ERROR: Implicit Merge of ccb2bb2 WikiExporter: Remove unnecessary check for SCHEMA_COMPAT_WRITE_OLD flag        
remote: ERROR: Implicit Merge of 8c60cd5 Set MCR migration stage to SCHEMA_COMPAT_NEW.        
remote: ERROR: Implicit Merge of 0c19ad3 Fix ''        
remote: ERROR: Implicit Merge of d94d7de Update RELEASE-NOTES-1.34 for backports        
remote: ERROR: Implicit Merge of 9579fb0 Make sure DBLoadBalancerFactory service is not disabled        
remote: ERROR: Implicit Merge of 90c1371 Fix support for HTTP/2 in MultiHttpClient        
remote: ERROR: Implicit Merge of 2f401c6 LocalisationCache: Don't instantiate ResourceLoader        
remote: ERROR: Implicit Merge of dc16647 Avoid using deprecated phpredis::delete() alias        
remote: ERROR: Implicit Merge of 0f334b3 Mark options as requiring parameters in addSite.php        
remote: ERROR: Implicit Merge of ff4d49a Mimic CURLOPT_POST in GuzzleHttpRequest        
remote: ERROR: Implicit Merge of c59be32 Update RELEASE-NOTES-1.34        
remote: ERROR: Implicit Merge of d3252c3 ApiEditPage: Test for bad redirect targets        
remote: ERROR: Implicit Merge of e17b9f4 Replace deprecated lSize with lLen        
remote: ERROR: Implicit Merge of 0a6ce0b SECURITY: Do not allow user scripts on Special:PasswordReset        
remote: ERROR: Implicit Merge of f0492a1 rdbms: Log debug message traces as 'exception.trace' instead of 'trace'        
remote: ERROR: Implicit Merge of c9c7e2e NewPagesPager: Fix namespace query conditions        
remote: ERROR: Implicit Merge of fbc41be media: Log and fail gracefully on invalid EXIF coordinates        
remote: ERROR: Implicit Merge of 3d47388 Update RELEASE-NOTES        
remote: ERROR: Implicit Merge of 9562419 Tests for an old PHP bug in parse_url        
remote: ERROR: Implicit Merge of 782ed1a RELEASE-NOTES-1.34: Add note for T212067 backport        
remote: ERROR: Implicit Merge of 29977eb Bump and prep 1.34.0        
remote: ERROR: Implicit Merge of ff037a9 Start 1.34.1        
remote: ERROR: Implicit Merge of 62b44d8 User: better error message when getActorId fails.        
remote: ERROR: Implicit Merge of 476413e Don't redefine MW_ENTRY_POINT in thumb.php if already defined        
remote: ERROR: Implicit Merge of f3bdd2f User: Allow newSystemUser() to create over anonymous actors        
remote: ERROR: Implicit Merge of 246edb9 Follow up 9ef34a2f1d0: fix NewPagesPager "hide registered users" option        
remote: ERROR: Implicit Merge of 347428e Remove space from strings        
remote: ERROR: Implicit Merge of ae6e0c0 Merge "Follow up 9ef34a2f1d0: fix NewPagesPager "hide registered users" option" into REL1_34        
remote: ERROR: Implicit Merge of df260af Update git submodules        
remote: ERROR: Implicit Merge of 54033e1 Update git submodules        
remote: ERROR: Implicit Merge of e782c29 mediawiki.language: Rename languageData back to languageNames        
remote: ERROR: Implicit Merge of e6e8f1e Update git submodules        
remote: ERROR: Implicit Merge of a235328 Use proper SemVer comparison in CheckComposerLockUpToDate        
remote: ERROR: Implicit Merge of 7713d37 Provide MW_VERSION and soft-deprecate global $wgVersion        
remote: ERROR: Implicit Merge of 23f99c4 updateCollation.php: fix PHP error        
remote: ERROR: Implicit Merge of 6046a49 The PHP Group stopped supporting 7.1 in late 2019        
remote: ERROR: Implicit Merge of 19e0ba1 Fix output of RecountCategories::doWork()        
remote: ERROR: Implicit Merge of 3a7be6f Add check for page existence        
remote: ERROR: Implicit Merge of 180e1b2 Update RELEASE-NOTES-1.34        
remote: ERROR: Implicit Merge of 5e55aee API: Fix fetching login token from action=query&meta=tokens on private wikis        
remote: ERROR: Implicit Merge of 0be3f1c build: Merge doc linting into 'npm test'        
remote: ERROR: Implicit Merge of 22612d4 Add one more to RELEASE-NOTES        
remote: ERROR: Implicit Merge of bb411f8 SECURITY: UserGroupMembership: Fix HTML escaping in #getLink        
remote: ERROR: Implicit Merge of 8305501 SECURITY: jquery.makeCollapsible: Escape user-generated CSS selectors        
remote: ERROR: Implicit Merge of 43fe3f2 SECURITY: Better controls for logout interface buttons        
remote: ERROR: Implicit Merge of 748c5ea Bump and prep 1.34.1        
remote: ERROR: Implicit Merge of d29905e Start 1.34.2        
remote: ERROR: Implicit Merge of 3e8aaaa Micro-task: Make a trivial change to tests/selenium/README.md file of mediawiki/core repository        
remote: Pushing to refs/publish/* is deprecated, use refs/for/* instead.        
To https://gerrit.wikimedia.org/r/mediawiki/core.git
 ! [remote rejected]       HEAD -> refs/publish/master/T248648 (implicit merges detected)
error: failed to push some refs to 'https://gerrit.wikimedia.org/r/mediawiki/core.git'

I'm not sure what might have caused this error because I rebased before pushing already

Event Timeline

You look to have made some sort of change ontop of REL1_34, and are trying to merge the whole branch into master...

@Reedy I created a new branch and committed my changes to that branch, what I am trying to push is the branch I newly created

git checkout -b branch_name`
git add .
git commit -m "commit message"
git review -R

Had you cloned and set a specific branch first? Or checked out a branch after?

It seems very odd that the number of commits listed above is exactly the number of commits on the REL1_34 branch, plus your commit on top

As of writing https://github.com/wikimedia/mediawiki/tree/REL1_34 says "This branch is 136 commits ahead, 3131 commits behind master.", and there is 137 remote: ERROR: Implicit Merge of above

What does git reflog say?

Aklapper added a subscriber: zeljkofilipin.

A full and complete list of commands would be welcome, starting with cloning.
Which exact tutorial (link) are you following? https://www.mediawiki.org/wiki/Gerrit/Tutorial ?
What is the output of git branch ?

@Reedy I've only cloned master, and I'm in the current branch I am trying to push.

git reflog outputs

gbahdeyboh@Gbahdeyboh:~/Desktop/programs/mediawiki$ git reflog
92141034c4 (HEAD -> T248648) HEAD@{0}: checkout: moving from REL1_34 to T248648
d6888384d0 (REL1_34) HEAD@{1}: commit: Micro-task: Create a simple test using Puppeteer
0302761588 HEAD@{2}: checkout: moving from T248648 to REL1_34
92141034c4 (HEAD -> T248648) HEAD@{3}: checkout: moving from REL1_34 to T248648
0302761588 HEAD@{4}: checkout: moving from T248648 to REL1_34
92141034c4 (HEAD -> T248648) HEAD@{5}: checkout: moving from REL1_34 to T248648
0302761588 HEAD@{6}: pull: Merge made by the 'recursive' strategy.
1f87a3541b HEAD@{7}: checkout: moving from T248648 to REL1_34
92141034c4 (HEAD -> T248648) HEAD@{8}: commit: Modified tests
531897a1c3 HEAD@{9}: rebase finished: returning to refs/heads/T248648
531897a1c3 HEAD@{10}: pull --rebase origin REL1_34: Micro-task: Micro-task: Created a simple test using Puppeteer
3e8aaaa85c HEAD@{11}: pull --rebase origin REL1_34: Micro-task: Make a trivial change to tests/selenium/README.md file of mediawiki/core repository
d29905ee34 (origin/REL1_34) HEAD@{12}: pull --rebase origin REL1_34: checkout d29905ee342c00661b1b9f019f74c7de1b1ec962
6d46f38992 HEAD@{13}: commit: Micro-task: Micro-task: Created a simple test using Puppeteer
1f87a3541b HEAD@{14}: checkout: moving from REL1_34 to T248648
1f87a3541b HEAD@{15}: commit: Micro-task: Make a trivial change to tests/selenium/README.md file of mediawiki/core repository
22612d499e HEAD@{16}: clone: from https://gerrit.wikimedia.org/r/mediawiki/core.

I tried to push to REL1_34 directly, and it went through with no errors, just the new branch I created doesn't push.

git checkout -b branch_name`
git add .
git commit -m "commit message"
git review -R

@Aklapper These are the commands I've ran so far...

I'm following the tutorial you shared, and git branch prints the name of my two branches REL1_34 and the one I created

I'm following the tutorial you shared, and git branch prints the name of my two branches REL1_34 and the one I created

It does look like you either ran a git checkout REL1_34 at some point, or you did a git clone that told it to check out REL1_34 at the same time. Then you created your branch ontop of REL1_34

Generally, you should be working from master

@Aklapper These are the commands I've ran so far...

That is very unlikely. I am very sure that you had to run git clone at some point.

22612d499e HEAD@{16}: clone: from https://gerrit.wikimedia.org/r/mediawiki/core.

clone: from https://gerrit.wikimedia.org/r/mediawiki/core. is not the same as
clone: from ssh://gbahdeyboh@gerrit.wikimedia.org:29418/mediawiki/core.git which I would have expected here.

I'm following the tutorial you shared, and git branch prints the name of my two branches REL1_34 and the one I created

It does look like you either ran a git checkout REL1_34 at some point, or you did a git clone that told it to check out REL1_34 at the same time. Then you created your branch ontop of REL1_34

Generally, you should be working from master

I only cloned mediawiki/core once. And I cloned only the REL1_34 branch.

I haven't cloned after then. I pulled updates from remote to REL1_34.

When I try to push to REL1_34, it goes through.

It's my first time using gerrit and I'm still trying to get used to it 🙂

I only cloned mediawiki/core once. And I cloned only the REL1_34 branch.

Did you do some sort of shallow clone? Otherwise that is not the case, you will have all branches locally...

What command are you using to "push"?

@Aklapper These are the commands I've ran so far...

That is very unlikely. I am very sure that you had to run git clone at some point.

22612d499e HEAD@{16}: clone: from https://gerrit.wikimedia.org/r/mediawiki/core.

clone: from https://gerrit.wikimedia.org/r/mediawiki/core. is not the same as
clone: from ssh://gbahdeyboh@gerrit.wikimedia.org:29418/mediawiki/core.git which I would have expected here.

Actually, the error had been the highlighted code.

I also just pulled from remote there, I'm wondering why it has HEAD@{16}: clone too

I only cloned mediawiki/core once. And I cloned only the REL1_34 branch.

Did you do some sort of shallow clone? Otherwise that is not the case, you will have all branches locally...

What command are you using to "push"?

True. I think I see where the issue is now.

I followed this.

It clones only the REL1_34 branch, so I don't have all branches locally.

I guess that's where the issue is.

Also, what git command were you trying before that didn’t work? What command did work?

git review -R gave that error in the branch I created and worked on REL1_34 branch

Yeah, so you obviously didn't follow the right section of the "Download from Git" page, which has a "Download for development" section

I do note it's not exactly clear in the ordering, so it's definitely not your own fault

https://www.mediawiki.org/wiki/Download_from_Git#Download needs updating/re-arranging IMHO. Either the comment above git clone https://gerrit.wikimedia.org/r/mediawiki/core.git --branch REL1_34 mediawiki, or moving into its own section

You should either follow some instructions like on https://stackoverflow.com/questions/6802145/how-to-convert-a-git-shallow-clone-to-a-full-clone or else follow https://www.mediawiki.org/wiki/Download_from_Git#Download_for_development (which may be easier and prevent these weird errors)

You can create a patch of your commit from your git repo, and then apply it to the new clone.. Or use something like git review -x 584079 to cherry pick this commit onto your new master, or a branch you've created from master

Or does git checkout master work fine?

I only cloned mediawiki/core once. And I cloned only the REL1_34 branch.

This is wrong. You should clone master branch. Instructions are here.

https://gerrit.wikimedia.org/r/admin/projects/mediawiki/core

I would suggest cloning via SSH. For me the command is:

git clone "ssh://zfilipin@gerrit.wikimedia.org:29418/mediawiki/core"

You'll have to replace zfilipin with your Gerrit username.

Yeah, so you obviously didn't follow the right section of the "Download from Git" page, which has a "Download for development" section

I do note it's not exactly clear in the ordering, so it's definitely not your own fault

https://www.mediawiki.org/wiki/Download_from_Git#Download needs updating/re-arranging IMHO. Either the comment above git clone https://gerrit.wikimedia.org/r/mediawiki/core.git --branch REL1_34 mediawiki, or moving into its own section

You should either follow some instructions like on https://stackoverflow.com/questions/6802145/how-to-convert-a-git-shallow-clone-to-a-full-clone or else follow https://www.mediawiki.org/wiki/Download_from_Git#Download_for_development (which may be easier and prevent these weird errors)

You can create a patch of your commit from your git repo, and then apply it to the new clone.. Or use something like git review -x 584079 to cherry pick this commit onto your new master, or a branch you've created from master

Yes! I should have paid more attention though. I just copied and pasted without actually checking.

Quite explanatory! Thanks a lot for the help @Reedy.

I'll make the changes and give feedback.

I only cloned mediawiki/core once. And I cloned only the REL1_34 branch.

This is wrong. You should clone master branch. Instructions are here.

https://gerrit.wikimedia.org/r/admin/projects/mediawiki/core

I would suggest cloning via SSH. For me the command is:

git clone "ssh://zfilipin@gerrit.wikimedia.org:29418/mediawiki/core"

You'll have to replace zfilipin with your Gerrit username.

Noted! I'll clone and send in a new patch.

Thanks @zeljkofilipin

Closing task as this seems to be resolved, in my understanding.

@Aklapper I don't think this is resolved yet. @Gbahdeyboh still did not push a commit to mediawiki/core master branch.

https://gerrit.wikimedia.org/r/q/owner:gbahdeybohbello%2540gmail.com

@Aklapper I don't think this is resolved yet. @Gbahdeyboh still did not push a commit to mediawiki/core master branch.

https://gerrit.wikimedia.org/r/q/owner:gbahdeybohbello%2540gmail.com

@zeljkofilipin, I just pushed. I think it's resolved now. I'm sorry it took a while, been a rough weekend.