##// 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 cleanup = False
838 cleanup = False
839
839
840 if cleanup:
840 if cleanup:
841
841 if rebased:
842 if rebased:
842 strippoints = [
843 strippoints = [
843 c.node() for c in repo.set(b'roots(%ld)', rebased)
844 c.node() for c in repo.set(b'roots(%ld)', rebased)
@@ -846,13 +847,17 b' class rebaseruntime:'
846 updateifonnodes = set(rebased)
847 updateifonnodes = set(rebased)
847 updateifonnodes.update(self.destmap.values())
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 updateifonnodes.add(self.originalwd)
855 updateifonnodes.add(self.originalwd)
851
856
852 shouldupdate = repo[b'.'].rev() in updateifonnodes
857 shouldupdate = repo[b'.'].rev() in updateifonnodes
853
858
854 # Update away from the rebase if necessary
859 # Update away from the rebase if necessary
855 if shouldupdate:
860 if not dryrun and shouldupdate:
856 mergemod.clean_update(repo[self.originalwd])
861 mergemod.clean_update(repo[self.originalwd])
857
862
858 # Strip from the first rebased revision
863 # Strip from the first rebased revision
@@ -83,17 +83,15 b' f03 is modified'
83 committing changelog
83 committing changelog
84 rebase merging completed
84 rebase merging completed
85 dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase
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 f03 changes are lost
87 f03 changes are lost
90
88
91 $ hg st
89 $ hg st
92 M f03.txt (missing-correct-output !)
90 M f03.txt
93 $ hg diff
91 $ hg diff
94 diff -r ab62441498e5 f03.txt (missing-correct-output !)
92 diff -r ab62441498e5 f03.txt
95 --- a/f03.txt Thu Jan 01 00:00:00 1970 +0000 (missing-correct-output !)
93 --- a/f03.txt Thu Jan 01 00:00:00 1970 +0000
96 +++ b/f03.txt Thu Jan 01 00:00:00 1970 +0000 (missing-correct-output !)
94 +++ b/f03.txt Thu Jan 01 00:00:00 1970 +0000
97 @@ -1,1 +1,2 @@ (missing-correct-output !)
95 @@ -1,1 +1,2 @@
98 three (missing-correct-output !)
96 three
99 +add-to-three (missing-correct-output !)
97 +add-to-three
General Comments 0
You need to be logged in to leave comments. Login now