equal
deleted
inserted
replaced
634 if isinstance(fcd, context.overlayworkingfilectx) and inworkingdir: |
634 if isinstance(fcd, context.overlayworkingfilectx) and inworkingdir: |
635 # If the backup file is to be in the working directory, and we're |
635 # If the backup file is to be in the working directory, and we're |
636 # merging in-memory, we must redirect the backup to the memory context |
636 # merging in-memory, we must redirect the backup to the memory context |
637 # so we don't disturb the working directory. |
637 # so we don't disturb the working directory. |
638 relpath = back[len(repo.wvfs.base) + 1:] |
638 relpath = back[len(repo.wvfs.base) + 1:] |
639 wctx[relpath].write(fcd.data(), fcd.flags()) |
639 if premerge: |
|
640 wctx[relpath].write(fcd.data(), fcd.flags()) |
640 return wctx[relpath] |
641 return wctx[relpath] |
641 else: |
642 else: |
642 if premerge: |
643 if premerge: |
643 # Otherwise, write to wherever path the user specified the backups |
644 # Otherwise, write to wherever path the user specified the backups |
644 # should go. We still need to switch based on whether the source is |
645 # should go. We still need to switch based on whether the source is |