Submitter | Bryan O'Sullivan |
---|---|
Date | Aug. 30, 2013, 9:16 p.m. |
Message ID | <f07f45c5f8c9ef02f39b.1377897395@australite.local> |
Download | mbox | patch |
Permalink | /patch/2291/ |
State | Accepted |
Headers | show |
Comments
On Fri, Aug 30, 2013 at 02:16:35PM -0700, Bryan O'Sullivan wrote: > # HG changeset patch > # User Bryan O'Sullivan <bryano@fb.com> > # Date 1377897368 25200 > # Fri Aug 30 14:16:08 2013 -0700 > # Node ID f07f45c5f8c9ef02f39bf68b83d1e23771b28308 > # Parent 3193b23eec61b95442097514ca479474b6e8dae6 > rebase: handle bookmarks matching revset function names (issue3950) > LGTM, queued > > We handled these correctly with all rev-specifying options except, > somehow, -r/--rev. > > diff --git a/hgext/rebase.py b/hgext/rebase.py > --- a/hgext/rebase.py > +++ b/hgext/rebase.py > @@ -186,7 +186,7 @@ def rebase(ui, repo, **opts): > dest = scmutil.revsingle(repo, destf) > > if revf: > - rebaseset = repo.revs('%lr', revf) > + rebaseset = scmutil.revrange(repo, revf) > elif srcf: > src = scmutil.revrange(repo, [srcf]) > rebaseset = repo.revs('(%ld)::', src) > diff --git a/tests/test-rebase-bookmarks.t b/tests/test-rebase-bookmarks.t > --- a/tests/test-rebase-bookmarks.t > +++ b/tests/test-rebase-bookmarks.t > @@ -159,4 +159,18 @@ rebase --continue with bookmarks present > o 0: 'A' bookmarks: > > > - $ cd .. > +ensure that bookmarks given the names of revset functions can be used > +as --rev arguments (issue3950) > + > + $ hg update -q 3 > + $ echo bimble > bimble > + $ hg add bimble > + $ hg commit -q -m 'bisect' > + $ echo e >> bimble > + $ hg ci -m bisect2 > + $ echo e >> bimble > + $ hg ci -m bisect3 > + $ hg book bisect > + $ hg update -q Y > + $ hg rebase -r '"bisect"^^::"bisect"^' -r bisect -d Z > + saved backup bundle to $TESTTMP/a3/.hg/strip-backup/345c90f326a4-backup.hg > _______________________________________________ > Mercurial-devel mailing list > Mercurial-devel@selenic.com > http://selenic.com/mailman/listinfo/mercurial-devel
On Tue, Sep 3, 2013 at 2:52 PM, Augie Fackler <raf@durin42.com> wrote:
> LGTM, queued
Fixing one check-code nit for you and then will push.
On Tue, Sep 3, 2013 at 12:11 PM, Augie Fackler <raf@durin42.com> wrote: > Fixing one check-code nit for you and then will push. > > Thanks.
Patch
diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -186,7 +186,7 @@ def rebase(ui, repo, **opts): dest = scmutil.revsingle(repo, destf) if revf: - rebaseset = repo.revs('%lr', revf) + rebaseset = scmutil.revrange(repo, revf) elif srcf: src = scmutil.revrange(repo, [srcf]) rebaseset = repo.revs('(%ld)::', src) diff --git a/tests/test-rebase-bookmarks.t b/tests/test-rebase-bookmarks.t --- a/tests/test-rebase-bookmarks.t +++ b/tests/test-rebase-bookmarks.t @@ -159,4 +159,18 @@ rebase --continue with bookmarks present o 0: 'A' bookmarks: - $ cd .. +ensure that bookmarks given the names of revset functions can be used +as --rev arguments (issue3950) + + $ hg update -q 3 + $ echo bimble > bimble + $ hg add bimble + $ hg commit -q -m 'bisect' + $ echo e >> bimble + $ hg ci -m bisect2 + $ echo e >> bimble + $ hg ci -m bisect3 + $ hg book bisect + $ hg update -q Y + $ hg rebase -r '"bisect"^^::"bisect"^' -r bisect -d Z + saved backup bundle to $TESTTMP/a3/.hg/strip-backup/345c90f326a4-backup.hg