codemod: better #includes

Summary:
This patch removes all `#include "../` lines and use the shortest possible
include path.

Test Plan: `make clean build`

Reviewers: durham, #mercurial, rmcelroy

Reviewed By: rmcelroy

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D5113672

Signature: t1:5113672:1495565454:961fb6f2f57a81a95013e0b8f67b2917c2e4523e
This commit is contained in:
Jun Wu 2017-05-23 11:57:32 -07:00
parent 6f5f9b9c0d
commit a72478f016
14 changed files with 18 additions and 17 deletions

View File

@ -40,7 +40,7 @@
#include <lz4.h>
#include "cdatapack.h"
#include "../clib/buffer.h"
#include "buffer.h"
#define MAX_PAGED_IN_DATAPACK (1024 * 1024 * 1024)

View File

@ -8,7 +8,7 @@
#include <memory.h>
#include <stdio.h>
#include "convert.h"
#include "../clib/sha1/sha1.h"
#include "sha1/sha1.h"
#include "cdatapack.h"
#include <stdlib.h>

View File

@ -5,7 +5,7 @@
//
// no-check-code
#include "../clib/sha1/sha1.h"
#include "sha1/sha1.h"
#include "node.h"
#include "tree.h"

View File

@ -11,7 +11,7 @@
#define DATAPACKSTORE_H
extern "C" {
#include "../cdatapack/cdatapack.h"
#include "cdatapack.h"
}
#include <string>

View File

@ -14,6 +14,7 @@
#include <vector>
#include <stdexcept>
#include "convert.h"
#include "convert.h"
/* Represents a key into the Mercurial store. Each key is a (name, node) pair,

View File

@ -15,7 +15,7 @@
#include <Python.h>
extern "C" {
#include "../cdatapack/cdatapack.h"
#include "cdatapack.h"
}
// ==== py_cdatapack PyObject declaration ====

View File

@ -15,7 +15,7 @@
#include <string>
extern "C" {
#include "../cdatapack/cdatapack.h"
#include "cdatapack.h"
}
#include "pythonutil.h"

View File

@ -18,8 +18,8 @@
#include "manifest.h"
#include "pythonutil.h"
#include "treemanifest.h"
#include "../cstore/uniondatapackstore.h"
#include "../cstore/py-structs.h"
#include "uniondatapackstore.h"
#include "py-structs.h"
#define FILENAME_BUFFER_SIZE 16348
#define FLAG_SIZE 1

View File

@ -20,10 +20,10 @@
// Py_BuildValue treats NULL as NONE, so we have to have a non-null pointer.
#define MAGIC_EMPTY_STRING ""
#include "../cstore/store.h"
#include "../cstore/key.h"
#include "../cstore/match.h"
#include "../ctreemanifest/treemanifest.h"
#include "store.h"
#include "key.h"
#include "match.h"
#include "treemanifest.h"
/**
* C++ exception that represents an issue at the python C api level.

View File

@ -11,7 +11,7 @@
#define UNIONDATAPACKSTORE_H
extern "C" {
#include "../cdatapack/cdatapack.h"
#include "cdatapack.h"
}
#include "key.h"

View File

@ -7,7 +7,7 @@
//
// no-check-code
#include "../clib/sha1/sha1.h"
#include "sha1/sha1.h"
#include "manifest.h"

View File

@ -42,7 +42,7 @@ class ManifestPtr {
};
#include "manifest_entry.h"
#include "../cstore/store.h"
#include "store.h"
enum FindResultType {
RESULT_FILE,

View File

@ -16,7 +16,7 @@
class ManifestFetcher;
#include "manifest.h"
#include "../cstore/store.h"
#include "store.h"
/**
* Class used to obtain Manifests, given a path and node.

View File

@ -16,7 +16,7 @@
#include "manifest.h"
#include "manifest_fetcher.h"
#include "../cstore/match.h"
#include "match.h"
enum FindResult {
FIND_PATH_OK,