Commit Graph

19653 Commits

Author SHA1 Message Date
Siddharth Agarwal
88c86521eb merge: standardize error message for dirty working dir 2013-09-23 20:50:51 -07:00
Siddharth Agarwal
663145e3f0 update: standardize error message for dirty update --check
This and following patches will standardize the error message for dirty working
directories to "uncommitted changes".
2013-09-23 20:33:02 -07:00
Siddharth Agarwal
7213ad0e07 update: improve error message for dirty non-linear update with rev 2013-09-23 20:08:52 -07:00
Siddharth Agarwal
ecd3be8cef update: add error message for dirty non-linear update with no rev
Previously, the error message for a dirty non-linear update was the same (and
relatively unhelpful) whether or not a rev was specified. This patch and an
upcoming one will introduce separate, more helpful hints.
2013-09-23 20:07:30 -07:00
Siddharth Agarwal
55e7463f51 update: improve error message for clean non-linear update 2013-09-23 17:43:33 -07:00
Siddharth Agarwal
3bfd19f5c2 pull: for pull --update with failed update, print hint if any
An upcoming patch will add a hint to the abort message, and we don't want to
lose that here.
2013-09-23 19:02:32 -07:00
Alexander Plavin
8495f525a8 paper: edit search hint to include new feature description 2013-09-06 13:30:57 +04:00
Alexander Plavin
e94f8da7af paper: define searchhint message in map file and use it in other templates 2013-07-25 01:12:25 +04:00
Matt Mackall
b73d929200 debugshell: appease pyflakes 2013-09-23 14:28:01 -07:00
Augie Fackler
1e3892da3b check-code: new rule to forbid imports of a.b on the same line as other imports
This style of import can trip up 2to3 and cause it to produce invalid
files if one of the imports is supposed to be a relative import. This
prevents that behavior, and in the process exposed a lot of silly
import errors related to the email module.
2013-09-20 10:18:09 -04:00
Augie Fackler
8031af5c75 notify: correct import of email module, sort stdlib modules to top 2013-09-20 10:16:55 -04:00
Augie Fackler
5621af34e7 patchbomb: correct import of email module 2013-09-20 10:16:35 -04:00
Augie Fackler
a49f3fa2a8 mail: correct import of email module 2013-09-20 10:16:02 -04:00
Augie Fackler
897a535360 patch: correct import of email module 2013-09-20 10:15:51 -04:00
Augie Fackler
954e5e0c1c subrepo: move import of xml.minidom.dom to its own line for check-code 2013-09-20 10:15:37 -04:00
Augie Fackler
aeb89622cb convert: move import of xml.minidom.dom to its own line for check-code 2013-09-20 10:15:23 -04:00
Augie Fackler
2727bcf864 perf: rearrange imports of changelong and manifest to appease check-code 2013-09-20 10:14:59 -04:00
Matt Mackall
c62db31af0 merge with stable 2013-09-23 13:26:11 -07:00
Matt Mackall
bd565fec9b tests: fix check-code breakage 2013-09-23 13:22:28 -07:00
FUJIWARA Katsunori
af33f66d43 help: use full name of extensions to look up them for keyword search
Before this patch, "hg help -k KEYWORD" fails, if there is the
extension of which name includes ".", because "extensions.load()"
invoked from "help.topicmatch()" fails to look such extension up, even
though it is already loaded in.

"help.topicmatch()" invokes "extensions.load()" with the name gotten
from "extensions.enabled()". The former expects full name of extension
(= key in '[extensions]' section), but the latter returns names
shortened by "split('.')[-1]". This difference causes failure of
looking extension up.

This patch adds "shortname" argument to "extensions.enabled()" to make
it return shortened names only if it is True. "help.topicmatch()"
turns it off to get full name of extensions.

Then, this patch shortens full name of extensions by "split('.')[-1]"
for showing them in the list of extensions.

Shortening is also applied on names gotten from
"extensions.disabled()" but harmless, because it returns only
extensions directly under "hgext" and their names should not include
".".
2013-09-23 20:23:25 +09:00
Alexander Plavin
7837b6944a paper: add infinite scrolling to graph by calling ajaxScrollInit at the page 2013-09-22 14:19:57 +04:00
Wojciech Lopata
0a0c3321e2 generaldelta: initialize basecache properly
Previously basecache was incorrectly initialized before adding the first
revision from a changegroup. Basecache value influences when full revisions are
stored in revlog (when using generaldelta). As a result it was possible to
generate a generaldelta-revlog that could be bigger by arbitrary factor than its
non-generaldelta equivalent.
2013-09-20 10:45:51 -07:00
Alexander Plavin
9bfb8fe898 hgweb: add graph mode of ajax response processing
While the default mode appends all the new entries to a container on the page,
the graph mode resizes canvas correctly, and repaints the graph to include
newly received data.
2013-09-20 00:42:13 +04:00
Alexander Plavin
f0c93d06c2 hgweb: make infinite scroll handling more generic and extensible
Namely, this allows the next page pointer to be not only revision hash given
in page code, but also any value computed from the value for previous page.
2013-09-22 14:18:23 +04:00
Sean Farley
6064a14daf strip: set current bookmark to None if stripped 2013-09-07 15:07:10 -05:00
Augie Fackler
fd194f3d5b sslutil: backed out changeset 2cb59fd7ebb6 (issue4038)
Python docs are a little unclear, but mpm reports reading the OpenSSL
source code shows that PROTOCOL_SSLv23 allows TLS whereas
PROTOCOL_SSLv3 does not.
2013-09-18 14:40:17 -04:00
Augie Fackler
401f0a3a21 httpclient: apply upstream revision da7579b034a4 to fix SSL problems (issue4038) 2013-09-18 14:45:28 -04:00
Antoine Pitrou
ecc34bd7c0 bundle: fix performance regression when bundling file changes (issue4031)
Somewhere before 2.7, a change [82beb9b16505] was committed that
entailed a large performance regression when bundling (and therefore
remote cloning) repositories. For each file in the repository, it would
recompute the set of needed changesets even though it is the same for
all files. This computation would dominate bundle runtimes according to
profiler output (by 10x or more).
2013-09-07 21:20:00 +02:00
Alexander Plavin
ee2943c680 hgweb: add reset javascript function to Graph
It makes the Graph object to be in the same state as just after
the initialization. This will help to add infinite scrolling to graph view.
2013-09-06 13:30:59 +04:00
FUJIWARA Katsunori
0b216b06c5 largefiles: setup "largefiles" feature in each repositories individually
Before this patch, if largefiles extension is enabled once in any of
target repositories, commands handling multiple repositories at a time
like below misunderstand that "largefiles" feature is supported also
in all other local repositories:

  - clone/pull from or push to localhost
  - recursive execution in subrepo tree

This patch registers "featuresetup()" into "featuresetupfuncs" of
"localrepository" to support "largefiles" features only in
repositories enabling largefiles extension, instead of adding
"largefiles" feature to class variable "_basesupported" of
"localrepository".

This patch also adds checking below to the largefiles specific class
derived from "localrepository":

  - push to localhost: whether features supported in the local(= dst)
    repository satisfies ones required in the remote(= src)

This can prevent useless looking up in the remote repository, when
supported and required features are mismatched: "push()" of
"localrepository" also checks it, but it is executed after looking up
in the remote.
2013-09-21 21:33:29 +09:00
FUJIWARA Katsunori
c1e7da5d4f localrepo: make supported features manageable in each repositories individually
Before this patch, all localrepositories support same features,
because supported features are managed by the class variable
"supported" of "localrepository".

For example, "largefiles" feature provided by largefiles extension is
recognized as supported, by adding the feature name to "supported" of
"localrepository".

So, commands handling multiple repositories at a time like below
misunderstand that such features are supported also in repositories
not enabling corresponded extensions:

  - clone/pull from or push to localhost
  - recursive execution in subrepo tree

"reposetup()" can't be used to fix this problem, because it is invoked
after checking whether supported features satisfy ones required in the
target repository.

So, this patch adds the set object named as "featuresetupfuncs" to
"localrepository" to manage hook functions to setup supported features
of each repositories.

If any functions are added to "featuresetupfuncs", they are invoked,
and information about supported features is managed in each
repositories individually.

This patch also adds checking below:

  - pull from localhost: whether features supported in the local(= dst)
    repository satisfies ones required in the remote(= src)

  - push to localhost: whether features supported in the remote(= dst)
    repository satisfies ones required in the local(= src)

Managing supported features by the class variable means that there is
no difference of supported features between each instances of
"localrepository" in the same Python process, so such checking is not
needed before this patch.

Even with this patch, if intermediate bundlefile is used as pulling
source, pulling indirectly from the remote repository, which requires
features more than ones supported in the local, can't be prevented,
because bundlefile has no information about "required features" in it.
2013-09-21 21:33:29 +09:00
FUJIWARA Katsunori
495b98fa37 extensions: list up only enabled extensions, if "ui" is specified
Before this patch, "extensions.extensions()" always lists up all
loaded extensions. So, commands handling multiple repositories at a
time like below enable extensions unexpectedly.

  - clone from or push to localhost: extensions enabled only in the
    source are enabled also in the destination

  - pull from localhost: extensions enabled only in the destination
    are enabled also in the source

  - recursive execution in subrepo tree: extensions enabled only in
    the parent or some of siblings in the tree are enabled also in
    others

In addition to it, extensions disabled locally may be enabled
unexpectedly.

This patch checks whether each of extensions should be listed up or
not, if "ui" is specified to "extensions.extensions()", and invokes
"reposetup()" of each extensions only for repositories enabling it.
2013-09-21 21:33:29 +09:00
Matt Mackall
2513030d97 merge with stable 2013-09-23 11:37:06 -07:00
Siddharth Agarwal
3f3eb7081b largefiles: remove bailifchanged check from overridepull (BC)
This brings pull --rebase with largefiles in line with pull --rebase without.
2013-09-20 15:26:30 -07:00
Siddharth Agarwal
139b4eb522 rebase: remove bailifchanged check from pullrebase (BC)
This saves us a relatively superfluous status check for pull --rebase (if
rebase runs, it'll check for a clean working directory anyway), and brings hg
pull --rebase closer to hg pull && hg rebase.

This is a behavior change because pull --rebase with a dirty working directory
will now abort after performing the pull rather than before.
2013-09-20 16:32:05 -07:00
Alexander Plavin
fd04e86dd0 revset: fix wrong keyword() behaviour for strings with spaces
Some changesets can be wrongly reported as matched by this predicate
due to searching in a string joined with spaces and not individually.
A test case added, which fails without this fix.
2013-08-06 00:52:06 +04:00
Matt Mackall
945b0b2cfa Added signature for changeset 52a9b67dec5f 2013-09-03 18:05:11 -05:00
FUJIWARA Katsunori
08b1b07292 tags: write tag overwriting history also into tag cache file (issue3911)
Before this patch, tag overwriting history is not written into tag
cache file ".hg/cache/tags".

This may give higher priority to local tag than global one, even if
the former is overwritten by the latter, because tag overwriting
history is used to compare priorities of them (as "rank").

In such cases, "hg tags" invocations using tag cache file shows
incorrect tag information.

This patch writes tag overwriting history also into tag cache file.
2013-08-28 22:09:53 +09:00
FUJIWARA Katsunori
ca113e2a18 histedit: add description about "histedit --outgoing" to command help
Before this patch, there is no explicit description that argument is
treated as the URL of the destination repository when "--outgoing" is
specified.

This patch adds description about "histedit --outgoing" to command
help of it.
2013-08-26 16:11:21 +09:00
FUJIWARA Katsunori
bc5efe5be4 histedit: add description about basic histedit function to command help
Before this patch, there is no explicit description that histedit
edits changesets between specified ancestor and the parent of the
working directory: users may notice it by error message "REV is not an
ancestor of working directory".

This patch adds description about basic histedit function to command
help of it.

This patch uses term "ancestor" instead of "parent", because it seems
to be more suitable, and almost all (error) messages already use it.
2013-08-26 16:11:21 +09:00
Bryan O'Sullivan
c32bb7d1f6 rebase: handle bookmarks matching revset function names (issue3950)
We handled these correctly with all rev-specifying options except,
somehow, -r/--rev.
2013-09-03 15:12:35 -04:00
Matt Mackall
59df62f815 Added signature for changeset da90524fb77e 2013-08-01 22:37:44 -05:00
Kevin Bullock
7e226a7735 bookmarks: pull --update updates to active bookmark if it moved (issue4007)
This makes `hg pull --update` behave the same wrt the active bookmark as
`hg pull && hg update` does as of 13ea5e437ff8. A helper function,
bookmarks.calculateupdate, is added to prevent code duplication between
postincoming and update.
2013-08-01 21:43:14 -05:00
Matt Mackall
0ac4365bef merge with i18n 2013-08-01 20:06:00 -05:00
Matt Mackall
d52228b61b histedit: don't clobber working copy on --abort if not on histedit cset
Similar to issue4009, 2.7 will force people to abort histedits before
doing interesting things. Without this fix, people with histedit
sessions they wandered away from before upgrading to 2.7 could clobber
their working copy for no reason.
2013-08-01 19:55:02 -05:00
Matt Mackall
758ebca217 rebase: allow aborting when descendants detected
With this, all aborts will succeed in removing the state, rather than
leaving the user in 'what do I do now?' limbo.
2013-08-01 17:54:12 -05:00
Matt Mackall
c63eb47329 rebase: continue abort without strip for immutable csets (issue3997)
This causes us to simply discard the rebase state.
2013-08-01 17:45:13 -05:00
Matt Mackall
0cf44a4d14 rebase: don't clobber wd on --abort when we've updated away (issue4009) 2013-08-01 17:33:09 -05:00
Wagner Bruna
04fb6bb30f i18n-pt_BR: synchronized with 1d921a7399ad 2013-08-01 02:36:59 -03:00
FUJIWARA Katsunori
13b4a0deaa i18n-ja: synchronized with d64dab8bf4c4 2013-08-01 04:32:29 +09:00