Changeset 420:6db6425f00a0 in finroc
- Timestamp:
- 31.01.2022 08:21:12 (12 months ago)
- Branch:
- default
- Phase:
- public
- Rebase:
- 63396234313564333039393131333565353035626362386330393730373863313134616532353034
- Location:
- scripts
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
scripts/finroc_update
r417 r420 49 49 { 50 50 "-u <username>, --username=<username>" => "use <username> to get access to repositories", 51 "-p <password>, --password=<password>" => "use <password> to get access to repositories" 51 "-p <password>, --password=<password>" => "use <password> to get access to repositories", 52 "-c, --change-logs" => "print info and log messages for all incoming changesets", 52 53 }, undef; 53 54 54 ParseCommandLine [ "username=s", "password=s" ], undef;55 ParseCommandLine [ "username=s", "password=s", "change-logs" ], undef; 55 56 56 57 … … 95 96 my @heads; 96 97 my @check_dependencies; 98 my $print_change_logs = GetCommandLineOption "change-logs"; 97 99 98 100 ForEachWithProgress [ sort keys %directories ], \&EscapeFinrocHome, sub 99 101 { 100 102 my ($directory) = @_; 101 my $result = Update $directory, $username, $password ;103 my $result = Update $directory, $username, $password, $print_change_logs; 102 104 103 105 DEBUGMSG "Result: $result\n"; -
scripts/perl/FINROC/scm.pm
r311 r420 88 88 } 89 89 90 sub Update($$$ )91 { 92 my ($directory, $username, $password ) = @_;90 sub Update($$$$) 91 { 92 my ($directory, $username, $password, $print_change_logs) = @_; 93 93 94 94 my $scm_name = GetSCMNameFromWorkingCopy $directory; … … 99 99 $username = defined $username ? sprintf "'%s'", $username : "undef"; 100 100 $password = defined $password ? sprintf "'%s'", $password : "undef"; 101 102 my $result; 103 eval sprintf "\$result = FINROC::scm::%s::Update(%s, %s, %s)", $scm_name, $directory, $username, $password; 101 $print_change_logs = defined $print_change_logs ? sprintf "'%s'", $print_change_logs : "0"; 102 103 my $result; 104 eval sprintf "\$result = FINROC::scm::%s::Update(%s, %s, %s, %s)", $scm_name, $directory, $username, $password, $print_change_logs; 104 105 ERRORMSG $@ if $@; 105 106 -
scripts/perl/FINROC/scm/hg.pm
r419 r420 31 31 32 32 use Env '$FINROC_HOME'; 33 use open qw/:std :utf8/; 33 34 34 35 use lib "$FINROC_HOME/scripts/perl"; … … 107 108 } 108 109 109 sub Update($$$ )110 { 111 my ($directory, $username, $password ) = @_;110 sub Update($$$$) 111 { 112 my ($directory, $username, $password, $print_change_logs) = @_; 112 113 113 114 my $default_path = GetPath $directory, "default"; … … 136 137 $uncommitted_changes |= $output ne ""; 137 138 138 $command = sprintf "hg %s --cwd \"%s\" in", $credentials, $directory; 139 DEBUGMSG sprintf "Executing '%s'\n", $command; 140 my $incoming_log = `$command`; 139 my $change_logs = ""; 140 if ($print_change_logs) 141 { 142 $command = sprintf "hg %s --cwd \"%s\" in", $credentials, $directory; 143 DEBUGMSG sprintf "Executing '%s'\n", $command; 144 $change_logs = `$command`; 145 } 141 146 142 147 $command = sprintf "hg %s --cwd \"%s\" pull -q", $credentials, $directory; … … 169 174 return "Up to date" if $parent == $heads[0]; 170 175 171 WARNMSG $incoming_log; 176 if ($print_change_logs) 177 { 178 WARNMSG $change_logs; 179 } 172 180 173 181 return "Uncommitted changes" if $uncommitted_changes; … … 258 266 ERRORMSG sprintf "Command failed: %s\n", $command if $?; 259 267 260 Update $directory, $username, $password ;268 Update $directory, $username, $password, 0; 261 269 } 262 270 -
scripts/perl/FINROC/scm/svn.pm
r362 r420 68 68 } 69 69 70 sub Update($$$ )70 sub Update($$$$) 71 71 { 72 my ($directory, $username, $password ) = @_;72 my ($directory, $username, $password, $print_change_logs) = @_; 73 73 74 74 my $credentials = CredentialsForCommandLine $username, $password;
Note: See TracChangeset
for help on using the changeset viewer.