1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-04-28 19:35:10 +00:00
seafile-server/lib/commit.vala
cuihaikuo 936cfd8c74 Support pagination in listing file histories.
Keep at least 2 versions (if exists) when listing file history.
2017-12-08 11:58:24 +08:00

75 lines
1.8 KiB
Vala

// compile this file with `valac --pkg posix repo.vala -C -H repo.h`
namespace Seafile {
public class Commit : Object {
// _id is for fast access from c code. id is for
// vala to automatically generate a property. Note,
// if a Vala property is start with _, it is not
// translated into a GObject property.
public char _id[41];
public string id {
get { return (string)_id; }
set { Posix.memcpy(_id, value, 40); _id[40] = '\0'; }
}
public string creator_name { get; set; }
public string _creator; // creator
public string creator {
get { return _creator; }
set { _creator = value; }
}
public string _desc; // description: what does this commit change
public string desc {
get { return _desc; }
set { _desc = value; }
}
public int64 _ctime; // create time
public int64 ctime {
get { return _ctime; }
set { _ctime = value; }
}
public string parent_id { get; set;}
public string second_parent_id { get; set; }
public string _repo_id;
public string repo_id {
get { return _repo_id; }
set { _repo_id = value; }
}
// A commit point to a file or dir, not both.
public string _root_id;
public string root_id {
get { return _root_id; }
set { _root_id = value; }
}
// Repo data-format version of this commit
public int version { get; set; }
public bool new_merge { get; set; }
public bool conflict { get; set; }
// Used for returning file revision
public string rev_file_id { get; set; }
public int64 rev_file_size { get; set; }
// Set if this commit renames a revision of a file
public string rev_renamed_old_path { get; set; }
public string device_name { get; set; }
public string client_version { get; set; }
//Only used for file history pagination
public string next_start_commit { get; set; }
}
} // namespace