non-deterministic bug in "hg commit" when attic is enabled

Issue #8 new
created an issue

When attic is enabled, "hg commit fileA" sometimes will commit all modified files. This happens with hg v1.4.3 and v1.5.1.

See for more information.

Comments (4)

  1. Anonymous

    I do have this issue, too. I have copied my repo to a save place (note to myself /hg/ss10-usb-fuzzing/.hg/attic-add-weirdness/).

    muelli@bigbox /hg/ss10-usb-fuzzing/filter $ hg st -m M filter/ M filter/ M paper/usb-fuzzing.bib M paper/usb-fuzzing.tex muelli@bigbox /hg/ss10-usb-fuzzing/filter $ hg ci

    Nano opens and shows the followin: HG: Enter commit message. Lines beginning with 'HG:' are removed. HG: Leave message empty to abort commit. HG: -- HG: user: Tobias Mueller (bigbox) <> HG: branch 'default' HG: added filter/ HG: changed filter/ HG: changed filter/ HG: changed paper/usb-fuzzing.bib HG: changed paper/usb-fuzzing.tex

    Pressing ctrl+x because I don't want to commit all changes. abort: empty commit message

  2. dergo

    The bug occurs when a patch from the attic is currently applied.

    hg-attic installs a commit wrapper to remove the patch currently applied after committing, but removes any argument (*args) to the commit command, including any specification of files to commit.

    Note that if the code is corrected to keep the arguments of the commit command, the patch should not be removed unconditionally, but should probably be updated to remove the committed changes from it.

    def commitwrapper(orig, ui, repo, *args, * *opts):
        s = repo.attic
        name = s.applied
        if not name:
            orig(ui, repo, *args, **opts)
            makepatch(ui, repo, name, [], opts)
            data = patch.extract(ui, open(s.join(name), 'r'))
            tmpname, m, u, d, branch, nodeid, p1, p2 = data
            orig(ui, repo, message = m, logfile = None, user = u, date = d)
            if not opts.get('keep'):
  3. Log in to comment