Media/WebRTC/Legacy Updating Process

From MozillaWiki
< Media‎ | WebRTC
Revision as of 17:22, 10 December 2014 by Jesup (talk | contribs) (3.50 -> 40)
Jump to navigation Jump to search

Process: rough, can use fleshing out

  • Get a copy of the stable branch from SVN:
  • rm -rf media/webrtc/trunk/webrtc
  • cp -r somewhere/3.50/webrtc media/webrtc/trunk
  • copy over any files in somewhere/3.50 to media/webrtc/trunk that are needed (few if any - DEPS, OWNERS, etc)
  • rm -rf media/webrtc/trunk/webrtc/examples/
  • hg addremove --similarity 70 --dry-run media/webrtc/trunk/webrtc 2>&1 >/tmp/addremove.out
  • look for any false positives on renames and fix them (perhaps by adding them to an --exclude list when doing the real addremove\
    • near-empty files often result in false renames (null_transport.h, run_tests.cc, etc)
    • For 3.50, I had to use "--exclude media/webrtc/trunk/webrtc/test/run_tests.cc --exclude media/webrtc/trunk/webrtc/test/run_loop.cc --exclude media/webrtc/trunk/webrtc/video_engine/test/common/run_loop.cc --exclude media/webrtc/trunk/webrtc/video_engine/test/common/run_tests.cc" (not critical but reduces confusion)
  • look for any false negatives (typically fiddle the '70') or correct by hand after - less critical
  • hg revert files removed from media/webrtc/trunk/webrtc/modules/video_capture/windows/
    • do this before the real addremove! (can be undone later if needed)
  • hg addremove --exclude <whatever> --similarity 70 media/webrtc/trunk/webrtc 2>&1 >/tmp/addremove.out
    • or you can --exclude the directory if there are no renames, adds or removals there
    • These are files we added to avoid including/using DirectShow/etc files from Microsoft examples
  • hg qnew webrtc_revXXX -m "Bug xxxxxx: Webrtc updated to branch N.MM rev XXXX; pull made <date_from_/tmp/date>"
  • hg qref
    • Not sure why this is needed, but it is
  • hg qpop
  • find the last update changeset - there will be two, one for landing the upstream code, one for the rollup of any changes
    • We'll call these revs "upstream_changeset" and "rollup_changeset"
  • hg diff -r upstream_changeset media/webrtc/trunk/webrtc >/tmp/rollup.patch
  • hg qpush
  • hg qimport /tmp/rollup.patch
  • hg qpush 2>&1 >/tmp/apply.out
  • Have much fun resolving conflicts!
    • Watch for renamed files, or removed files with the code merged into others
    • I use an Emacs keyboard macro to go to the next file in apply.out with an error and pull it and the .rej file into emacs: Media/WebRTC/Updating_Process/merge.macro
  • hg qnew rollup_fixes
    • don't merge them in yet to rollup, since likely you'll need to revise this for a while and it helps to see what your merge-resolution was
  • do builds, resolve any errors, hg qref
  • submit Try builds
  • Go back and fix any android/b2g-specific files where we didn't merge the diffs earlier
  • Test in person-to-person calls

Now groom for release when ready

  • hg qpop -a
  • record the current changeset from hg log ("old_head")
  • hg pull -u
  • hg diff -r old_head media/webrtc/trunk/webrtc >/tmp/updates
    • If empty, jump ahead to land (unlikely)
  • hg qpush (hopefully shouldn't get conflicts -- should be webrtc_revXXXX)
  • hg qpush (should be rollup.patch)
  • hg qfold rollup_fixes (merges into rollup.patch)
  • hg qimport /tmp/updates
  • hg qpush
  • resolve any conflicts
  • build
  • test
  • hg qpop
  • hg qfold updates
  • Verify that there are no changes to media/webrtc/trunk/webrtc since the diff that generated /tmp/apply (hg qpop -a; hg log ("new_head"); hg pull -u; hg diff -r new_head -> should yield nothing)
  • land

(incomplete, WIP)