31 if (tag_name[0] == publish::Repository::kRawHashSymbol) {
32 tag.
name = tag_name.substr(1);
36 bool retval = history.
GetByName(tag_name, &tag);
52 publish::DiffListener *listener)
64 listener_->OnAdd(path.
ToString(), entry);
70 listener_->OnRemove(path.
ToString(), entry);
79 listener_->OnModify(path.
ToString(), old_entry, new_entry);
89 DiffListener *diff_listener)
93 diff_listener->OnInit(from_tag, to_tag);
120 DiffForwarder diff_forwarder(mgr_from, mgr_to, diff_listener);
121 if (!diff_forwarder.Init())
122 throw EPublish(
"cannot initialize difference engine");
const SettingsRepository settings_
const Counters & GetCounters() const
download::DownloadManager * download_mgr_
const history::History * history() const
static DeltaCounters Diff(const Counters &from, const Counters &to)
assert((mem||(size==0))&&"Out Of Memory")
virtual bool ReportModification(const PathString &path, const catalog::DirectoryEntry &old_entry, const catalog::DirectoryEntry &new_entry, const XattrList &, const FileChunkList &)
virtual void ReportAddition(const PathString &path, const catalog::DirectoryEntry &entry, const XattrList &, const FileChunkList &)
const char kSuffixCatalog
history::SqliteHistory * history_
CatalogT * GetRootCatalog() const
virtual bool GetByName(const std::string &name, Tag *tag) const =0
std::string ToString() const
ShortString< kDefaultMaxPath, 0 > PathString
Any MkFromHexPtr(const HexPtr hex, const char suffix)
virtual void ReportRemoval(const PathString &path, const catalog::DirectoryEntry &entry)
static history::History::Tag GetTag(const std::string &tag_name, const history::History &history)
publish::DiffListener * listener_
void Diff(const std::string &from, const std::string &to, DiffListener *diff_listener)
std::string tmp_dir() const
DiffForwarder(catalog::SimpleCatalogManager *old_mgr, catalog::SimpleCatalogManager *new_mgr, publish::DiffListener *listener)