Commit Graph

17721 Commits

Author SHA1 Message Date
Adrian Buehlmann
2b31c67f19 test-largefiles: fix failing test on Windows
The test failed due to / vs. \ in paths issues. Fixes f4c907092969.
2012-10-19 15:45:16 +02:00
Adrian Buehlmann
41c078fbbd test-push-http: fix failing test on Windows
The test failed due to problems with escaping. Fixes 838a7784dd04.
2012-10-19 15:03:35 +02:00
Matt Mackall
89a7edac32 Added signature for changeset 82908eca0eff 2012-10-19 01:38:53 -05:00
Angel Ezquerra
8a78ba05e3 hgwebdir: make collapsed folders easier to distinguish from repositories
Add a "/" character after the collapsed folder names, to make them easier to
distinguish from regular repository and subrepository entries.
2012-07-26 21:29:39 +02:00
FUJIWARA Katsunori
477c2590ac help: indicate help omitting if help document is not fully displayed
Before this patch, there is no information about whether help document
is fully displayed or not.

So, some users seem to misunderstand "-v" for "hg help" just as "the
option to show list of global options": experience on "hg help -v" for
some commands not containing verbose containers may strengthen this
misunderstanding.

Such users have less opportunity for noticing omitted help document,
and this may cause insufficient understanding about Mercurial.

This patch indicates help omitting, if help document is not fully
displayed.

For command help, the message below is displayed at the end of help
output, if help document is not fully displayed:

    use "hg -v help xxxx" to show more complete help and the global
    options

and otherwise:

    use "hg -v help xxxx" to show the global options

For topics and extensions help, the message below is displayed, only
if help document is not fully displayed:

    use "hg help -v xxxx" to show more complete help

This allows users to know whether there is any omitted information or
not exactly, and can trigger "hg help -v" invocation.

This patch causes formatting help document twice, to switch messages
one for omitted help, and another for not omitted. This decreases
performance of help document formatting, but it is not mainly focused
at help command invocation, so this wouldn't become problem.
2012-10-18 10:31:15 +09:00
Matt Mackall
22317edb2f httpclient: fix calling convention violation 2012-10-18 23:55:15 -05:00
FUJIWARA Katsunori
d06e5a0fa2 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)
2012-10-08 23:49:36 +09:00
Pierre-Yves David
b3155544bd push: refuse to push bumped changeset
This applies the same logic as used for `obsolete` and `unstable` changesets.
Refuse to push them without force.

We'll probably want to factor this logic with two new functions
`pctx.troubled()` and `ctx.troubles()`. But I'm waiting for the third
"trouble" to make it into core.
2012-10-19 00:50:12 +02:00
push includes an xxx changeset: yyyyyyyyyy
8af08441ab obsolete: simplify push abort message
to:   push includes xxx changeset: yyyyyyyyyy
2012-10-19 00:46:39 +02:00
Pierre-Yves David
b3f5aa66c1 context: add a bumped method to changectx
Same as `unstable()`, returns true if the changeset is bumped.
2012-10-19 00:43:44 +02:00
Pierre-Yves David
14f39efa9f obsolete: add a flag that allows fixing "bumped" changeset
The first obsolescence flag is introduced to allows for fixing the "bumped"
changeset situation.

    bumpedfix == 1.

Creator of new changesets intended to fix "bumped" situation should not forget
to add this flag to the marker. Otherwise the newly created changeset will be
bumped too. See inlined documentation for details.
2012-10-19 00:41:53 +02:00
Pierre-Yves David
d1da4847fe debugobsolete: add --flags option
This options allows to specify the `flag` part of obsolete markers. For details
about marker flags, check the `mercurial/obsolete.py` documentation. Some random
flag are added to a marker to test this feature.
2012-10-15 14:45:27 +02:00
Pierre-Yves David
6f4d6c0cd4 revset: add a bumped revset
Select bumped changesets.
2012-10-19 00:39:06 +02:00
Pierre-Yves David
7463f55b32 obsolete: add the detection of bumped changeset.
Bumped changesets are non-public changesets that tries to succeed a public()
changeset.
2012-10-19 00:36:18 +02:00
Pierre-Yves David
19b261d640 obsolete: have allsuccessors takes a list of nodes
Additional logic, used to detect mutable history troubles, will need to quickly
compute successors of a whole set of changeset.
2012-10-16 15:49:58 +02:00
Pierre-Yves David
1d9b00f6af obsolete: rename anysuccessors into allsuccessors
The "any" prefix looks like it returned a boolean. `allsuccessors` is more
accurate.
2012-10-19 00:30:11 +02:00
Pierre-Yves David
bc08c6dbf1 obsolete: rename getobscache into getrevs
The old name was not very good for two reasons:
- caller does not care about "cache",
- set of revision returned may not be obsolete at all.

The new name was suggested by Kevin Bullock.
2012-10-19 00:28:13 +02:00
Matt Harbison
7640adfa45 largefiles: always create the cache and standin directories when cloning
The standin matcher only works if the .hglf directory exists (and it won't exist
if 'clone -U' is used, unless --all-largefiles is also specified).  Since not
even 'update -r null' will get rid of the standin directory, this ensures that
the standin directory always exists if the repo has the 'largefiles'
requirement.  This requirement is only set after a largefile is committed, so
these directories will not be created for repos that have the extension enabled
but have not committed a largefile.

With the standin directory in place, 'lfconvert --to-normal' will now be able to
download the required largefiles when converting a repo that was created with
'clone -U', and whose files are not in the usercache.

The downloadlfiles command could probably be put inside the 'largefiles'
requirement conditional too, but given that the user specified --all-largefiles,
there is likely an expectation to print out the number of largefiles downloaded,
even if it is 0.
2012-10-14 15:10:13 -04:00
Matt Harbison
6217120715 largefiles: fix a traceback in lfconvert if a largefile is missing (issue3519)
The largefile may be missing for various reasons, including that a remote
repository was cloned without the --all-largefiles option.  Therefore, it seems
reasonable to attempt to download the missing files and failing that, abort and
indicate the affected file and revision so the user can manually fix the
problem.
2012-10-14 14:44:08 -04:00
Kevin Bullock
7baa4b0e9c bookmarks: further flatten code
This hopefully clarifies the behavior when no NAME is passed, by
separating the branches for listing bookmarks vs. deactivating the
current bookmark.
2012-10-18 16:34:13 -05:00
Kevin Bullock
13bf0fbbec scmutil: add bad character checking to checknewlabel
This factors out the checks from tags and bookmarks, and newly applies
the same prohibitions to branches. checknewlabel takes a new parameter,
kind, indicating the kind of label being checked.

Test coverage is added for all three types of labels.
2012-10-17 21:42:06 -05:00
Kevin Bullock
4abe92a68a tag: disallow '\0' in tag names
This brings the list of disallowed characters in line with bookmarks.
2012-10-17 21:39:07 -05:00
Kevin Bullock
68efaf1422 dirstate: use scmutil.checknewlabel to check new branch name 2012-10-17 21:32:19 -05:00
Kevin Bullock
f8141466d2 bookmarks: use scmutil.checknewlabel
Validation is pulled up into the commands module to avoid an import
cycle.
2012-10-17 17:23:39 -05:00
Kevin Bullock
a3ac9141ee scmutil: add function to validate new branch, tag, and bookmark names
For now the new function only checks to make sure the new label name
isn't a reserved name ('tip', '.', or 'null'). Eventually more of the
checks will be unified between the different types of labels.

The `tag` command is trivially updated to use it. Updating branches and
bookmarks to use it is slightly more invasive and thus reserved for
later patches.
2012-10-17 16:34:46 -05:00
Kevin Bullock
4f9b1ecf92 bookmarks: disallow bookmarks named 'tip', '.', or 'null'
This makes bookmarks reject the same reserved names as tags and branches.
2012-10-17 16:32:43 -05:00
Kevin Bullock
a73acf6db3 bookmarks: abort directly on invalid name
This consolidates the abort message for a bookmark name containing
invalid characters into one place, and renames the valid() method to
checkvalid() to reflect the fact that it's no longer a predicate.
2012-10-17 17:03:01 -05:00
Kevin Bullock
0eae336995 bookmarks: remove redundant check for newline
New bookmarks are already checked for illegal characters (':', '\0',
'\n', and '\r') in bookmarks.valid().
2012-10-17 16:23:42 -05:00
Kevin Bullock
64977a5e28 test-tag: test that all reserved names are rejected 2012-10-17 22:25:41 -05:00
Pierre-Yves David
5f47fc1c50 amend: do a bare kill of temporary changeset
Before this changeset the temporary changeset created by amend was made a
precursors on the amend result. This add unnecessary complexity to the
obsolescence graph. This temporary commit will probably disappear in the future.
It is an unwanted byproduct of amend that nobody cares about.
2012-10-18 17:54:34 +02:00
Pierre-Yves David
9827da9933 amend: add noise in extra to avoid creating obsolescence cycle (issue3664)
Obsolescence cycle are bad and should be avoided as much as possible. The
current amend implemented touch changeset meta data as few as possible. This
make is easy for amend to result in the same node than a precursors. We add some
deterministic noise in extra to avoid this. In practice, the hex of the amended
changeset is stored in 'amend_source' extra key.
2012-10-18 22:12:15 +02:00
Pierre-Yves David
83fc452dc5 changelog: extract description cleaning logic in a dedicated function
The amend logic have use for it.
2012-10-18 22:04:49 +02:00
Adrian Buehlmann
7d6b329175 bookmarks: replace code-redundant comment with something more useful 2012-10-18 22:35:28 +02:00
Adrian Buehlmann
8d5e4c41c9 bookmarks: remove another uneeded return 2012-10-18 22:33:58 +02:00
Kevin Bullock
c9487f44be update: remove unnecessary argument check 2012-05-05 15:30:54 -05:00
Idan Kamara
1d290d6e7b grep: colorize all fields
Colors were picked in accordance to GNU grep.
2012-10-14 20:27:55 +02:00
Idan Kamara
415ed95013 test-grep: add a test for -l 2012-10-14 20:40:23 +02:00
Pierre-Yves David
99b5dd9737 clfilter: remove use of xrange in revset
For changelog level filtering to take effect it need to be used for any
iteration. Some remaining use of `xrange` in revset code is replace by proper
use of `changelog.revs` or direct iteration over changelog.
2012-10-08 15:54:53 +02:00
Pierre-Yves David
dc4260df80 largefile: use self in repo method instead of repo
Most method added (or overwritten) to repo by largefile works on `repo`
instead of `self`. This currently works without trouble because `self` and
`repo` are likely the same. However this is semantically dubious and this may
cause issue for filtering. `self` may be proxy object different from the `repo`
one.

