version control - How to undo "abort: push creates new remote heads on branch" in mercurial -


i aware of mercurial beginners: definitive practical guide , answers mercurial merge branches? (abort: push creates new remote branches)

here i've inadvertently created situation mercurial wants create new remote head. what's best way undo this, , leave little or no trace of mistake on remote side?

###> hg push pushing http://example.com searching changes abort: push creates new remote heads on branch 'default'! (did forget merge? use push -f force)  ###> hg revert --all -r tip  ###> hg update -c 0 files updated, 0 files merged, 0 files removed, 0 files unresolved  ###> hg incoming comparing http://example.com searching changes no changes found  ###> hg summary parent: 488:e3db024fe901 tip  misc. branch: default commit: (clean) update: 6 new changesets, 2 branch heads (merge)  ###> hg pull pulling http://example.com searching changes no changes found  ###> hg glog @  changeset:   488:e3db024fe901 |  tag:         tip |  summary:     misc. | o  changeset:   487:b207579b9d41 |  parent:      480:ce775708800c |  summary:     misc. | | o  changeset:   486:59a7a5b34c7f | |  user:        other | |  summary:     fixes | | | o  changeset:   485:b28264333e18 | |  user:        other | |  summary:     binary 

if merge, sort of seems ok:

hg merge abort: outstanding uncommitted merges 

but hg diff shows sorts of changes did not make. i'm willing re-apply changes... how can bring single tip, abandoning local changes?

it looks when you've done hg merge, haven't committed resulting changeset.

when merge in branch (in case may need specify hg merge 486 merge in other users changes), merges branch working directory. need check conflicts resolved (if there any) using merge tool, or manually editing files (and running hg resolve on conflicts). once done need hg commit new, merged changeset.

this explain why hg diff gives lots of changes didn't make -- they're changes made on other branch, have yet commit. if run hg summary or hg parents in working directory, should see 2 parents listed: 486 , 488. should hg commit working directory, creating new merged 489.

if want undo current merge , start again, you're correct in trying run hg update -c, set working directory original (unmerged) state.

if want get rid of changes (487 , 488 - state don't mind re-applying changes), easiest option without resorting extensions re-clone repository , continue work there.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -