Fix the patch application sorting.

It relied on a behavior that doesn't hold on python 2.7 anymore w.r.t. tuple
comparison to non-tuple objects.

Now be explicit about having source files to be first.

R=rogerta@chromium.org
BUG=


Review URL: https://chromiumcodereview.appspot.com/10915240

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@156355 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/checkout.py b/checkout.py
index c674347..33c0c31 100644
--- a/checkout.py
+++ b/checkout.py
@@ -143,6 +143,7 @@
     """Ignores svn properties."""
     post_processors = post_processors or self.post_processors or []
     for p in patches:
+      logging.debug('Applying %s' % p.filename)
       try:
         stdout = ''
         filename = os.path.join(self.project_path, p.filename)
@@ -301,6 +302,7 @@
   def apply_patch(self, patches, post_processors=None):
     post_processors = post_processors or self.post_processors or []
     for p in patches:
+      logging.debug('Applying %s' % p.filename)
       try:
         # It is important to use credentials=False otherwise credentials could
         # leak in the error message. Credentials are not necessary here for the
@@ -507,6 +509,7 @@
           ['checkout', '-b', self.working_branch,
             '%s/%s' % (self.remote, self.remote_branch), '--quiet'])
     for index, p in enumerate(patches):
+      logging.debug('Applying %s' % p.filename)
       try:
         stdout = ''
         if p.is_delete: