mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
ffa54597c6
Summary: If we don't include Python.hg before some of the standard library (like list), it causes a build error on some machines ('error: "_POSIX_C_SOURCE" redefined'). So let's move all Python.h to the front. Also add a missing stdexcept include that's needed for the use of std::logic_error Test Plan: make local on centos6 Reviewers: #fastmanifest, ttung Reviewed By: ttung Differential Revision: https://phabricator.intern.facebook.com/D3756191 Signature: t1:3756191:1471929906:8afc09ee74b5ab5512fc87fadbed311cf15cb768
40 lines
917 B
C++
40 lines
917 B
C++
// manifest_fetcher.h - c++ declarations for a fetcher for manifests
|
|
//
|
|
// Copyright 2016 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.
|
|
//
|
|
// no-check-code
|
|
|
|
#ifndef REMOTEFILELOG_MANIFEST_FETCHER_H
|
|
#define REMOTEFILELOG_MANIFEST_FETCHER_H
|
|
|
|
#include "pythonutil.h"
|
|
|
|
#include <string>
|
|
|
|
class ManifestFetcher;
|
|
|
|
#include "manifest.h"
|
|
|
|
/**
|
|
* Class used to obtain Manifests, given a path and node.
|
|
*/
|
|
class ManifestFetcher {
|
|
private:
|
|
PythonObj _get;
|
|
public:
|
|
ManifestFetcher(PythonObj &store);
|
|
|
|
/**
|
|
* Fetches the Manifest from the store for the provided manifest key.
|
|
* Returns the manifest if found, or throws an exception if not found.
|
|
*/
|
|
Manifest *get(
|
|
const char *path, size_t pathlen,
|
|
std::string &node) const;
|
|
};
|
|
|
|
#endif //REMOTEFILELOG_MANIFEST_FETCHER_H
|