event log: show the last month worth of changes
This commit is contained in:
parent
8857634e64
commit
2d3f351523
|
@ -598,21 +598,15 @@ namespace SparkleLib.Git {
|
|||
}
|
||||
|
||||
|
||||
public override List<SparkleChangeSet> GetChangeSets (string path, int count)
|
||||
public override List<SparkleChangeSet> GetChangeSets (string path)
|
||||
{
|
||||
return GetChangeSetsInternal (path, count);
|
||||
return GetChangeSetsInternal (path);
|
||||
}
|
||||
|
||||
|
||||
public override List<SparkleChangeSet> GetChangeSets (int count)
|
||||
{
|
||||
return GetChangeSetsInternal (null, count);
|
||||
}
|
||||
|
||||
|
||||
public override List<SparkleChangeSet> GetChangeSets ()
|
||||
{
|
||||
return GetChangeSetsInternal (null, 150);
|
||||
return GetChangeSetsInternal (null);
|
||||
}
|
||||
|
||||
|
||||
|
@ -642,22 +636,19 @@ namespace SparkleLib.Git {
|
|||
}
|
||||
|
||||
|
||||
private List<SparkleChangeSet> GetChangeSetsInternal (string path, int count)
|
||||
private List<SparkleChangeSet> GetChangeSetsInternal (string path)
|
||||
{
|
||||
if (count < 1)
|
||||
throw new ArgumentOutOfRangeException ("count");
|
||||
|
||||
List <SparkleChangeSet> change_sets = new List <SparkleChangeSet> ();
|
||||
SparkleGit git;
|
||||
|
||||
if (path == null) {
|
||||
git = new SparkleGit (LocalPath, "log -" + count + " --raw --find-renames --date=iso " +
|
||||
git = new SparkleGit (LocalPath, "log --since=1.month --raw --find-renames --date=iso " +
|
||||
"--format=medium --no-color --no-merges");
|
||||
|
||||
} else {
|
||||
path = path.Replace ("\\", "/");
|
||||
|
||||
git = new SparkleGit (LocalPath, "log -" + count + " --raw --find-renames --date=iso " +
|
||||
git = new SparkleGit (LocalPath, "log --raw --find-renames --date=iso " +
|
||||
"--format=medium --no-color --no-merges -- \"" + path + "\"");
|
||||
}
|
||||
|
||||
|
|
|
@ -55,8 +55,7 @@ namespace SparkleLib {
|
|||
public abstract bool SyncUp ();
|
||||
public abstract bool SyncDown ();
|
||||
public abstract List<SparkleChangeSet> GetChangeSets ();
|
||||
public abstract List<SparkleChangeSet> GetChangeSets (int count);
|
||||
public abstract List<SparkleChangeSet> GetChangeSets (string path, int count);
|
||||
public abstract List<SparkleChangeSet> GetChangeSets (string path);
|
||||
public abstract void RestoreFile (string path, string revision, string target_file_path);
|
||||
|
||||
public event SyncStatusChangedEventHandler SyncStatusChanged = delegate { };
|
||||
|
|
|
@ -288,7 +288,7 @@ namespace SparkleShare {
|
|||
Stopwatch watch = new Stopwatch ();
|
||||
watch.Start ();
|
||||
|
||||
List<SparkleChangeSet> change_sets = repo.GetChangeSets (file_path, 100);
|
||||
List<SparkleChangeSet> change_sets = repo.GetChangeSets (file_path);
|
||||
string html = GetHistoryHTMLLog (change_sets, file_path);
|
||||
|
||||
watch.Stop ();
|
||||
|
|
Loading…
Reference in a new issue