Rev 4400: (igc) address temp file issue with diff --using on Windows (Martitza in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Wed Jun 3 07:38:21 BST 2009


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 4400
revision-id: pqm at pqm.ubuntu.com-20090603063817-8ykgnm5181gp6xea
parent: pqm at pqm.ubuntu.com-20090603004918-k6xr5guhlh4f2dd7
parent: ian.clatworthy at canonical.com-20090603054418-foc7issbxwxzh2a5
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2009-06-03 07:38:17 +0100
message:
  (igc) address temp file issue with diff --using on Windows (Martitza
  	Mendez)
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/diff.py                 diff.py-20050309040759-26944fbbf2ebbf36
    ------------------------------------------------------------
    revno: 4399.1.1
    revision-id: ian.clatworthy at canonical.com-20090603054418-foc7issbxwxzh2a5
    parent: pqm at pqm.ubuntu.com-20090603004918-k6xr5guhlh4f2dd7
    parent: martitza at rubuntu-20090513035525-zhziy88frpwe3wtr
    committer: Ian Clatworthy <ian.clatworthy at canonical.com>
    branch nick: integration
    timestamp: Wed 2009-06-03 15:44:18 +1000
    message:
      (igc) address temp file issue with diff --using on Windows (Martitza Mendez)
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/diff.py                 diff.py-20050309040759-26944fbbf2ebbf36
    ------------------------------------------------------------
    revno: 4354.6.1
    revision-id: martitza at rubuntu-20090513035525-zhziy88frpwe3wtr
    parent: pqm at pqm.ubuntu.com-20090512090530-v9355ohetp61ltc1
    committer: Martitza Mendez <martitza at rubuntu>
    branch nick: bzr_wc
    timestamp: Tue 2009-05-12 20:55:25 -0700
    message:
      Fix 363837 : catch OSError from osutils.rmtree and mutter to trace file.
      update NEWS accordingly
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/diff.py                 diff.py-20050309040759-26944fbbf2ebbf36
=== modified file 'NEWS'
--- a/NEWS	2009-06-02 13:48:27 +0000
+++ b/NEWS	2009-06-03 05:44:18 +0000
@@ -56,6 +56,12 @@
   the fetched revisions, not in the stacked-on ancestry.
   (John Arbash Meinel)
 
+* The ''bzr diff'' now catches OSError from osutils.rmtree and logs a
+  helpful message to the trace file, unless the temp directory really was
+  removed (which would be very strange).  Since the diff operation has
+  succeeded from the user's perspective, no output is written to stderr 
+  or stdout.  (Maritza Mendez, #363837)
+
 
 Documentation
 *************

=== modified file 'bzrlib/diff.py'
--- a/bzrlib/diff.py	2009-05-27 07:18:20 +0000
+++ b/bzrlib/diff.py	2009-06-03 05:44:18 +0000
@@ -735,7 +735,12 @@
         return old_disk_path, new_disk_path
 
     def finish(self):
-        osutils.rmtree(self._root)
+        try:
+            osutils.rmtree(self._root)
+        except OSError, e:
+            if e.errno != errno.ENOENT:
+                mutter("The temporary directory \"%s\" was not "
+                        "cleanly removed: %s." % (self._root, e))
 
     def diff(self, file_id, old_path, new_path, old_kind, new_kind):
         if (old_kind, new_kind) != ('file', 'file'):




More information about the bazaar-commits mailing list