diff -r daff3ef0de8d -r dee55c4a4963 mercurial/localrepo.py --- a/mercurial/localrepo.py Mon Jan 30 19:34:35 2006 +1300 +++ b/mercurial/localrepo.py Wed Feb 01 08:46:24 2006 +0100 @@ -1399,6 +1399,13 @@ modified, added, removed, deleted, unknown = self.changes() + # is this a jump, or a merge? i.e. is there a linear path + # from p1 to p2? + linear_path = (pa == p1 or pa == p2) + + if allow and linear_path: + raise util.Abort(_("there is nothing to merge, " + "just use 'hg update'")) if allow and not forcemerge: if modified or added or removed: raise util.Abort(_("outstanding uncommited changes")) @@ -1411,10 +1418,6 @@ raise util.Abort(_("'%s' already exists in the working" " dir and differs from remote") % f) - # is this a jump, or a merge? i.e. is there a linear path - # from p1 to p2? - linear_path = (pa == p1 or pa == p2) - # resolve the manifest to determine which files # we care about merging self.ui.note(_("resolving manifests\n"))