Mercurial > hg
comparison mercurial/patch.py @ 14347:e8debe1eb255
mq: fix qpush changes detection of renamed files
patch.changedfile() was not considering renamed file source as changed.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Tue, 17 May 2011 23:27:58 +0200 |
parents | 003d63bb4fa5 |
children | c1c719103392 |
comparison
equal
deleted
inserted
replaced
14346:bf85c2639700 | 14347:e8debe1eb255 |
---|---|
1313 changed.add(current_file) | 1313 changed.add(current_file) |
1314 elif state == 'git': | 1314 elif state == 'git': |
1315 for gp in values: | 1315 for gp in values: |
1316 gp.path = pathstrip(gp.path, strip - 1)[1] | 1316 gp.path = pathstrip(gp.path, strip - 1)[1] |
1317 changed.add(gp.path) | 1317 changed.add(gp.path) |
1318 if gp.oldpath: | |
1319 gp.oldpath = pathstrip(gp.oldpath, strip - 1)[1] | |
1320 if gp.op == 'RENAME': | |
1321 changed.add(gp.oldpath) | |
1318 else: | 1322 else: |
1319 raise util.Abort(_('unsupported parser state: %s') % state) | 1323 raise util.Abort(_('unsupported parser state: %s') % state) |
1320 return changed | 1324 return changed |
1321 finally: | 1325 finally: |
1322 fp.close() | 1326 fp.close() |