##// END OF EJS Templates
rebase: improve output of --dry-run...
Sushil khanchi -
r38564:731debab default
parent child Browse files
Show More
@@ -844,6 +844,7 b' def rebase(ui, repo, **opts):'
844
844
845 def _dryrunrebase(ui, repo, opts):
845 def _dryrunrebase(ui, repo, opts):
846 rbsrt = rebaseruntime(repo, ui, inmemory=True, opts=opts)
846 rbsrt = rebaseruntime(repo, ui, inmemory=True, opts=opts)
847 ui.status(_('starting dry-run rebase; repository will not be changed\n'))
847 with repo.wlock(), repo.lock():
848 with repo.wlock(), repo.lock():
848 try:
849 try:
849 overrides = {('rebase', 'singletransaction'): True}
850 overrides = {('rebase', 'singletransaction'): True}
@@ -854,7 +855,8 b' def _dryrunrebase(ui, repo, opts):'
854 ui.status(_('hit a merge conflict\n'))
855 ui.status(_('hit a merge conflict\n'))
855 return 1
856 return 1
856 else:
857 else:
857 ui.status(_('there will be no conflict, you can rebase\n'))
858 ui.status(_('dry-run rebase completed successfully; run without '
859 '-n/--dry-run to perform this rebase\n'))
858 return 0
860 return 0
859 finally:
861 finally:
860 # no need to store backup in case of dryrun
862 # no need to store backup in case of dryrun
@@ -208,10 +208,11 b' Make sure it throws error while passing '
208
208
209 Check dryrun gives correct results when there is no conflict in rebasing
209 Check dryrun gives correct results when there is no conflict in rebasing
210 $ hg rebase -s 2 -d 6 -n
210 $ hg rebase -s 2 -d 6 -n
211 starting dry-run rebase; repository will not be changed
211 rebasing 2:177f92b77385 "c"
212 rebasing 2:177f92b77385 "c"
212 rebasing 3:055a42cdd887 "d"
213 rebasing 3:055a42cdd887 "d"
213 rebasing 4:e860deea161a "e"
214 rebasing 4:e860deea161a "e"
214 there will be no conflict, you can rebase
215 dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase
215
216
216 $ hg diff
217 $ hg diff
217 $ hg status
218 $ hg status
@@ -240,10 +241,11 b' Check dryrun gives correct results when '
240
241
241 Check dryrun working with --collapse when there is no conflict
242 Check dryrun working with --collapse when there is no conflict
242 $ hg rebase -s 2 -d 6 -n --collapse
243 $ hg rebase -s 2 -d 6 -n --collapse
244 starting dry-run rebase; repository will not be changed
243 rebasing 2:177f92b77385 "c"
245 rebasing 2:177f92b77385 "c"
244 rebasing 3:055a42cdd887 "d"
246 rebasing 3:055a42cdd887 "d"
245 rebasing 4:e860deea161a "e"
247 rebasing 4:e860deea161a "e"
246 there will be no conflict, you can rebase
248 dry-run rebase completed successfully; run without -n/--dry-run to perform this rebase
247
249
248 Check dryrun gives correct results when there is conflict in rebasing
250 Check dryrun gives correct results when there is conflict in rebasing
249 Make a conflict:
251 Make a conflict:
@@ -276,6 +278,7 b' Make a conflict:'
276 a
278 a
277
279
278 $ hg rebase -s 2 -d 7 -n
280 $ hg rebase -s 2 -d 7 -n
281 starting dry-run rebase; repository will not be changed
279 rebasing 2:177f92b77385 "c"
282 rebasing 2:177f92b77385 "c"
280 rebasing 3:055a42cdd887 "d"
283 rebasing 3:055a42cdd887 "d"
281 rebasing 4:e860deea161a "e"
284 rebasing 4:e860deea161a "e"
@@ -313,6 +316,7 b' Make a conflict:'
313
316
314 Check dryrun working with --collapse when there is conflicts
317 Check dryrun working with --collapse when there is conflicts
315 $ hg rebase -s 2 -d 7 -n --collapse
318 $ hg rebase -s 2 -d 7 -n --collapse
319 starting dry-run rebase; repository will not be changed
316 rebasing 2:177f92b77385 "c"
320 rebasing 2:177f92b77385 "c"
317 rebasing 3:055a42cdd887 "d"
321 rebasing 3:055a42cdd887 "d"
318 rebasing 4:e860deea161a "e"
322 rebasing 4:e860deea161a "e"
General Comments 0
You need to be logged in to leave comments. Login now