[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Need API and subcommand to list eligible revisions to merge

From: Mark Phippard <markphip_at_gmail.com>
Date: 2007-06-08 02:42:23 CEST

There is a need for an API, and likely a subcommand, to list eligible
revisions to merge. In a GUI client, when a user intends to
cherry-pick some revisions, we will want to give them a select screen
to select the revisions they need. It makes sense that this list of
revisions should only contain the ones eligible to merge. Likewise,
it makes sense that a command line user, or script, might want this
same information.

The question becomes what format should this API take and what should
the command line UI be?

Let me describe what I think I would like in Subclipse and JavaHL.

We drive our current dialogs to select revisions from the svn log
API's. For example, this is the current signature from JavaHL for
this API:

    void logMessages(String path, Revision pegRevision,
                     Revision revisionStart,
                     Revision revisionEnd, boolean stopOnCopy,
                     boolean discoverPath, boolean includeMergedRevisions,
                     long limit, LogMessageCallback callback)

This returns the sort of info you see in svn log, which makes for a
nice revision selection dialog. What I would like is a version of the
method that looks like this:

    void logMessages(String url, Revision pegRevision,
                     Revision revisionStart,
                     Revision revisionEnd, boolean stopOnCopy,
                     boolean discoverPath, boolean includeMergedRevisions,
                     long limit, LogMessageCallback callback,
                     boolean showEligibleOnly, String mergeTarget)

Basically, it adds a boolean that says to only show the eligible
revisions, and a String to give the local path you are merging into.
Internally, the API would use the mergeinfo property to filter the
values returned from the API to only include revisions eligible to be
merged.

I think it makes sense that a command line user would want similar
information. So as a strawman proposal, I am suggesting that we add
option(s) to svn log. Off the top of my head:

svn log --show-eligible-from=@repos/trunk "."

So this command could only be run against a working copy. And you
would need to use the --show-eligible-from option to provide the URL
it is going to use to retrieve the log messages. A WC is needed to
obtain the mergeinfo property from. Other options like -r, --limit,
-g etc. could all be used as well.

An alternative would be to create a new subcommand, but given that the
output ought to be the same as svn log, it makes sense to me to add an
option to the existing command.

-- 
Thanks
Mark Phippard
http://markphip.blogspot.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jun 8 02:42:33 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.