Mercurial > public > mercurial-scm > hg
comparison mercurial/merge.py @ 6350:6aa4a3fa4e60
update: no -C needed to switch branches without outstanding changes
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 22 Mar 2008 13:30:08 -0500 |
parents | fda369b5779c |
children | cdc458b12f0f |
comparison
equal
deleted
inserted
replaced
6349:6aaf5b1d8f15 | 6350:6aa4a3fa4e60 |
---|---|
362 fastforward = True | 362 fastforward = True |
363 else: | 363 else: |
364 raise util.Abort(_("there is nothing to merge, just use " | 364 raise util.Abort(_("there is nothing to merge, just use " |
365 "'hg update' or look at 'hg heads'")) | 365 "'hg update' or look at 'hg heads'")) |
366 elif not (overwrite or branchmerge): | 366 elif not (overwrite or branchmerge): |
367 raise util.Abort(_("update spans branches, use 'hg merge' " | 367 if wc.files() or wc.deleted(): |
368 "or 'hg update -C' to lose changes")) | 368 raise util.Abort(_("update spans branches, use 'hg merge' " |
369 "or 'hg update -C' to lose changes")) | |
370 # Allow jumping branches if there are no changes | |
371 overwrite = True | |
369 if branchmerge and not forcemerge: | 372 if branchmerge and not forcemerge: |
370 if wc.files() or wc.deleted(): | 373 if wc.files() or wc.deleted(): |
371 raise util.Abort(_("outstanding uncommitted changes")) | 374 raise util.Abort(_("outstanding uncommitted changes")) |
372 | 375 |
373 ### calculate phase | 376 ### calculate phase |