Mercurial push error

Matt Mackall mpm at selenic.com
Sun Aug 5 11:16:49 CDT 2007


On Sun, Aug 05, 2007 at 09:09:43AM -0400, Norman Walsh wrote:
> / Matt Mackall <mpm at selenic.com> was heard to say:
> | On Sat, Aug 04, 2007 at 07:41:50AM -0400, Norman Walsh wrote:
> |> / Matt Mackall <mpm at selenic.com> was heard to say:
> |> | On Sat, Jul 28, 2007 at 05:19:38PM -0400, Norman Walsh wrote:
> |> |> / Matt Mackall <mpm at selenic.com> was heard to say:
> |> |> | So it looks like someone (possibly you?) tried to push, and their
> |> |> | session got killed. Somehow Mercurial died without releasing the lock
> |> |> | and the transaction (this might happen if it gets OOM-killed or
> |> |> | similar). Your session eventually noticed the lock was stale and
> |> |> | claimed it, only to discover the aborted transaction.
> |> |> 
> |> |> How can I fix this so I can finish the push?
> |> |
> |> | It said:
> |> |
> |> | remote: AssertionError: journal already exists - run hg recover
> |> | ^^^^^^
> |> |
> |> | You need to run recover on the remote repo.
> |> 
> |> Ok. That seemed to help.
> |> 
> |> I login to the remote location, run hg recover, it rolls back.
> |> I run hg verify on the remote location and hg verify on the
> |> local location, all seems ok.
> |
> | Did the remote repo have a sensible number of changesets reported by verify?
> 
> Well. Only 1, I think. So I don't know if that's sensible or not.

Well how many changesets were you expecting?
 
> |> I run
> |> 
> |> $ hg push
> |> pushing to ssh://user@host/path/to/hg/repos/home
> |> searching for changes
> |> remote: adding changesets
> |> remote: adding manifests
> |> remote: adding file changes
> |
> | There should have been a line here about how many changes were sent.
> | Is this the complete message?
> 
> Yes.
> 
> |> $ hg verify
> |> checking changesets
> |> checking manifests
> |> crosschecking files in changesets and manifests
> |> checking files
> |> 2199 files, 24 changesets, 2390 total revisions
> |> 
> |> So far so good. Now I log back into the remote location
> |> 
> |> $ hg verify
> |> checking changesets
> |> checking manifests
> |> bad manifest link (1) at revision 1
> |
> | That's bad. Manifest revision 1 (ie the 2nd) says it belongs to
> | changeset 1, which doesn't exist.
> |
> | Can you tell us what versions you're running and on what systems and
> | give us a directory listing of .hg and .hg/store on remote?
> 
> On my local box:
> 
> $ hg version
> Mercurial Distributed SCM (version 0.9.3)
> 
> Obtained from Ubuntu; on the remote, I built it myself:
> 
> $ hg version
> Mercurial Distributed SCM (version 8706e75e6431)
> 
> $ ls -l .hg
> total 4
> -rw-r--r--  1 ndw pg174814   57 Jul 17 07:07 00changelog.i
> -rw-r--r--  1 ndw pg174814    0 Aug  4 06:34 journal.dirstate
> -rw-r--r--  1 ndw pg174814   15 Jul 17 07:07 requires
> drwxr-xr-x  3 ndw pg174814 4096 Aug  4 16:59 store
> -rw-r--r--  1 ndw pg174814    0 Jul 20 05:37 undo.dirstate
> 
> $ ls -l .hg/store
> total 132
> -rw-r--r--   1 ndw pg174814  1567 Aug  4 04:48 00changelog.i
> -rw-r--r--   1 ndw pg174814 79074 Aug  4 06:34 00manifest.i
> drwxr-xr-x  32 ndw pg174814  4096 Aug  4 06:34 data
> -rw-r--r--   1 ndw pg174814 29119 Aug  4 06:35 journal
> -rw-r--r--   1 ndw pg174814  6092 Jul 20 05:37 undo

Hmm, you shouldn't have a journal there. Somehow your last transaction
didn't finish. Try running recover and verify again.

Looks like we should print a warning when we find a journal on
startup rather than just when we try to do a commit.

-- 
Mathematics is the supreme nostalgia of our time.


More information about the Mercurial mailing list