comparison mercurial/patch.py @ 12576:1c9bb7e00f71 stable

patch: test and document a bit binary to regular file upgrade
author Patrick Mezard <pmezard@gmail.com>
date Tue, 28 Sep 2010 00:41:08 +0200
parents 9b3913baba0c
children 05210e955bef
comparison
equal deleted inserted replaced
12575:9b3913baba0c 12576:1c9bb7e00f71
1567 else: 1567 else:
1568 if opts.git: 1568 if opts.git:
1569 header.append('new file mode %s\n' % mode) 1569 header.append('new file mode %s\n' % mode)
1570 elif ctx2.flags(f): 1570 elif ctx2.flags(f):
1571 losedatafn(f) 1571 losedatafn(f)
1572 # In theory, if tn was copied or renamed we should check
1573 # if the source is binary too but the copy record already
1574 # forces git mode.
1572 if util.binary(tn): 1575 if util.binary(tn):
1573 if opts.git: 1576 if opts.git:
1574 dodiff = 'binary' 1577 dodiff = 'binary'
1575 else: 1578 else:
1576 losedatafn(f) 1579 losedatafn(f)