Submitter | via Mercurial-devel |
---|---|
Date | March 3, 2017, 5:27 p.m. |
Message ID | <bf26c605e2e0772f5f49.1488562065@martinvonz.mtv.corp.google.com> |
Download | mbox | patch |
Permalink | /patch/18893/ |
State | Accepted |
Headers | show |
Comments
On 3/3/17 9:27 AM, Martin von Zweigbergk via Mercurial-devel wrote: > # HG changeset patch > # User Martin von Zweigbergk <martinvonz@google.com> > # Date 1456353854 28800 > # Wed Feb 24 14:44:14 2016 -0800 > # Node ID bf26c605e2e0772f5f49a185f4d73429e4303ca7 > # Parent c22253c4c1b8bdd414f227232499ae323bd2173f > revert: move code dealing with deletions closer together I inspected the cmdutil.py code and verified deladded and deleted aren't used in the interim. So LGTM
On Fri, 3 Mar 2017 10:46:10 -0800, Durham Goode wrote: > On 3/3/17 9:27 AM, Martin von Zweigbergk via Mercurial-devel wrote: > > # HG changeset patch > > # User Martin von Zweigbergk <martinvonz@google.com> > > # Date 1456353854 28800 > > # Wed Feb 24 14:44:14 2016 -0800 > > # Node ID bf26c605e2e0772f5f49a185f4d73429e4303ca7 > > # Parent c22253c4c1b8bdd414f227232499ae323bd2173f > > revert: move code dealing with deletions closer together > > I inspected the cmdutil.py code and verified deladded and deleted aren't > used in the interim. So LGTM Queued this, thanks.
Patch
diff -r c22253c4c1b8 -r bf26c605e2e0 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Wed Mar 01 19:51:05 2017 -0800 +++ b/mercurial/cmdutil.py Wed Feb 24 14:44:14 2016 -0800 @@ -2976,13 +2976,6 @@ clean = set(changes.clean) modadded = set() - # determine the exact nature of the deleted changesets - deladded = set(_deleted) - for path in _deleted: - if path in mf: - deladded.remove(path) - deleted = _deleted - deladded - # We need to account for the state of the file in the dirstate, # even when we revert against something else than parent. This will # slightly alter the behavior of revert (doing back up or not, delete @@ -3040,6 +3033,13 @@ dsremoved.add(src) names[src] = (repo.pathto(src, cwd), True) + # determine the exact nature of the deleted changesets + deladded = set(_deleted) + for path in _deleted: + if path in mf: + deladded.remove(path) + deleted = _deleted - deladded + # distinguish between file to forget and the other added = set() for abs in dsadded: