Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 15 Apr 2014 13:42:45 -0400] rev 21065
bundle2: prepare readbundle to return more that one type of bundle
We first read 4 bytes to get the `HG10` bytes then we read the compression scheme
if this is `HG10`. This prepares the code for the arrival of `HG20` handling.
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 14 Apr 2014 15:45:30 -0400] rev 21064
bundle2: add a ui argument to readbundle
The bundle2 unbundler needs a ui argument. We are now passing this information
to `readbundle`.
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 14 Apr 2014 15:33:50 -0400] rev 21063
bundle2: move `readbundle` into the `exchange` module
The `readbundle` function is going to understand the bundle2 header. We move the
function to a more suitable place before making any other changes.
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 14 Apr 2014 14:46:32 -0400] rev 21062
bundle2: use headerless HG10UN stream in changegroup
Using `readbundle` in the part handlers creates a circular import hell. We are
now using a simple `HG10UN` stream with no header. Some parameters may
later be introduced on the part to change parameter.
Producers are updated as well.
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 10 Apr 2014 10:53:43 -0700] rev 21061
bundle2: allow using bundle2 for push
We now support bundle2 for local push. The unbundle function has to detect
which version of the bundle to use since the return type is different.
Note that push error handling is currently nonexistent. This is one of the
reasons why bundle2 is still disabled by default.
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 11 Apr 2014 06:43:01 -0700] rev 21060
bundle2: add a "check:heads" handler
This part is intended to hold the same role as the `heads` argument of the
unbundle function. The client fill it with the known heads at bundle time and
the server will abort if its heads changed.
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 13 Apr 2014 16:36:51 -0400] rev 21059
repoview: make the conversion from node to rev explicit while computing hidden
You cannot use `repo[...]` lookup here. 1. It is slow 2. It is very likely to
trigger a hidden computation itself, entering an infinite loop.
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 13 Apr 2014 16:39:31 -0400] rev 21058
repoview: drop duplicated lookup
We are already looking for local tags on the line above. We can safely drop
this extra lookup.
Aaron Jensen <ajensen@webmd.net> [Wed, 16 Apr 2014 09:32:04 -0700] rev 21057
hgweb: adding branch, tags, bookmarks, user, and file list to rss feed entries
Aaron Jensen <ajensen@webmd.net> [Wed, 16 Apr 2014 09:31:37 -0700] rev 21056
hgweb: adding branch, tags, bookmarks, user, and file list to atom feed entries
Mads Kiilerich <madski@unity3d.com> [Mon, 07 Apr 2014 23:10:20 +0200] rev 21055
patchbomb: warn when emailing a dirty working directory parent
Mads Kiilerich <madski@unity3d.com> [Wed, 19 Mar 2014 00:19:54 +0100] rev 21054
tests: coverage of convert and filemap include and the default of include all
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 16 Apr 2014 00:37:24 +0900] rev 21053
largefiles: remove no more referred "getoutgoinglfiles()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 16 Apr 2014 00:37:24 +0900] rev 21052
largefiles: use "outgoinghooks" to avoid redundant outgoing check
Before this patch, "hg outgoing" invokes "findcommonoutgoing()" not
only in "commands.outgoing()" but also in
"overrides.overrideoutgoing()" (via "getoutgoinglfiles()"), when
largefiles is enabled. The latter is redundant.
This patch uses "outgoinghooks" to avoid redundant outgoing check.
Newly introduced function "overrides.outgoinghook()" is registered
into "outgoinghooks" to get the result of outgoing check in
"commands.outgoing()".
It invokes "lfutil.getlfilestoupload()" directly with the result of
outgoing check to avoid redundant outgoing check in
"getoutgoinglfiles()": "sort()" is needed, because
"lfutil.getlfilestoupload()" doesn't sort the result of it.
This patch also omits "if toupload is None" ("No remote repo") case,
because failure of looking remote repository up should raise exception
in "commands.outgoing()" before invocation of "outgoinghooks".
Newly added "hg outgoing --large --graph" tests examine
"outgoinghooks" invocations in "hg outgoing --graph" code path.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 16 Apr 2014 00:37:24 +0900] rev 21051
outgoing: introduce "outgoinghooks" to avoid redundant outgoing check
This patch introduces "outgoinghooks" to avoid redundant outgoing
check for "hg outgoing" in other than "commands.outgoing" (or utility
functions used by it).
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 16 Apr 2014 00:37:24 +0900] rev 21050
hg: make "_outgoing()" return peer object for remote repository
This patch makes "_outgoing()" return peer object for remote
repository, to avoid re-execution "expandpath()", "parseurl()", and
"peer()" on caller side for specified URL.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 16 Apr 2014 00:37:24 +0900] rev 21049
hg: make "_outgoing()" return empty list instead of "None"
This patch makes "_outgoing()" return empty list instead of "None", if
there are no outgoing changesets, because:
- returning "None" requires callers to examine whether returned
value is "None" or not explicitly, if callers want to execute loop
on returned value, but
- there are no explicit needs to return "None"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 16 Apr 2014 00:37:24 +0900] rev 21048
largefiles: use "summaryremotehooks" to avoid redundant outgoing check
Before this patch, "hg summary --remote --large" invokes
"findcommonoutgoing()" not only in "commands.summary()" but also in
"overrides.overridesummary()" (via "getoutgoinglfiles()"). The latter
is redundant.
This patch uses "summaryremotehooks" to avoid redundant outgoing check.
Newly introduced function "overrides.summaryremotehook()" is
registered into "summaryremotehooks" to get the result of outgoing
check in "commands.summary()".
It invokes "lfutil.getlfilestoupload()" directly with the result of
outgoing check to avoid redundant outgoing check in
"getoutgoinglfiles()".
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 16 Apr 2014 00:37:24 +0900] rev 21047
summary: introduce "summaryremotehooks" to avoid redundant incoming/outgoing check
This patch introduces "summaryremotehooks" to avoid redundant
incoming/outgoing check for "hg summary" in other than
"commands.summary".
Only if "--remote" is not specified for "hg summary", hooks registered
in "summaryremotehooks" are invoked with "None" as "changes" argument
at first, and they should return tuple of two booleans meaning
"whether incomings are needed" and "whether outgoings are needed".
If no hooks return tuple containing "True", "hg summary" does nothing
any more, because incoming/outgoing check is not needed.
Otherwise, hooks are invoked again: at this time, "changes" argument
refers the result of incoming/outgoing check.
This patch also prevents RepoError from being raised if "--remote" is
not specified for "hg summary", because of backward compatibility for
"hg summary --large" without "--remote".
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 16 Apr 2014 00:37:24 +0900] rev 21046
util: enable "hooks" to return list of the values returned from each hooks
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 16 Apr 2014 00:37:24 +0900] rev 21045
summary: separate checking incoming/outgoing and showing remote summary
This patch separates checking incoming/outgoing and showing remote
summary, as a preparation for refactoring in succeeding patches,
because:
- checking incoming/outgoing may be needed, even if "--remote" is
not specified for "hg summary"
- checking incoming/outgoing may not be needed simultaneously
"hg summary --large" without "--remote" is typical case for these.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 16 Apr 2014 00:37:24 +0900] rev 21044
largefiles: reuse "findcommonoutgoing()" result at "hg push"
Before this patch, "hg push" invokes "findcommonoutgoing()" not only
in "exchange.push()" but also in "lfilesrepo.push()", when largefiles
is enabled. The latter is redundant.
This patch registers own "prepushoutgoinghook" function into
"prepushoutgoinghooks" of "localrepository" to reuse
"findcommonoutgoing()" result.
"prepushoutgoinghook" omits "changelog.nodesbetween()" invocation,
because "findcommonoutgoing()" invocation in "exchange.push()" takes
"onlyheads" argument and it considers "nodesbetween()".
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 16 Apr 2014 00:37:24 +0900] rev 21043
localrepo: introduce "prepushoutgoinghooks" to extend outgoing check easily
This patch introduces "prepushoutgoinghooks" to extend outgoing check
before pushing changesets to remote easily.
This chooses the function returning "util.hooks" instead of the one to
be overridden.
The latter may cause problems silently, if one of overriders forgets
(or fails) to execute a kind of "super(xxx, self).overridden(...)". In
the other hand, the former can ensure that all registered functions
are invoked, unless one of them raises an exception.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 16 Apr 2014 00:37:24 +0900] rev 21042
largefiles: centralize the logic to get outgoing largefiles
Before this patch, "overrides.getoutgoinglfiles()" (called by
"overrideoutgoing()" and "overridesummary()") and "lfilesrepo.push()"
implement similar logic to get outgoing largefiles separately.
This patch centralizes the logic to get outgoing largefiles in
"lfutil.getlfilestoupload()".
"lfutil.getlfilestoupload()" takes "addfunc" argument, because each
callers need different information (and it is useful for enhancement
in the future).
- "overrides.getoutgoinglfiles()" needs only filenames
- "lfilesrepo.push()" needs only hashes of largefiles
Matt Harbison <matt_harbison@yahoo.com> [Fri, 14 Mar 2014 21:32:05 -0400] rev 21041
cat: support cat with explicit paths in subrepos
The cat command with an explicit path into a subrepo is now handled by invoking
cat on the file, from that subrepo. The previous behavior was to complain that
the file didn't exist in the revision (of the top most repo). Now when the file
is actually missing, the revision of the subrepo is named instead (though it is
probably desirable to continue naming the top level repo).
The documented output formatters %d and %p reflect the path from the top level
repo, since the purpose of this is to give the illusion of a unified repository.
Support for the undocumented (for cat) formatters %H, %R, %h, %m and %r was
added long ago (I tested back as far as 0.5), but unfortunately these will
reflect the subrepo node instead of the parent context.
The previous implementation was a bit loose with the return value, i.e. it would
return 0 if _any_ file requested was cat'd successfully. This maintains that
behavior.
Matt Harbison <matt_harbison@yahoo.com> [Thu, 13 Mar 2014 23:45:18 -0400] rev 21040
cat: move most of the implementation into cmdutils.cat()
This will allow access to the reusable parts from subrepos, similar to add(),
forget(), etc.
Kent Frazier <kentfrazier@gmail.com> [Tue, 15 Apr 2014 17:51:27 -0400] rev 21039
tests: mark test in tests/test-help.t as contingent on gettext being available
Kent Frazier <kentfrazier@gmail.com> [Tue, 15 Apr 2014 16:27:12 -0400] rev 21038
setup.py: fix C extension compilation issue with OS X 10.9 and Xcode 5.1
Sean Farley <sean.michael.farley@gmail.com> [Mon, 14 Apr 2014 18:21:26 -0500] rev 21037
color: add effect to the template symbol table
Previously, words like 'red' had to be protected by quotes before passing to
the label template function. Now, we add color effects to the symbol table so
that commands like,
$ hg log -r . -T "{label(red, node|short)}\n"
can work without the need for quoting.
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 16 Apr 2014 02:38:11 +0900] rev 21036
amend: invoke editor forcibly when "--edit" option is specified
422981492ace introduces "--edit" option into "hg commit", but it
doesn't work for "hg commit --amend", because
422981492ace prepares
for editor invocation only around "commitfunc()" internal function,
which is used only for temporary amend commit by "cmdutil.amend()".
Actual commit message editing is executed in "cmdutil.amend()".
This patch invokes editor forcibly when "--edit" option is specified
for "hg commit --amend", even if commit message is specified
explicitly by "--message" or "--logfile".
This patch also removes useless handling for commit message and editor
invocation around "commitfunc()" internal function.