SVN-S4

 view release on metacpan or  search on metacpan

bryce-notes.txt  view on Meta::CPAN

  - (DONE) test all viewspec syntax
  - you can always write more tests
- (FIXED) BUG: svn checkout -r does not obey the -r in the top level checkout
- (DONE) @list_actions should not need to be in order. just sort by target dir, and the
  order no longer matters.  Add s4_test called "s4_checkout_view2_viewlines_out_of_order"
  to regress this.
- (DONE) Undo switches when the view line is removed from viewspec.
  Store the previous parsed viewspec somewhere, and compare them so that we
  can tell what switches should be switched back.
- (DONE) document new update and checkout behavior
- (DONE) OUCH! newer svns do not allow the "switch --relocate" trick.
  So dammit I'm going to edit the .svn/entries file myself.  It's actually much easier
  than the switch relocate trick anyway.
    Make a versioned directory called A.
    Just add the line:
       <entry name="A" kind="dir"/>
    and then you can svn switch A to anything you want.
    If you don't switch it, the next update will make A get deleted.
- (DONE) BUG: "s4 --version" fails
  s4 --version   #fail
  svn --version  #ok
- (DONE) BUG: we don't allow cmdline options to appear before the svn command.
  "s4 -m message commit file" fails

lib/SVN/S4.pm  view on Meta::CPAN

#       $ctx->log($targets, $start, $end, $discover_changed_paths, $strict_node_history,
#                 \&log_receiver, $pool);
#       $ctx->ls($target, $revision, $recursive, $pool);
#       $ctx->merge($src1, $rev1, $src2, $rev2, $target_wcpath, $recursive, $ignore_ancestry,
#                 $force, $dry_run, $pool);
#       $ctx->mkdir($targets, $pool);
#       $ctx->move($src_path, $src_revision, $dst_path, $force, $pool);
#       $ctx->propget($propname, $target, $revision, $recursive, $pool);
#       $ctx->proplist($target, $revision, $recursive, $pool);
#       $ctx->propset($propname, $propval, $target, $recursive, $pool);
#       $ctx->relocate($dir, $from, $to, $recursive, $pool);
#       $ctx->resolved($path, $recursive, $pool);
#       $ctx->revert($paths, $recursive, $pool);
#       $ctx->revprop_get($propname, $url, $revision, $pool);
#       $ctx->revprop_list($url, $revision, $pool);
#       $ctx->revprop_set($propname, $propval, $url, $revision, $force, $pool);
#       $ctx->status($path, $revision, \&status_func, $recursive, $get_all, $update, $no_ignore, $pool);
#       $ctx->switch($path, $url, $revision, $recursive, $pool);
#       $ctx->update($path, $revision, $recursive, $pool)
#       $ctx->url_from_path($target, $pool); or SVN::Client::url_from_path($target, $pool);
#       $ctx->uuid_from_path($path, $adm_access, $pool);

lib/SVN/S4/Getopt.pm  view on Meta::CPAN

	       .' [-r|--revision REV]'
	       #
	       .' [--username USER]'
	       .' [--password PASS]'
	       .' [--no-auth-cache]'
	       .' [--non-interactive]'
	       .' [--trust-server-cert]'	# 1.6
	       .' [--config-dir DIR]'
	       .' [--config-option ARG]'	# 1.6
	       .' PROPNAME [PATHORURL...]')},
  'relocate'	=> {				# 1.7
      args => (''
	       #'relocate FROM-PREFIX TO-PREFIX [PATH...]
	       #'relocate TO-URL [PATH]
	       .' [--ignore-externals]'
	       #
	       .' [--username USER]'
	       .' [--password PASS]'
	       .' [--no-auth-cache]'
	       .' [--non-interactive]'
	       .' [--trust-server-cert]'
	       .' [--config-dir DIR]'
	       .' [--config-option ARG]'
	       .' TOFROM [PATHORURL...]')},

lib/SVN/S4/Getopt.pm  view on Meta::CPAN

	       .' [--username USER]'
	       .' [--password PASS]'
	       .' [--no-auth-cache]'
	       .' [--non-interactive]'
	       .' [--trust-server-cert]'	# 1.6
	       .' [--config-dir DIR]'
	       .' [--config-option ARG]'	# 1.6
	       .' [PATH...]')},
  'switch'	=> {
      args => (''#'switch URL [PATH]'
	       #'switch --relocate FROM TO [PATH...]'
	       .' [--accept ARG]'
	       .' [--depth ARG]'
	       .' [--diff3-cmd CMD]'
	       .' [--force]'
	       .' [--ignore-ancestry]'		# 1.7
	       .' [--ignore-externals]'
	       .' [--relocate]'   # technically [--relocate FROM TO] but parser below doesn't support
	       .' [--set-depth ARG]'
	       .' [-N|--non-recursive]'
	       .' [-q|--quiet]'
	       .' [-r|--revision REV]'
	       #
	       .' [--username USER]'
	       .' [--password PASS]'
	       .' [--no-auth-cache]'
	       .' [--non-interactive]'
	       .' [--trust-server-cert]'	# 1.6

s4  view on Meta::CPAN

	push @Opt_CmdParams, $dir;
    }
    cmd_svn();
}

sub cmd_switch {
    DEBUG "cmd_switch ",join(' ',@Opt_CmdParams),"\n"  if is_debug;
    !$opts{unknown} or die "%Error: s4 switch: Unknown argument: $opts{unknown}[0]\n";
    DEBUG "  opts = ", Dumper(\%opts), "\n" if is_debug;
    # Goal: Add ability to create switchpoints.
    # Use standard svn if they used "--relocate" syntax.
    if ($opts{'--relocate'}) {
        cmd_svn();
	return; # no viewspec checking
    }
    # Now we know that arg array means "URL PATH";
    my ($url,$path) = @{$opts{arg}};
    $url = _clean_path($url);
    $path = "." if !defined $path;
    if (!defined $url || !defined $path) {
        return cmd_svn();  # no viewspec checking
    }

t/20_getopt.t  view on Meta::CPAN

ck('mkdir    --message TEXT --file FILE --quiet --username USER --password PASS --no-auth-cache --non-interactive --editor-cmd EDITOR --encoding ENC --force-log --config-dir DIR PATHORURL');
ck('move     --message TEXT --file FILE --revision REV --quiet --force --username USER --password PASS --no-auth-cache --non-interactive --editor-cmd EDITOR --encoding ENC --force-log --config-dir DIR SRC DST');
ck('propdel  --quiet --recursive --revision REV --revprop --username USER --password PASS --no-auth-cache --non-interactive --config-dir DIR PROPNAME PATHORURL');
ck('propedit --revision REV --revprop --username USER --password PASS --no-auth-cache --non-interactive --encoding ENC --editor-cmd EDITOR --config-dir DIR PROPNAME PATHORURL');
ck('propget  --recursive --revision REV --revprop --strict --username USER --password PASS --no-auth-cache --non-interactive --config-dir DIR PROPNAME PATHORURL');
ck('proplist --verbose --recursive --revision REV --quiet --revprop --username USER --password PASS --no-auth-cache --non-interactive --config-dir DIR PROPNAME PATHORURL');
ck('propset  --file FILE --quiet --revision REV --targets FILENAME --recursive --revprop --username USER --password PASS --no-auth-cache --non-interactive --encoding ENC --force --config-dir DIR PROPNAME PATHORURL');
ck('resolved --targets FILENAME --recursive --quiet --config-dir DIR PATH');
ck('revert   --targets FILENAME --recursive --quiet --config-dir DIR PATH');
ck('status   --show-updates --verbose --non-recursive --quiet --no-ignore --username USER --password PASS --no-auth-cache --non-interactive --config-dir DIR --ignore-externals PATH');
ck('switch   --relocate --revision REV --non-recursive --quiet --diff3-cmd CMD --relocate FROM TO --username USER --password PASS --no-auth-cache --non-interactive --config-dir DIR PATH');
ck('unlock   --targets FILENAME --username USER --password PASS --no-auth-cache --non-interactive --config-dir DIR --force PATH');
ck('update   --revision REV --non-recursive --quiet --diff3-cmd CMD --username USER --password PASS --no-auth-cache --non-interactive --config-dir DIR --ignore-externals PATH');

ck_deep('co -N --username USER url@12345 PATH',
	{'--non-recursive' => 1,
	 '--username' => 1,
	 'url' => [ 'url', 'PATH' ],
	 'urlrev' => [ '12345', undef ],
	 'username' => [ 'USER' ]
	 });



( run in 0.554 second using v1.01-cache-2.11-cpan-5511b514fd6 )