Show More
@@ -3066,7 +3066,7 b' def _performrevert(repo, parents, ctx, a' | |||
|
3066 | 3066 | node = ctx.node() |
|
3067 | 3067 | def checkout(f): |
|
3068 | 3068 | fc = ctx[f] |
|
3069 | repo.wwrite(f, fc.data(), fc.flags()) | |
|
3069 | return repo.wwrite(f, fc.data(), fc.flags()) | |
|
3070 | 3070 | |
|
3071 | 3071 | audit_path = pathutil.pathauditor(repo.root) |
|
3072 | 3072 | for f in actions['forget'][0]: |
@@ -3114,9 +3114,13 b' def _performrevert(repo, parents, ctx, a' | |||
|
3114 | 3114 | del fp |
|
3115 | 3115 | else: |
|
3116 | 3116 | for f in actions['revert'][0]: |
|
3117 | checkout(f) | |
|
3117 | wsize = checkout(f) | |
|
3118 | 3118 | if normal: |
|
3119 | 3119 | normal(f) |
|
3120 | elif wsize == repo.dirstate._map[f][2]: | |
|
3121 | # changes may be overlooked without normallookup, | |
|
3122 | # if size isn't changed at reverting | |
|
3123 | repo.dirstate.normallookup(f) | |
|
3120 | 3124 | |
|
3121 | 3125 | for f in actions['add'][0]: |
|
3122 | 3126 | checkout(f) |
@@ -917,6 +917,10 b' class localrepository(object):' | |||
|
917 | 917 | return self._filter(self._encodefilterpats, filename, data) |
|
918 | 918 | |
|
919 | 919 | def wwrite(self, filename, data, flags): |
|
920 | """write ``data`` into ``filename`` in the working directory | |
|
921 | ||
|
922 | This returns length of written (maybe decoded) data. | |
|
923 | """ | |
|
920 | 924 | data = self._filter(self._decodefilterpats, filename, data) |
|
921 | 925 | if 'l' in flags: |
|
922 | 926 | self.wvfs.symlink(data, filename) |
@@ -924,6 +928,7 b' class localrepository(object):' | |||
|
924 | 928 | self.wvfs.write(filename, data) |
|
925 | 929 | if 'x' in flags: |
|
926 | 930 | self.wvfs.setflags(filename, False, True) |
|
931 | return len(data) | |
|
927 | 932 | |
|
928 | 933 | def wwritedata(self, filename, data): |
|
929 | 934 | return self._filter(self._decodefilterpats, filename, data) |
@@ -608,7 +608,16 b' update is a merge ...' | |||
|
608 | 608 | true.executable=cat |
|
609 | 609 | # hg update -C 1 |
|
610 | 610 | $ hg update -q 0 |
|
611 | $ f -s f | |
|
612 | f: size=17 | |
|
613 | $ touch -t 200001010000 f | |
|
614 | $ hg status f | |
|
611 | 615 |
$ |
|
616 | $ f -s f | |
|
617 | f: size=17 | |
|
618 | $ touch -t 200001010000 f | |
|
619 | $ hg status f | |
|
620 | M f | |
|
612 | 621 |
$ |
|
613 | 622 | merging f |
|
614 | 623 | revision 1 |
@@ -634,7 +643,16 b' update should also have --tool' | |||
|
634 | 643 | true.executable=cat |
|
635 | 644 | # hg update -C 1 |
|
636 | 645 | $ hg update -q 0 |
|
646 | $ f -s f | |
|
647 | f: size=17 | |
|
648 | $ touch -t 200001010000 f | |
|
649 | $ hg status f | |
|
637 | 650 |
$ |
|
651 | $ f -s f | |
|
652 | f: size=17 | |
|
653 | $ touch -t 200001010000 f | |
|
654 | $ hg status f | |
|
655 | M f | |
|
638 | 656 |
$ |
|
639 | 657 | merging f |
|
640 | 658 | merging f failed! |
General Comments 0
You need to be logged in to leave comments.
Login now