D529: uncommit: move fb-extension to core which uncommits a changeset

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Wed Sep 6 19:15:33 EDT 2017


martinvonz added inline comments.

INLINE COMMENTS

> uncommit.py:16
> +files to their uncommitted state. This means that files modified or
> +deleted in the changeset will be left unchanged, and so will remain modified in
> +the working directory.

How about added files? Also, I think we use "removed" for tracked changes ("deleted" for untracked removal of file).

> uncommit.py:99
> +    copies = dict(ds.copies())
> +    m, a, r = repo.status(oldctx.p1(), oldctx, match=match)[:3]
> +    for f in m:

I prefer the form that doesn't depend on the order in the status tuple:

  s = repo.status(...)
  for f in s.added:
      ...

> uncommit.py:148
> +    if not obsolete.isenabled(repo, obsolete.createmarkersopt):
> +        raise error.Abort(_("must have obsolescence enabled to uncommit"))
> +

This is inconsistent with the amend extension that Jun added. We can always add support for that later.

> test-uncommit.t:22
> +  
> +  uncommit some or all of a local changeset
> +  

s/some/part/ (I think)

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D529

To: pulkit, #hg-reviewers
Cc: martinvonz, yuja, mercurial-devel


More information about the Mercurial-devel mailing list