[PATCH 1 of 2] Add tolerant option to log command
mpm at selenic.com
Mon Dec 13 00:08:24 CST 2010
On Sun, 2010-12-12 at 06:28 +0100, Jason Harris wrote:
> On Dec 12, 2010, at 6:08 AM, Augie Fackler wrote:
> > On Dec 11, 2010, at 9:20 PM, Jason Harris wrote:
> >> # HG changeset patch
> >> # User jfh <jason at jasonfharris.com>
> >> # Date 1292119613 -3600
> >> # Node ID 5eec305ce06f7f096871f70aacedcd838eb802c2
> >> # Parent 4a13ca2c21cefc6409072d9f3bd55a1e8d75b6e1
> >> Add tolerant option to log command
> >> Allow revision ranges outside the repository to be handled tolerantly. For
> >> instance assume that the repository has 15 changesets and the user asks for log
> >> --tolerant --rev "0:23" then Mercurial should interpret this request as --rev
> >> "0:15" and not fail with an abort: unknown revision '23'! error.
> >> This is important for GUI clients which are working in a multithreaded way when
> >> strip or collapse or histedit operations are taking place the size of the
> >> repository can become smaller while a status update of the size of the
> >> repository is underway.
> >> Conceivably this should just happen automatically for --noninteractive?
> > Why can't you do --rev 0:-1 for that use case and have it work?
> Ahhh... The message here is dealing with a simplified case so its
> easily understood what I am doing. However in practice the GUI works
> in a very incremental way. More likely in practice the requested range
> will be something like eg --rev "1589:1689" . Its not at all clear
> that you want to go to the tip, the tip might be at 3000 but if the
> instruction executed is "hg strip 1200" then I'll have problems...
Some revset magic for you:
hg log -r '1589:(present(1689) or tip)'
But this doesn't really solve your problem. If 1689 disappears between
the time we check whether it's present and the time we try to decompress
the changelog entry, you still lose.
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel