hgkw/keyword.py
branchkwmap-templates
changeset 188 c5e1a361d009
parent 187 a01a0392f648
child 192 0d2a6c9f8343
--- a/hgkw/keyword.py	Wed Jul 18 16:17:04 2007 +0200
+++ b/hgkw/keyword.py	Wed Jul 18 21:24:04 2007 +0200
@@ -213,7 +213,11 @@
             data, cnt = fp.read(man[f])
             if cnt:
                 notify(_('overwriting %s %s keywords\n') % (f, action))
-                self.repo.wwrite(f, data, man.flags(f))
+                try:
+                    self.repo.wwrite(f, data, man.flags(f))
+                except AttributeError:
+                    # older versions want file descriptor as 3. optional arg
+                    self.repo.wwrite(f, data)
                 files.append(f)
         if files:
             self.repo.dirstate.update(files, 'n')