equal
deleted
inserted
replaced
484 |
484 |
485 val isabelle_tool2 = |
485 val isabelle_tool2 = |
486 Isabelle_Tool("hg_sync", "synchronize Mercurial repository with target directory", |
486 Isabelle_Tool("hg_sync", "synchronize Mercurial repository with target directory", |
487 Scala_Project.here, { args => |
487 Scala_Project.here, { args => |
488 var clean = false |
488 var clean = false |
489 var protect: List[String] = Nil |
489 var filter: List[String] = Nil |
490 var root: Option[Path] = None |
490 var root: Option[Path] = None |
491 var thorough = false |
491 var thorough = false |
492 var dry_run = false |
492 var dry_run = false |
493 var rev = "" |
493 var rev = "" |
494 var verbose = false |
494 var verbose = false |
497 Usage: isabelle hg_sync [OPTIONS] TARGET |
497 Usage: isabelle hg_sync [OPTIONS] TARGET |
498 |
498 |
499 Options are: |
499 Options are: |
500 -C clean all unknown/ignored files on target |
500 -C clean all unknown/ignored files on target |
501 (implies -n for testing; use option -f to confirm) |
501 (implies -n for testing; use option -f to confirm) |
502 -P NAME protect NAME within TARGET from deletion |
502 -F RULE add rsync filter RULE (e.g. "protect /foo" to avoid deletion) |
503 -R ROOT explicit repository root directory |
503 -R ROOT explicit repository root directory |
504 (default: implicit from current directory) |
504 (default: implicit from current directory) |
505 -T thorough check of file content (default: time and size) |
505 -T thorough check of file content (default: time and size) |
506 -f force changes: no dry-run |
506 -f force changes: no dry-run |
507 -n no changes: dry-run |
507 -n no changes: dry-run |
510 |
510 |
511 Synchronize Mercurial repository with TARGET directory, |
511 Synchronize Mercurial repository with TARGET directory, |
512 which can be local or remote (using notation of rsync). |
512 which can be local or remote (using notation of rsync). |
513 """, |
513 """, |
514 "C" -> { _ => clean = true; dry_run = true }, |
514 "C" -> { _ => clean = true; dry_run = true }, |
515 "P:" -> (arg => protect = protect ::: List(arg)), |
515 "F:" -> (arg => filter = filter ::: List(arg)), |
516 "R:" -> (arg => root = Some(Path.explode(arg))), |
516 "R:" -> (arg => root = Some(Path.explode(arg))), |
517 "T" -> (_ => thorough = true), |
517 "T" -> (_ => thorough = true), |
518 "f" -> (_ => dry_run = false), |
518 "f" -> (_ => dry_run = false), |
519 "n" -> (_ => dry_run = true), |
519 "n" -> (_ => dry_run = true), |
520 "r:" -> (arg => rev = arg), |
520 "r:" -> (arg => rev = arg), |
532 root match { |
532 root match { |
533 case Some(dir) => repository(dir) |
533 case Some(dir) => repository(dir) |
534 case None => the_repository(Path.current) |
534 case None => the_repository(Path.current) |
535 } |
535 } |
536 hg.sync(target, progress = progress, verbose = verbose, thorough = thorough, |
536 hg.sync(target, progress = progress, verbose = verbose, thorough = thorough, |
537 dry_run = dry_run, clean = clean, rev = rev, |
537 dry_run = dry_run, clean = clean, filter = filter, rev = rev) |
538 filter = protect.map("protect /" + _)) |
|
539 } |
538 } |
540 ) |
539 ) |
541 } |
540 } |