Opened 7 years ago

Last modified 6 years ago

#2556 new defect

Master-Side SVN step applying "extra_args" to svn info

Reported by: kkryger Owned by:
Priority: major Milestone: 0.9.+
Version: 0.8.6p1 Keywords:
Cc:

Description

Switched to the master-side step, and the previous step allowed use of the extra_args=!["--ignore-externals"] with no issues. Moving to the new style, it seems as though the "svn info" command gets extra_args no matter what it is, so anything that isn't valid as a command becomes an error.

Cut down example:

SVN(
    name="Checkout",
    baseURL=base_svnurl,
    mode="full",
    method="fresh",
    extra_args=["--ignore-externals"],
)

So my command is this: ['svn', 'info', '--non-interactive', '--no-auth-cache', '--ignore-externals'] Which, 'svn info' doesn't take in "--ignore-externals", and causes an error:

Subcommand 'info' doesn't accept option '--ignore-externals'[[BR]]
Type 'svn help info' for usage.

Noticed in 0.8.6p1, looks like it is still in master.

Change History (3)

comment:1 Changed 7 years ago by jaredgrubb

The issue is that SVN._dovccmd always appends extra_args, no matter which command is being run, and that fails for this particular use case.

I'm not sure the best way to solve this, but ideas I had while triaging this:

  • never add extra_args for the "svn info" command (probably via a new arg to _dovccmd). This is easiest solution I can think of, but may be too restrictive (are there useful extra args that we should allow for even svn info?)
  • if we think we need something more expressive, the extreme solution would be to make extra_args into a dict keyed on the svn-command. This feels too free-form and would be verbose to express, but it would solve the above issue and still allow a hook for extra args for "svn info".

comment:2 Changed 7 years ago by dustin

  • Milestone changed from undecided to 0.8.+

This may be a case for subclassing. Perhaps we can offer a "mungeCommandArgs" method that can do whatever it wants with the args?

comment:3 Changed 6 years ago by dustin

  • Milestone changed from 0.8.+ to 0.9.+

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.