servo/mach.bat
author i.milind.luthra+590334 <i.milind.luthra@gmail.com>
Thu, 11 May 2017 17:22:27 +0200
changeset 357847 8840f2afc5f942d73384ddcc7e4456a53408b619
parent 352478 de39420cc624efdc9bfd620626211569d912ce2d
child 379914 d99e376e239caa2b86d219cad09f88cb4ddc439e
permissions -rw-r--r--
Bug 1249263 - add a `removeByFilter` method to filter by host and time,r=mak Added a method in History to filter by host and timeframe, which is designed to act as a replacement for `RemovePagesByTimeFrame` and `RemovePagesFromHost` in the old API. The `filter` object accepts both a host argument, as well as a timeframe, and filters as per one or both of them. This also moves certain code (the method `validatePageInfo` and methods it uses) from History to PlacesUtils such that we can use it for testing as well, and modifies the method to take another parameter which decides whether the visits inside the pageInfo need to be validated as well (since the pageInfo returned from History.jsm::`remove` and History.jsm::`removeByFilter` do not pass a visits array in their callback functions. Shifts `ensureDate` and `isValidTransitionType`(now renamed to `isValidTransition`) inside the history object. MozReview-Commit-ID: EQAHmjf7131

@echo off

IF EXIST "%ProgramFiles(x86)%" (
  set "ProgramFiles32=%ProgramFiles(x86)%"
) ELSE (
  set "ProgramFiles32=%ProgramFiles%"
)

set VC14VARS=%VS140COMNTOOLS%..\..\VC\vcvarsall.bat
IF EXIST "%VC14VARS%" (
  set "VS_VCVARS=%VC14VARS%"
) ELSE (
  for %%e in (Enterprise Professional Community) do (
    IF EXIST "%ProgramFiles32%\Microsoft Visual Studio\2017\%%e\VC\Auxiliary\Build\vcvarsall.bat" (
      set "VS_VCVARS=%ProgramFiles32%\Microsoft Visual Studio\2017\%%e\VC\Auxiliary\Build\vcvarsall.bat"
    )
  )
)

IF EXIST "%VS_VCVARS%" (
  IF NOT DEFINED Platform (
    IF EXIST "%ProgramFiles(x86)%" (
      call "%VS_VCVARS%" x64
    ) ELSE (
      ECHO 32-bit Windows is currently unsupported.
      EXIT /B
    )
  )
) ELSE (
  ECHO Visual Studio 2015 or 2017 is not installed.
  ECHO Download and install Visual Studio 2015 or 2017 from https://www.visualstudio.com/
  EXIT /B
)

python mach %*