Closed Bug 1863698 Opened 2 years ago Closed 1 month ago

`moz-phab uplift` doesn't work for central to esr115 uplifts in mozilla-unified

Categories

(Conduit :: moz-phab, defect)

defect

Tracking

(Not tracked)

RESOLVED INACTIVE

People

(Reporter: standard8, Unassigned)

References

(Blocks 1 open bug)

Details

moz-phab version (from moz-phab --version): 1.4.3
Python version (from python3 --version): 3.9.8
OS: Mac 13.6.1

This may be related to bug 1863690, however I did this with a clean repository.

STR

  1. Have a patch that you know is going to not apply cleanly on and esr.
  2. Have a clean mozilla-central repository with central checked out and your patch applied. The central has esr115 pulled into it as well.
  3. Run moz-phab uplift --train esr115

Expected Results

The uplift works.

Actual Results

The uplift fails with:

CommandError: command 'bookmark' failed to complete successfully
Run moz-phab again with '--trace' to show debugging output

hg wip shows:

`
% 762484:835bf94aad2d standard8 tip moz-phab_835bf94aad2d Bug 1861925 - Rename Yahoo! auctions per their branding>
| @ 762483:1dce5b49dd6b mbonardo esr115 Bug 1862694 - places.database.replaceDatabaseOnStartup is not reset if th>
| ~
o 684483:5d6699b34edc ncsoregi central Backed out changeset 149e69327bbb (bug 1746524) for causing gv-junit failu>


which looks like there's a bookmark there.

Deleting the bookmark, aborting the rebase and running the uplift with trace gives:

DEBUG 2023-11-08 10:17:49,836 MozPhab (1.4.3)
DEBUG 2023-11-08 10:17:49,836 found hg repo in /Users/mark/dev/mozilla-central
DEBUG 2023-11-08 10:17:49,950 $ hg config
DEBUG 2023-11-08 10:17:49,953 hg extensions: absorb, blackbox, evolve, firefoxtree, fsmonitor, histedit, push-to-try, rebase, shelve, show
DEBUG 2023-11-08 10:17:49,953 $ hg log -T '{node}\n' -r 'ancestors(.) and not public() and not obsolete()' --pager never
DEBUG 2023-11-08 10:17:50,101 835bf94aad2d78529050a892996c2b5c20d8c1ff
DEBUG 2023-11-08 10:17:50,101 $ hg log -T '{node}\n' -r . --pager never
DEBUG 2023-11-08 10:17:50,103 835bf94aad2d78529050a892996c2b5c20d8c1ff
DEBUG 2023-11-08 10:17:50,260 Initializing Glean...
DEBUG 2023-11-08 10:17:50,362 https://phabricator.services.mozilla.com/api/diffusion.repository.search {'constraints': {'shortNames': ['esr115']}, 'limit': 1}
DEBUG 2023-11-08 10:17:51,085 https://phabricator.services.mozilla.com/api/diffusion.repository.search {'constraints': {'projects': ['uplift']}}
DEBUG 2023-11-08 10:17:51,881 $ hg bookmark -T '{active} {bookmark}\n' --pager never
DEBUG 2023-11-08 10:17:51,898 $ hg id -q --pager never
DEBUG 2023-11-08 10:17:57,604 835bf94aad2d
DEBUG 2023-11-08 10:17:57,605 $ hg bookmark moz-phab_835bf94aad2d --pager never
DEBUG 2023-11-08 10:17:57,628 $ hg log -T '{rev}\n{node}\n{date|hgdate}\n{author|person}\n{author|email}\n{desc}--f87eb41ebbc54df59ca5ec870e857f80--\n' -r 835bf94aad2d::835bf94aad2d --pager never
DEBUG 2023-11-08 10:17:57,685 762484
835bf94aad2d78529050a892996c2b5c20d8c1ff
1699373406 0
Mark Banner
<email>
Bug 1861925 - Rename Yahoo! auctions per their branding. r?#search-reviewers!

Differential Revision: https://phabricator.services.mozilla.com/D192893--f87eb41ebbc54df59ca5ec870e857f80--

DEBUG 2023-11-08 10:17:57,685 $ hg log -T '{node}\n' -r 'children(835bf94aad2d78529050a892996c2b5c20d8c1ff)' --pager never
DEBUG 2023-11-08 10:17:57,709 $ hg identify -q -r esr115 --pager never
DEBUG 2023-11-08 10:17:57,725 1dce5b49dd6b
DEBUG 2023-11-08 10:17:57,725 $ hg log -r 'esr115:: and 835bf94aad2d::835bf94aad2d' -T '{node}\n' --pager never
DEBUG 2023-11-08 10:17:57,745 $ hg --config ui.message-output=stderr rebase -r 835bf94aad2d::835bf94aad2d -d esr115 --keep -T json --pager never
DEBUG 2023-11-08 10:18:48,390 $ hg bookmark -T '{bookmark}\n' --pager never
DEBUG 2023-11-08 10:18:48,447 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
DEBUG 2023-11-08 10:18:48,447
ERROR 2023-11-08 10:18:48,452 Traceback (most recent call last):
File "/opt/homebrew/lib/python3.9/site-packages/mozphab/mozphab.py", line 123, in main
args.func(repo, args)
File "/opt/homebrew/lib/python3.9/site-packages/mozphab/commands/uplift.py", line 77, in uplift
submit(repo, args)
File "/opt/homebrew/lib/python3.9/site-packages/mozphab/commands/submit.py", line 716, in submit
raise e
File "/opt/homebrew/lib/python3.9/site-packages/mozphab/commands/submit.py", line 707, in submit
_submit(repo, args)
File "/opt/homebrew/lib/python3.9/site-packages/mozphab/commands/submit.py", line 495, in _submit
avoid_local_changes = local_uplift_if_possible(args, repo, commits)
File "/opt/homebrew/lib/python3.9/site-packages/mozphab/commands/submit.py", line 470, in local_uplift_if_possible
commits = repo.uplift_commits(unified_head, commits)
File "/opt/homebrew/lib/python3.9/site-packages/mozphab/mercurial.py", line 740, in uplift_commits
out = self.hg_out(
File "/opt/homebrew/lib/python3.9/site-packages/mozphab/mercurial.py", line 199, in hg_out
out = self.repository.rawcommand(command, eh=error_handler)
File "/opt/homebrew/lib/python3.9/site-packages/hglib/client.py", line 258, in rawcommand
ret = self.runcommand(args, inchannels, outchannels)
File "/opt/homebrew/lib/python3.9/site-packages/hglib/client.py", line 198, in runcommand
writeblock(inchannelschannel)
File "/opt/homebrew/lib/python3.9/site-packages/hglib/client.py", line 180, in writeblock
self.server.stdin.write(data)
TypeError: a bytes-like object is required, not 'str'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/homebrew/lib/python3.9/site-packages/mozphab/mozphab.py", line 125, in main
repo.cleanup()
File "/opt/homebrew/lib/python3.9/site-packages/mozphab/mercurial.py", line 261, in cleanup
bookmarks = self.hg_out(["bookmark", "-T", "{bookmark}\n"])
File "/opt/homebrew/lib/python3.9/site-packages/mozphab/mercurial.py", line 199, in hg_out
out = self.repository.rawcommand(command, eh=error_handler)
File "/opt/homebrew/lib/python3.9/site-packages/hglib/client.py", line 265, in rawcommand
return eh(ret, out, err)
File "/opt/homebrew/lib/python3.9/site-packages/mozphab/mercurial.py", line 189, in error_handler
raise CommandError(
mozphab.exceptions.CommandError: command 'bookmark' failed to complete successfully

Have you seen similar behaviour on Git? With Mercurial usage of moz-phab becoming very limited, I wonder if we could close this bug out as inactive.

Flags: needinfo?(standard8)

I haven't had cause to use esr115 recently, so let's just close this out.

Status: NEW → RESOLVED
Closed: 1 month ago
Flags: needinfo?(standard8)
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.