Media/WebRTC/Legacy Updating Process

< Media‎ | WebRTC
Revision as of 20:04, 24 March 2014 by Jesup (talk | contribs)

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 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

(incomplete, WIP)