This changeset fix that and use `self` when applicable.
2012-10-08 15:41:58 +02:00
Pierre-Yves David
9c04357187 test: use proper subclassing in test-issue2137.t.
To use changelog filtering on the repository, we plan to use "proxy" object that
perfectly mock a repository but with a filtered changelog.

Altering the `repo.commit` function using `extensions.wrapfunction` will prevent
the logic to propagate to the proxy class by the mean of inheritance.

We changes the extension to use subclassing as expectable.
2012-10-16 23:12:07 +02:00
Mads Kiilerich
7e19bad572 run-tests: remove dead code for supporting old test scripts 2012-10-18 00:44:32 +02:00
Mads Kiilerich
1c2faf6c4c run-tests: handle windows crlf in .py tests again
Before a55b74d8de3a all crlf occurrences in test output on Windows were simply
changed to lf. In a55b74d8de3a it was replaced by more clever handling in the
.t test runner ... but the .py runner was forgotten and many .py tests were
failing on Windows.

The crlf/lf replacement is now reintroduced in the py test runner.
2012-10-18 00:33:29 +02:00
Mads Kiilerich
0b618576fd test-run-tests.t: fix wrong test case for cr handling on Windows
An incorrect and failing test case was introduced in a55b74d8de3a.
2012-10-18 00:33:26 +02:00
Shun-ichi GOTO
cc7e94372c win32mbcs: add reversing wrapper for some unicode-incompatible functions.
This changeset fix the problem to use win32mbcs with mercurial 2.3 or
later.

The problem is brought by side effect of modification of
encoding.upper() (changeset 17236:8b2442729eb3) because upper() does
not accept unicode string argument. So wrapped util.normcase() which
uses upper() will fail. In other words, upper() and lower() are
unicode incompatible.

To fix this issue, this changeset adds new wrapper for reversed
conversion (unicode to str) for lower() and upper() to use them
safely.
2012-10-17 18:09:00 +09:00
Huayang
2cbf7a996c convert: normalize paths in filemaps (issue3612)
convert doesn't normalise double slashes in paths. Path normalization
is applied when a path is loaded into filemap and when a file lookup
request is issued to filemap.
2012-10-05 16:27:34 -07:00
Matt Mackall
b170ca8911 repair: use node to track post-strip bookmark target
Revision numbers are unstable when non-consecutive revs are stripped.
2012-10-17 15:37:25 -05:00
Christian Ebert
a53e549921 keyword: move commands.inferrepo for code maintenance 2012-10-17 17:32:01 +02:00
Matt Harbison
8c0a3d405b largefiles: update lfutil.findoutgoing() discovery method
It looks like this method missed the updates in 7a899bd0f9c0 (which changed the
preferred discovery method from findcommonincoming() to findcommonoutgoing()),
and 8b2938386599 (which rolls up the outgoing lists into a single object).
2012-10-08 22:43:54 -04:00
Wagner Bruna
795c3947e9 wireproto: fix pushkey hook failure and output on remote http repo
Over http, a failed pushkey hook simply crashed the server, and
successful hook output was never sent to the client.
2012-10-15 18:37:34 -03:00
Sean Farley
26d22253ab phases: add a phase and phasestr method to file context 2012-10-16 17:09:50 -05:00