##// END OF EJS Templates
rebase: do not cleanup the working copy when --dry-run is used (issue6802)...
marmoute -
r51292:9f33d12f stable
parent child Browse files
Show More
@@ -838,6 +838,7 b' class rebaseruntime:'
838 838 cleanup = False
839 839
840 840 if cleanup:
841
841 842 if rebased:
842 843 strippoints = [
843 844 c.node() for c in repo.set(b'roots(%ld)', rebased)
@@ -846,13 +847,17 b' class rebaseruntime:'
846 847 updateifonnodes = set(rebased)
847 848 updateifonnodes.update(self.destmap.values())
848 849
849 if not dryrun and not confirm:
850 if not confirm:
851 # note: when dry run is set the `rebased` and `destmap`
852 # variables seem to contain "bad" contents, so do not
853 # rely on them. As dryrun does not need this part of
854 # the cleanup, this is "fine"
850 855 updateifonnodes.add(self.originalwd)
851 856
852 857 shouldupdate = repo[b'.'].rev() in updateifonnodes
853 858
854 859 # Update away from the rebase if necessary
855 if shouldupdate:
860 if not dryrun and shouldupdate:
856 861 mergemod.clean_update(repo[self.originalwd])
857 862
858 863 # Strip from the first rebased revision
@@ -83,17 +83,15 b' f03 is modified'
83 83 committing changelog
84 84 rebase merging completed
85 85 dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase
86 resolving manifests (known-bad-output !)
87 getting f03.txt (known-bad-output !)
88 86
89 87 f03 changes are lost
90 88
91 89 $ hg st
92 M f03.txt (missing-correct-output !)
90 M f03.txt
93 91 $ hg diff
94 diff -r ab62441498e5 f03.txt (missing-correct-output !)
95 --- a/f03.txt Thu Jan 01 00:00:00 1970 +0000 (missing-correct-output !)
96 +++ b/f03.txt Thu Jan 01 00:00:00 1970 +0000 (missing-correct-output !)
97 @@ -1,1 +1,2 @@ (missing-correct-output !)
98 three (missing-correct-output !)
99 +add-to-three (missing-correct-output !)
92 diff -r ab62441498e5 f03.txt
93 --- a/f03.txt Thu Jan 01 00:00:00 1970 +0000
94 +++ b/f03.txt Thu Jan 01 00:00:00 1970 +0000
95 @@ -1,1 +1,2 @@
96 three
97 +add-to-three
General Comments 0
You need to be logged in to leave comments. Login now