Prechádzať zdrojové kódy

Adjust history progress label to Copy

cere 1 mesiac pred
rodič
commit
ee08b028ee
1 zmenil súbory, kde vykonal 6 pridanie a 5 odobranie
  1. 6 5
      svn_interact/svn_git_sync

+ 6 - 5
svn_interact/svn_git_sync

@@ -260,16 +260,17 @@ build_commit_msg() {
   msg_body="$(printf "%s" "$msg_body" | perl -0777 -pe 's/\A\s+//; s/\s+\z//; s/\n{2,}/\n\n/g')"
   COMMIT_BODY="$msg_body"
   COMMIT_BODY_FIRST="$(printf "%s" "$msg_body" | sed -n '1p')"
-  COMMIT_SUBJECT="SVN r${rev}"
+  COMMIT_SUBJECT="r${rev}"
   [[ -n "$author" ]] && COMMIT_SUBJECT+=" by $author"
   COMMIT_DATE="$commit_date"
-  COMMIT_PROGRESS="$COMMIT_SUBJECT"
-  [[ -n "$COMMIT_DATE" ]] && COMMIT_PROGRESS="[$COMMIT_DATE] $COMMIT_PROGRESS"
+  COMMIT_PROGRESS=""
+  [[ -n "$COMMIT_DATE" ]] && COMMIT_PROGRESS+="[$COMMIT_DATE] "
+  COMMIT_PROGRESS+="$COMMIT_SUBJECT"
   [[ -n "$COMMIT_BODY_FIRST" ]] && COMMIT_PROGRESS+=" — $COMMIT_BODY_FIRST"
 }
 
 build_commit_msg "$start_rev"
-echo "[$(elapsed) s] Preparing commit: $COMMIT_PROGRESS"
+  echo "[$(elapsed) s] Copy: $COMMIT_PROGRESS"
 stage_and_commit "$COMMIT_SUBJECT" "$COMMIT_BODY" 0 "$COMMIT_PROGRESS"
 
 if (( ${#REV_LIST[@]} > 1 )); then
@@ -277,7 +278,7 @@ if (( ${#REV_LIST[@]} > 1 )); then
     svn update -q -r "$rev" "$WC_DIR"
     sync_wc_to_dest
     build_commit_msg "$rev"
-    echo "[$(elapsed) s] Preparing commit: $COMMIT_PROGRESS"
+    echo "[$(elapsed) s] Copy: $COMMIT_PROGRESS"
     stage_and_commit "$COMMIT_SUBJECT" "$COMMIT_BODY" 1 "$COMMIT_PROGRESS"
   done
 fi