Fix and improve parts of rbt patch.

Review Request #5210 — Created Jan. 7, 2014 and submitted

Information

RBTools
release-0.5.x

Reviewers

Fix and improve parts of rbt patch.

There were a few things with rbt patch that made usage difficult.

It wouldn't allow for creating a commit if there was even one untracked
file in the checkout, even though those shouldn't have been a factor.
They were a factor, though, because of the next issue, which was that
every single file (tracked and untracked) would be committed along with
the patch. It would do this in order to include any files modified or
introduced in the patch.

The cleanliness restriction has been reduced. Tracked files with
modifications in the working directory or index will now prevent rbt
patch from creating a commit, but untracked files will not. When calling
git apply, we now pass --index, which will apply the changes to the
index, including the addition of any files. This means we only need to
do a plain git commit at the end.

And last but not least, the change from a rich_text field in the API
to text_type broke unescaping, but unescaping can now be done
server-side. We now pass ?force-text-type=plain to get the
unescaped version. (This parameter is simply ignored for older
releases.)

Applied a change with modified and new files to a tree with untracked files.
It applied and was committed without yelling at me or impacting my
untracked files.

david
  1. Code looks good. In your change description, you say "When calling rbt patch", where I think you meant to say "When calling git apply".

  2. 
      
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed