Bug 3651 - summary/outgoing with largefiles shows "no remote repo" unexpectedly
Summary: summary/outgoing with largefiles shows "no remote repo" unexpectedly
Status: VERIFIED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: largefiles (show other bugs)
Version: unspecified
Hardware: All All
: normal bug
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-05 11:46 UTC by FUJIWARA Katsunori
Modified: 2012-12-09 10:15 UTC (History)
2 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 FUJIWARA Katsunori 2012-10-05 11:46 UTC
When there is no file to upload, "hg summary --large" and "hg
outgoing --large" show "no remote repo" message, even though
valid remote repository is specified ("default", "default-push"
or on command line).

This can be reproduced script below:

========================================
HG="hg --config extensions.largefiles="

${HG} init src
echo a > src/a
${HG} -R src add --large src/a
${HG} -R src commit -m '#0'

${HG} -q clone src cloned

echo "==== summary ===="
${HG} -R cloned summary --large
echo "==== outgoing ===="
${HG} -R cloned outgoing --large
========================================

It is because that "getoutgoinglfiles()" returns None, not only
if no valid remote repository is specified, but also if there is
no file to upload.
Comment 1 HG Bot 2012-10-19 01:13 UTC
Fixed by http://selenic.com/repo/hg/rev/08d11b82d9fc
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
largefiles: distinguish "no remote repo" from "no files to upload" (issue3651)

Before this patch, when no files to upload, "hg outgoing --large" and
"hg summary --large" show "no remote repo", even though valid remote
repository is specified.

It is because that "getoutgoinglfiles()" returns None, not only if no
valid remote repository is specified, but also if no files to upload.

This patch makes "getoutgoinglfiles()" return empty list when no files
to upload, and makes largefiles show "no files to upload" message at
that time.

This patch doesn't test "if toupload is None" route in
"overrideoutgoing()", because this route is not executed unless remote
repository becomes inaccessible just before largefiles specific
processing: successful execution of "orig()" means that at least one
of "default", "default-push" or dest is valid one, and that
"getoutgoinglfiles()" never returns None in such cases.

At "hg summary --large" invocation, this patch shows message below:

    largefiles: (no files to upload)

This follows the message shown by "hg summary" with MQ:

    mq:     (empty queue)

(please test the fix)
Comment 2 Na'Tosha Bard 2012-12-09 10:15 UTC
I have verified that the patch proposed to fix this issue works.  Marking the issue as verified (fixed).