Closed Bug 1625594 Opened 5 years ago Closed 5 years ago

moz-phab patch producing bookmark error

Categories

(Conduit :: moz-phab, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mkaply, Assigned: zalun)

Details

(Keywords: conduit-triaged)

Attachments

(1 file)

I have a fresh checkout of mozilla-unified and I'm trying to import a patch:

moz-phab patch D67389

It took a long time (six minutes) and produced this error:

bookmark D67389 matches a changeset hash
(did you leave a -r out of an 'hg bookmark' command?)

Oddly, if I do it again, it is immediate.

Log below

DEBUG    2020-03-27 16:51:43,486 MozPhab (0.1.82)
DEBUG    2020-03-27 16:51:43,488 Command added - arc_pass
DEBUG    2020-03-27 16:51:43,489 Command added - install_certificate
DEBUG    2020-03-27 16:51:43,491 Command added - patch
DEBUG    2020-03-27 16:51:43,492 Command added - reorganise
DEBUG    2020-03-27 16:51:43,493 Command added - self_update
DEBUG    2020-03-27 16:51:43,494 Command added - submit
DEBUG    2020-03-27 16:51:43,495 Command added - version
DEBUG    2020-03-27 16:51:43,496 found hg repo in d:\mozilla-unified
DEBUG    2020-03-27 16:51:43,502 $ hg.exe --version --quiet
DEBUG    2020-03-27 16:51:45,056 Mercurial Distributed SCM (version 5.1.2)
DEBUG    2020-03-27 16:51:45,057 $ hg.exe config
DEBUG    2020-03-27 16:51:45,593 https://phabricator.services.mozilla.com/api/conduit.ping {}
DEBUG    2020-03-27 16:51:46,019 https://phabricator.services.mozilla.com/api/diffusion.repository.search {'constraints': {'callsigns': ['MOZILLACENTRAL']}, 'limit': 1}
DEBUG    2020-03-27 16:51:46,365 $ hg.exe --config extensions.rebase= --pager never --config rebase.experimental.inmemory=true status --added --deleted --modified --unknown
DEBUG    2020-03-27 16:52:04,880 https://phabricator.services.mozilla.com/api/differential.revision.search {'constraints': {'ids': [67389]}, 'attachments': {'reviewers': True}}
DEBUG    2020-03-27 16:52:05,206 https://phabricator.services.mozilla.com/api/edge.search {'sourcePHIDs': ['PHID-DREV-o6baheujf25zzhqockkg'], 'types': ['revision.child']}
DEBUG    2020-03-27 16:52:05,550 https://phabricator.services.mozilla.com/api/edge.search {'sourcePHIDs': ['PHID-DREV-o6baheujf25zzhqockkg'], 'types': ['revision.parent']}
INFO     2020-03-27 16:52:05,930 Patching revision: D67389
DEBUG    2020-03-27 16:52:05,931 https://phabricator.services.mozilla.com/api/differential.diff.search {'constraints': {'phids': ['PHID-DIFF-bteayr6mggdkhumqog7k']}, 'attachments': {'commits': True}}
DEBUG    2020-03-27 16:52:06,281 $ hg.exe --config extensions.rebase= --pager never --config rebase.experimental.inmemory=true identify -q -r 76380801f52df7b9d45de9681d95036127af0752
DEBUG    2020-03-27 16:52:06,884 76380801f52d
DEBUG    2020-03-27 16:52:06,884 $ hg.exe --config extensions.rebase= --pager never --config rebase.experimental.inmemory=true update --quiet 76380801f52df7b9d45de9681d95036127af0752
INFO     2020-03-27 16:56:12,113 Checked out 76380801f52d
DEBUG    2020-03-27 16:56:12,114 $ hg.exe --config extensions.rebase= --pager never --config rebase.experimental.inmemory=true bookmarks -T '{bookmark}
'
DEBUG    2020-03-27 16:56:12,401 $ hg.exe --config extensions.rebase= --pager never --config rebase.experimental.inmemory=true bookmark D67389
bookmark D67389 matches a changeset hash
(did you leave a -r out of an 'hg bookmark' command?)
INFO     2020-03-27 16:56:12,948 Bookmark set to D67389
DEBUG    2020-03-27 16:56:12,949 https://phabricator.services.mozilla.com/api/differential.getrawdiff {'diffID': 247285}
DEBUG    2020-03-27 16:56:13,377 $ hg.exe --config extensions.rebase= --pager never --config rebase.experimental.inmemory=true import 'C:\Users\mkaply\AppData\Local\Temp\tmp9lhhabco' --quiet
WARNING  2020-03-27 16:56:18,789 D67389 applied

Tom Prince pointed out that this is taking a while to checkout because it is an old revision. So the only question is why the bookmark -r error.

Summary: moz-phab patch taking six minutes the first time and producing bookmark error → moz-phab patch producing bookmark error

:tom.prince noticed that the bookmark naming overlaps with the changeset hash namespace.
For Mike's error here, D67389 matches d673897fb38d0ae446a164a4d4907691c792aebc.

Not sure what to do about that, unless it is to change the bookmark format, but I'm not sure it is worth it. Maybe adding -r . or -r <hash> would do it.
~Tom

We're checking if there's a bookmark and we're adding a -1 if there is one.
I think this check should be done for the hash as well.

Keywords: conduit-triaged
Priority: -- → P2
Assignee: nobody → pzalewa
Status: NEW → ASSIGNED

Fixed by adding a prefix to the bookmark.

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: