1
 J    # shallowverifier.py - shallow repository verifier
#
# Copyright 2015 Facebook, Inc.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.

from mercurial.i18n import _
from mercurial import verify


class shallowverifier(verify.verifier):
    def _verifyfiles(self, filenodes, filelinkrevs):
        """Skips files verification since repo's not guaranteed to have them"""
        self.repo.ui.status(
            _(b"skipping filelog check since remotefilelog is used\n")
        )
        return 0, 0
  $   H403239_•I|¥‰ÓMjqØ‚¦ ë<óo¬ÄÃ  ï    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access this resource.</p>
</body></html>
  7   	ˆl–Ãa¾” TÐ?JqAàp-©‹Fÿ�þYqæ–q°ÐoË)üÿÇ„/¶çÆÅÄ 6„    	#! /usr/bin/perl
# ---------------------------------------------------------------------------
# Copyright (C) 2008-2017 TJ Saunders <tj@castaglia.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
# ---------------------------------------------------------------------------

use strict;

use File::Basename qw(basename);
use Getopt::Long;
use Mail::Sendmail;
use MIME::Base64 qw(encode_base64);
use Time::HiRes qw(usleep);

my $program = basename($0);

my $opts = {};
GetOptions($opts, 'attach-file', 'fifo=s', 'from=s', 'help', 'ignore-users=s',
  'log=s', 'recipient=s@', 'upload-recipient=s@', 'download-recipient=s@',
  'sleep=s', 'smtp-server=s', 'subject=s', 'watch-users=s', 'auth=s');

if ($opts->{help}) {
  usage();
  exit 0;
}

unless ($opts->{fifo}) {
  print STDERR "$program: missing required --fifo parameter\n";
  exit 1;
}
my $fifo = $opts->{fifo};

unless ($opts->{from}) {
  print STDERR "$program: missing required --from parameter\n";
  exit 1;
}
my $from = $opts->{from};

unless ($opts->{recipient} ||
        $opts->{'upload-recipient'}) {
  print STDERR "$program: missing required --recipient (or --upload-recipient) parameter\n";
  exit 1;
}
my $upload_recipients = $opts->{recipient};

# The --upload-recipient list takes precedence over the (deprecated)
# --recipient list.
if (defined($opts->{'upload-recipient'})) {
   $upload_recipients = $opts->{'upload-recipient'};
}

my $download_recipients = undef;
if (defined($opts->{'download-recipient'})) {
  $download_recipients = $opts->{'download-recipient'};
}

unless ($opts->{'smtp-server'}) {
  print STDERR "$program: missing required --smtp-server parameter\n";
  exit 1;
}
my $smtp_server = $opts->{'smtp-server'};

my $smtp_auth;
if ($opts->{'auth'}) {
  eval { $smtp_auth = get_auth_info($opts->{'auth'}) };
  if ($@) {
    my $ex = $@;
    print STDERR "$program: unable to obtain SMTP auth info: $ex\n";
    exit 1;
  }
}

my $delay = 0.5;
if ($opts->{sleep}) {
  $delay = $opts->{sleep};
}

my $fifoh;
if (open($fifoh, "< $fifo")) {

  while (1) {
    my $line = <$fifoh>;
    if ($line) {
      chomp($line);

      if ($line =~ /^(\S+\s+\S+\s+\d+\s+\d+:\d+:\d+\s+\d+)\s+(\d+)\s+(.*?)\s+(\d+)\s+(.*?)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(.*?)\s+.*?(\S+)$/o) {
        my $curr_time = $1;
        my $xfer_nsecs = $2;
        my $client = $3;
        my $nbytes = $4;

        # Note that any spaces or control characters will be replaced in this
        # path with underscores.  Thi