Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 1380:27add82ad845
Fix an hg copy/move bug. Failed if file being copied or moved not in tip.
author | Eric Hopper <hopper@omnifarious.org> |
---|---|
date | Tue, 04 Oct 2005 12:24:59 -0700 |
parents | c3654cfaa77d |
children | c29c36745c6e |
comparison
equal
deleted
inserted
replaced
1379:8ee7ce877be2 | 1380:27add82ad845 |
---|---|
766 if ui.verbose or not exact: | 766 if ui.verbose or not exact: |
767 ui.status('copying %s to %s\n' % (rel, myreldest)) | 767 ui.status('copying %s to %s\n' % (rel, myreldest)) |
768 if not opts['after']: | 768 if not opts['after']: |
769 try: | 769 try: |
770 shutil.copyfile(rel, myreldest) | 770 shutil.copyfile(rel, myreldest) |
771 n = repo.manifest.tip() | 771 shutil.copymode(rel, myreldest) |
772 mf = repo.manifest.readflags(n) | |
773 util.set_exec(myreldest, util.is_exec(rel, mf[abs])) | |
774 except shutil.Error, inst: | 772 except shutil.Error, inst: |
775 raise util.Abort(str(inst)) | 773 raise util.Abort(str(inst)) |
776 except IOError, inst: | 774 except IOError, inst: |
777 if inst.errno == errno.ENOENT: | 775 if inst.errno == errno.ENOENT: |
778 ui.warn('%s: deleted in working copy\n' % rel) | 776 ui.warn('%s: deleted in working copy\n' % rel) |