Closed Bug 1043074 Opened 9 years ago Closed 9 years ago

bzpost should not update bugs when pushing to user repo or MQ

Categories

(Developer Services :: Mercurial: bzpost, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nsm, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

Pushing my MQ repo to my mozilla user repo ended up in bzpost updating all relevant bugs :(
I noticed :)

Are you sure you don't want your peers to know that you are hard at work on a bug? :)

Seriously, this should at least be an option so it can be disabled.
I also don't want pushes to my mozilla user repo showing up. Could I request a white list feature? Or something like firefoxtrees that only updates bz when pushing to a known repo such as inbound, try, etc?
Product: Other Applications → Developer Services
How about something like this?

Place:

    [bzpost]
    updateuserrepo = True

to update on b.m.o on push to a user repository.
Attachment #8500827 - Flags: review?(gps)
Comment on attachment 8500827 [details] [diff] [review]
Don't update b.m.o on push to user repo.

Review of attachment 8500827 [details] [diff] [review]:
-----------------------------------------------------------------

I like the feature. But this doesn't get r+ without tests. Please read the README.rst in the repository for instructions on running the tests. Or:

  $ ./create-test-environment
  $ source venv/bin/activate
  $ ./run-mercurial-tests.py hgext/bzpost/test*

We've been landing code to hook Docker up to the test environment. You may want to run tests out of a VM. See testing/jenkins/ for a Vagrant environment providing the canonical testing environment. See the README.rst in that directory.
Attachment #8500827 - Flags: review?(gps) → feedback+
(In reply to Gregory Szorc [:gps] from comment #4)
> Comment on attachment 8500827 [details] [diff] [review]

I'm writing tests for the patch I uploaded. I'm running into a problem with BASE_WRITE_URI. For the test it needs to look like http://localhost:$HGPORT/ instead of ssh://hg.mozilla.org/. Is there a way to detect running in tests and have BASE_WRITE_URI return the correct value. (I thought of adding a config to hgrc, something like [mozautomation] base_write_uri = http://localhost:$HGPORT/)
Flags: needinfo?(gps)
The localmozrepo foo starting at https://hg.mozilla.org/hgcustom/version-control-tools/file/acec14ee3368/hgext/bzpost/tests/test-post.t#l4 will do some internal monkeypatching.

If you extend test-post.t, it should "just work." I encourage you to go that approach.
Flags: needinfo?(gps)
Updated patch with testing + fixed the monkey patching, which wasn't working correctly.
Attachment #8500827 - Attachment is obsolete: true
Attachment #8501492 - Flags: review?(gps)
The bzpost tests were refactored a bit this week to add Docker integration. I'm responsible for bit rotting your patch. I'll try to find time today to "fix" this patch and land it for you.
Comment on attachment 8501492 [details] [diff] [review]
bug-1043074-bzpost

I landed this with modifications to avoid bit rot.
Attachment #8501492 - Flags: review?(gps) → review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.