hgext/largefiles/lfcommands.py
changeset 49248 63fd0282ad40
parent 48875 6000f5b25c9b
child 49306 2e726c934fcd
equal deleted inserted replaced
49247:3e5f1fb2aec7 49248:63fd0282ad40
     6 # This software may be used and distributed according to the terms of the
     6 # This software may be used and distributed according to the terms of the
     7 # GNU General Public License version 2 or any later version.
     7 # GNU General Public License version 2 or any later version.
     8 
     8 
     9 '''High-level command function for lfconvert, plus the cmdtable.'''
     9 '''High-level command function for lfconvert, plus the cmdtable.'''
    10 
    10 
       
    11 import binascii
    11 import errno
    12 import errno
    12 import os
    13 import os
    13 import shutil
    14 import shutil
    14 
    15 
    15 from mercurial.i18n import _
    16 from mercurial.i18n import _
   382         except ValueError:
   383         except ValueError:
   383             ui.warn(_(b'skipping incorrectly formatted tag %s\n') % line)
   384             ui.warn(_(b'skipping incorrectly formatted tag %s\n') % line)
   384             continue
   385             continue
   385         try:
   386         try:
   386             newid = bin(id)
   387             newid = bin(id)
   387         except TypeError:
   388         except binascii.Error:
   388             ui.warn(_(b'skipping incorrectly formatted id %s\n') % id)
   389             ui.warn(_(b'skipping incorrectly formatted id %s\n') % id)
   389             continue
   390             continue
   390         try:
   391         try:
   391             newdata.append(b'%s %s\n' % (hex(revmap[newid]), name))
   392             newdata.append(b'%s %s\n' % (hex(revmap[newid]), name))
   392         except KeyError:
   393         except KeyError: