mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
49385c8a07
Summary: C++17 Reviewed By: fanzeyi Differential Revision: D28966939 fbshipit-source-id: c8c9d49bc02557263a6acf9357c90b50e04fbdb9
43 lines
1016 B
C++
43 lines
1016 B
C++
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This software may be used and distributed according to the terms of the
|
|
* GNU General Public License version 2.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "eden/fs/utils/PathFuncs.h"
|
|
|
|
namespace folly {
|
|
class exception_wrapper;
|
|
}
|
|
|
|
namespace facebook::eden {
|
|
|
|
class TreeEntry;
|
|
|
|
/**
|
|
* A callback that will be invoked with results from a diff operation.
|
|
*
|
|
* Note that the callback functions may be invoked from multiple threads
|
|
* simultaneously, and the callback is responsible for implementing
|
|
* synchronization properly.
|
|
*/
|
|
class DiffCallback {
|
|
public:
|
|
DiffCallback() {}
|
|
virtual ~DiffCallback() {}
|
|
|
|
virtual void ignoredFile(RelativePathPiece path) = 0;
|
|
virtual void addedFile(RelativePathPiece path) = 0;
|
|
virtual void removedFile(RelativePathPiece path) = 0;
|
|
virtual void modifiedFile(RelativePathPiece path) = 0;
|
|
|
|
virtual void diffError(
|
|
RelativePathPiece path,
|
|
const folly::exception_wrapper& ew) = 0;
|
|
};
|
|
|
|
} // namespace facebook::eden
|