Change 'rbt diff' and 'rbt post' to take revisions as arguments.

Review Request #5226 — Created Jan. 9, 2014 and submitted — Latest diff uploaded

Information

RBTools
master

Reviewers

Change 'rbt diff' and 'rbt post' to take revisions as arguments.

This change updates the 'diff' and 'post' commands to treat extra arguments as
the revision spec, and adds a new -I/--include flag to specify any files to
limit the diff to.

This is done for all SCMs except ClearCase. I need to work through all the
pending ClearCase patches and read through the proposal on how to fit it into
this new world order.

This also includes some changes to the way that changenums are pulled out for
perforce and plastic. Ideally I'd like to get rid of the server-side
summary/description fetch and implement the --guess-* options, but that would
likely piss off a lot of users. Instead, I've just moved the changenum
extraction into the diff methods, so that we don't duplicate the work of
parsing revisions in two different ways. This also returns 'None' for submitted
changelists (for now) because the server-side code is broken at the moment.

Whether or not files are supported is currently client-dependent. Most already
did, and I've added it for git. It's still not done for Plastic, since my
Plastic expertise is exactly zero.

  • Ran unit tests
  • Checked diffs and extracted summaries for:
  • bzr backend with zero, one, and two-arg forms.
  • cvs backend with zero arguments. I haven't tested the two-arg form because
    after trying four different public CVS repos, I have yet to find one that
    (a) has a CVSROOT, (b) allows me to check it out, (c) allows me to do a
    diff between two tags, and (d) have that diff not contain broken text
    encodings.
  • hg backend with zero, one, and two-arg forms.
  • hgsubversion backend with zero, one, and two-arg forms.
  • git backend with zero, one, and two-arg forms.
  • git-p4 backend with zero, one, and two-arg forms.
  • git-svn backend with zero, one, and two-arg forms.
  • perforce backend with zero, one, and two-arg forms, including submitted and
    shelved changesets.
  • svn backend with zero, one, and two-arg forms, including changelists.