From 137e02f57becc7086ebbd9ba38ec0e31143dcf8a Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Tue, 5 Sep 2017 02:17:16 -0400 Subject: Setup worktree timestamp logic Added logic to update the 'updated' timestamp whenever the worktree is checked out or committed. systrunk status now displays this timestamp. --- checkout.sh | 1 + commit.sh | 1 + repo-access.sh | 1 + 3 files changed, 3 insertions(+) diff --git a/checkout.sh b/checkout.sh index d7208c9..e340706 100644 --- a/checkout.sh +++ b/checkout.sh @@ -72,4 +72,5 @@ function systr_checkout echo "Checking out files..." systr_rsync_normal "$path/revs/$commit/" . + date >.systr/updated } diff --git a/commit.sh b/commit.sh index b3d20f5..964b26f 100644 --- a/commit.sh +++ b/commit.sh @@ -90,6 +90,7 @@ function systr_commit systr_repo_finish_commit "$commit" "$branchcommit" echo "$commit" >.systr/BASE + date >.systr/updated if [[ "$branch" != "$branchcommit" ]]; then systr_repo_set_reference "$branch" "$commit" diff --git a/repo-access.sh b/repo-access.sh index 477e7a9..40be363 100644 --- a/repo-access.sh +++ b/repo-access.sh @@ -228,6 +228,7 @@ function systr_status echo "BASE at $BASE" fi + echo "Tree updated $updated" dist=$(systr_repo_commit_dist "$BASE" "$TRAC") if [[ "$dist" == "0" ]]; then -- cgit v1.2.3