diff --git a/hgext/inotify/linux/_inotify.c b/hgext/inotify/linux/_inotify.c --- a/hgext/inotify/linux/_inotify.c +++ b/hgext/inotify/linux/_inotify.c @@ -106,13 +106,12 @@ PyDoc_STRVAR( static PyObject *remove_watch(PyObject *self, PyObject *args) { - PyObject *ret = NULL; uint32_t wd; int fd; int r; if (!PyArg_ParseTuple(args, "iI:remove_watch", &fd, &wd)) - goto bail; + return NULL; Py_BEGIN_ALLOW_THREADS r = inotify_rm_watch(fd, wd); @@ -120,18 +119,11 @@ static PyObject *remove_watch(PyObject * if (r == -1) { PyErr_SetFromErrno(PyExc_OSError); - goto bail; + return NULL; } Py_INCREF(Py_None); - - goto done; - -bail: - Py_CLEAR(ret); - -done: - return ret; + return Py_None; } PyDoc_STRVAR( diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -2155,7 +2155,8 @@ def merge(ui, repo, node=None, **opts): roots, heads = [common.node()], [p2.node()] displayer = cmdutil.show_changeset(ui, repo, opts) for node in repo.changelog.nodesbetween(roots=roots, heads=heads)[0]: - displayer.show(repo[node]) + if node not in roots: + displayer.show(repo[node]) return 0 return hg.merge(repo, node, force=opts.get('force')) diff --git a/mercurial/parsers.c b/mercurial/parsers.c --- a/mercurial/parsers.c +++ b/mercurial/parsers.c @@ -92,8 +92,6 @@ static PyObject *parse_manifest(PyObject goto bail; if (nlen > 40) { - PyObject *flags; - flags = PyString_FromStringAndSize(zero + 41, nlen - 40); if (!flags) diff --git a/tests/test-double-merge.out b/tests/test-double-merge.out --- a/tests/test-double-merge.out +++ b/tests/test-double-merge.out @@ -1,9 +1,4 @@ created new head -changeset: 0:310fd17130da -user: test -date: Mon Jan 12 13:46:40 1970 +0000 -summary: add foo - changeset: 1:7731dad1c2b9 user: test date: Mon Jan 12 13:46:40 1970 +0000 diff --git a/tests/test-merge-default.out b/tests/test-merge-default.out --- a/tests/test-merge-default.out +++ b/tests/test-merge-default.out @@ -13,11 +13,6 @@ abort: branch 'default' has 3 heads - pl 0 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) % should succeed - 2 heads -changeset: 1:ba677d0156c1 -user: test -date: Thu Jan 01 00:00:00 1970 +0000 -summary: b - changeset: 3:903c264cdf57 parent: 1:ba677d0156c1 user: test diff --git a/tests/test-merge1.out b/tests/test-merge1.out --- a/tests/test-merge1.out +++ b/tests/test-merge1.out @@ -1,11 +1,6 @@ 0 files updated, 0 files merged, 1 files removed, 0 files unresolved created new head %% no merges expected -changeset: 0:98e00378acd0 -user: test -date: Mon Jan 12 13:46:40 1970 +0000 -summary: commit #0 - changeset: 1:4ee19afe4659 user: test date: Mon Jan 12 13:46:40 1970 +0000