changeset 1398:3f76ac60130d

make update quieter when nothing is wrong sometimes when i am going around in my history, i get long lists of errors from the update command. this patch will fix that. i tried to make the code style the same like the rest of the code.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Tue, 18 Oct 2005 17:56:50 -0700
parents 66fd3bc1cfcf
children 9a70776e355e
files mercurial/localrepo.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Tue Oct 18 12:11:23 2005 -0700
+++ b/mercurial/localrepo.py	Tue Oct 18 17:56:50 2005 -0700
@@ -1265,7 +1265,9 @@
             try:
                 os.unlink(self.wjoin(f))
             except OSError, inst:
-                self.ui.warn("update failed to remove %s: %s!\n" % (f, inst))
+                if inst.errno != errno.ENOENT:
+                    self.ui.warn("update failed to remove %s: %s!\n" %
+                                 (f, inst.strerror))
             # try removing directories that might now be empty
             try: os.removedirs(os.path.dirname(self.wjoin(f)))
             except: pass