Mercurial > hg
comparison mercurial/patch.py @ 5760:0145f9afb0e7
Removed tabs and trailing whitespace in python files
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Sat, 29 Dec 2007 19:49:48 +0100 |
parents | 89fe5b36c21e |
children | deb0d3518674 |
comparison
equal
deleted
inserted
replaced
5759:027264e720aa | 5760:0145f9afb0e7 |
---|---|
816 if not missing: | 816 if not missing: |
817 if gooda and goodb: | 817 if gooda and goodb: |
818 fname = (afile in bfile) and afile or bfile | 818 fname = (afile in bfile) and afile or bfile |
819 elif gooda: | 819 elif gooda: |
820 fname = afile | 820 fname = afile |
821 | 821 |
822 if not fname: | 822 if not fname: |
823 if not nullb: | 823 if not nullb: |
824 fname = (afile in bfile) and afile or bfile | 824 fname = (afile in bfile) and afile or bfile |
825 elif not nulla: | 825 elif not nulla: |
826 fname = afile | 826 fname = afile |
827 else: | 827 else: |
828 raise PatchError(_("undefined source and destination files")) | 828 raise PatchError(_("undefined source and destination files")) |
829 | 829 |
830 return fname, missing | 830 return fname, missing |
831 | 831 |
832 class linereader: | 832 class linereader: |
833 # simple class to allow pushing lines back into the input stream | 833 # simple class to allow pushing lines back into the input stream |
834 def __init__(self, fp): | 834 def __init__(self, fp): |
1027 elif state == 'git': | 1027 elif state == 'git': |
1028 gitpatches = values | 1028 gitpatches = values |
1029 for gp in gitpatches: | 1029 for gp in gitpatches: |
1030 if gp.op in ('COPY', 'RENAME'): | 1030 if gp.op in ('COPY', 'RENAME'): |
1031 copyfile(gp.oldpath, gp.path) | 1031 copyfile(gp.oldpath, gp.path) |
1032 changed[gp.path] = (gp.op, gp) | 1032 changed[gp.path] = (gp.op, gp) |
1033 else: | 1033 else: |
1034 raise util.Abort(_('unsupported parser state: %s') % state) | 1034 raise util.Abort(_('unsupported parser state: %s') % state) |
1035 | 1035 |
1036 rejects += closefile() | 1036 rejects += closefile() |
1037 | 1037 |