Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCM-917 add untag for svn #88

Closed
wants to merge 3 commits into from
Closed

SCM-917 add untag for svn #88

wants to merge 3 commits into from

Conversation

cquoss
Copy link
Contributor

@cquoss cquoss commented Feb 6, 2019

Hello everyone,
first time handing in a pull request, please be gentle.
PR targets untag functionality for provider subversion in maven-scm.
Implementation tests are provided, though intention of tck test classes not understood. Provided 'normal' ScmTests instead that are executed during build.
Changes made on Provider API, Manager API left unchanged (intention of Manager API unclear, seems outdated).
Anything missing, please advise.
Regards,
Clemens

@michael-o
Copy link
Member

I will have a look at it Sunday on the train. Please ping me.

@cquoss
Copy link
Contributor Author

cquoss commented Feb 6, 2019

OK. Will ping you sunday morning. Hopefully not forgetting it myself. I am good at at that ;-)

@@ -31,18 +31,27 @@
public abstract class AbstractUntagCommand
extends AbstractCommand
{
/**
* SCM-917 - scm:untag for subversion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is redundant, we have git log for.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will replace by 'execute untag command'

public ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet,
CommandParameters parameters )
throws ScmException
CommandParameters parameters ) throws ScmException
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop this reformat.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropped

protected abstract ScmResult executeUntagCommand( ScmProviderRepository repository,
ScmFileSet fileSet, String tagName )
throws ScmException;
ScmFileSet fileSet, String tagName, String message ) throws ScmException;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please reformat.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why aren't you using the same approach as Tag does with ScmTagParameters scmTagParameters instead of the pure message? It would look consistent in my opinion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Used untag parameters now.

{
String tagName = parameters.getString( CommandParameter.TAG_NAME );
String message = parameters.getString( CommandParameter.MESSAGE, "[maven-scm] untag " + tagName );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The opposite says: "copy for tag". This should be similar: "remove tag".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed.

public UntagScmResult untag( ScmRepository repository, ScmFileSet fileSet,
CommandParameters parameters )
throws ScmException
public UntagScmResult untag( ScmRepository repository, ScmFileSet fileSet, CommandParameters parameters )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop unrelated change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh. Overlooked that. Thanks.

import org.codehaus.plexus.util.cli.Commandline;

/**
* SCM-917 provide untag
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

*
* scm:untag for provider svn is done by removing the tag dir
*
* @author Clemens Quoss
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use this. Authorship is retained on the git commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I am not keen to see my name there. The class I copied from had it so I changed it. Will remove.

{
if ( tag == null || tag.trim().isEmpty() )
{
throw new ScmException( "tag name must be specified" );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consistence: drop "name"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will amend message.

@michael-o
Copy link
Member

michael-o commented Feb 8, 2019

In general this PR looks very decent.

@cquoss
Copy link
Contributor Author

cquoss commented Feb 10, 2019

Ping. Made the requested changes.

@michael-o
Copy link
Member

Thanks, will look at it on the train later this day.

@cquoss
Copy link
Contributor Author

cquoss commented Feb 10, 2019

Had a second look at it myself, right now. Maybe ScmUntagParameters is not what you wanted. You wanted me to use ScmTagParameters also for untag, right? Want me to change that? How do I avoid to have too many commits then for one PR? I'm not acquainted with Git/GitHub.

@cquoss
Copy link
Contributor Author

cquoss commented Feb 12, 2019

Ping?

@cquoss
Copy link
Contributor Author

cquoss commented Feb 14, 2019

Ping??

@michael-o
Copy link
Member

Not necessary to ping every two days. I will try again to look at it this week, no promises. It will take an hour or two. Please be patient, this isn't forgotten.

asfgit pushed a commit that referenced this pull request Feb 17, 2019
@asfgit asfgit closed this in 3819a8b Feb 17, 2019
@cquoss cquoss deleted the SCM-917 branch February 17, 2019 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants