Bug 3487 - Add a command to view bundle contents
Summary: Add a command to view bundle contents
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: PC Linux
: normal feature
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-05 09:19 UTC by devurandom
Modified: 2012-12-22 18:58 UTC (History)
5 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description devurandom 2012-06-05 09:19 UTC
Please add a command to view the contents of a bundle.

Often I create a bundle (e.g. because I do not have write access to the upstream repository) and need to verify that it really contains all the revisions upstream needs to apply it. So after running "hg bundle mybundle.hg", I would like to have a look into it to compare the list of revisions with the ones I see in the log of my repository.

I have the complete repository available, hence there should be no problem to uncompress the bundle. However having all revisions available makes commands like "hg incoming mybundle.hg" or "hg -R mybundle.hg log", because they show either nothing, or the complete history. I want to see exclusively the contents of the bundle.
Comment 1 kiilerix 2012-06-05 10:48 UTC
It can be done with
  hg log -r "not :`hg id -q -r tip`" -R bundle.hg
but it would convenient to have a way to specify the revision before/after the bundle starts.
Comment 2 devurandom 2012-06-05 19:29 UTC
(In reply to comment #1)
I do not think it does the right job. In my case it outputs nothing.

id -r tip gives the revision of the tip? log -r "not : REV" stops output when it encounters REV? What if bundle contains tip? Could even be the topmost revision in bundle (nothing would be output) or a lower revision (not all contained revisions would be listed).

# hg log -r "not :`hg id -q -r tip default`" -R bundle.hg
This command would be more helpful, but would again not be exact: It would still not list all revisions in the bundle - only those which are missing upstream.
Comment 3 HG Bot 2012-11-07 15:44 UTC
Fixed by http://selenic.com/repo/hg/rev/03e552aaae67
Tomasz Kleczek <tkleczek@fb.com>
bundle: add revset expression to show bundle contents (issue3487)

bundle() revset expression returns all changes that are present
in the bundle file (no matter whether they are in the repo or not).

Bundle file should be specified via -R option.

(please test the fix)