Commit Graph

20032 Commits

Author SHA1 Message Date
Simon Heimberg
664e8c41fe minirst: find admonitions before pruning comments and adding margins
Lines with only a directive are not deleted anymore because they are detected
before comments are deleted by prunecomments().
addmargins() will be adapted later.
2013-11-04 10:23:06 +01:00
Simon Heimberg
c5557c2259 minirst: do not fail on an empty admonition block 2013-11-04 10:23:06 +01:00
Simon Heimberg
0e05d277a4 minirst: do not interpret a directive as a literal block
When a directive was on its own line, it was interpreted as a literal block.

Example of problematic input:

.. note::

    a note text
2013-11-04 10:23:06 +01:00
Simon Heimberg
7d27400fc9 check-code: prepend warning prefix for repeated warnings only once
When a warning occured several times in one file, "warning: " was prepended
several times:

examplefile.py:3:
 > def a(object):
 warning: this looks wrong
examplefile.py:27:
 > def x(object):
 warning: warning: this looks wrong
2013-11-02 11:25:04 +01:00
Simon Heimberg
bfb1db1bf5 check-code: fix an error message 2013-11-02 11:25:33 +01:00
Durham Goode
e692055e06 rebase: fix working copy location after a --collapse (issue4080)
Rebasing with --collapse would leave the working copy on the parent of the
collapsed commit, instead of on the collapsed commit.  This fixes that.  Also
fixes a few tests that already covered this area but had bad data.

This also fixes issue3716 where bookmarks are not kept across rebases with
--collapse. I updated the test to cover that case as well.
2013-11-01 17:08:06 -07:00
Matt Mackall
4e48b57a5d Added signature for changeset 18c75911cf9f 2013-11-01 17:04:18 -05:00
Matt Mackall
dda9110798 merge with i18n 2013-11-01 17:04:03 -05:00
Wagner Bruna
9028409982 i18n-pt_BR: fix a few missing changes on 071919a4e8a4 2013-11-01 11:04:48 -02:00
Wagner Bruna
caccfe7d2e i18n-pt_BR: synchronized with 071919a4e8a4 2013-10-31 00:25:20 -02:00
FUJIWARA Katsunori
64c6466de9 i18n-ja: synchronized with 98058c06ff6b 2013-10-31 03:05:46 +09:00
Durham Goode
4791cb4594 shelve: use rebase instead of merge (issue4068)
Previously, shelve used merge to unshelve things. This meant that if you shelved
changes on one branch, then unshelved on another, all the changes from the first
branch would be present in the second branch, and not just the shelved changes.

The fix is to use rebase to pick the shelve commit off the original branch and
place it on top of the new branch. This means only the shelved changes are
brought across.

This has the side effect of fixing several other issues in shelve:

- you can now unshelve into a file that already has pending changes
- unshelve a mv/cp now has the correct dirstate value (A instead of M)
- you can now unshelve to an ancestor of the shelve
- unshelve now no longer deletes untracked .orig files

Updates tests and adds a new one to cover the issue. The test changes fall into
a few categories:

- I removed some excess output
- The --continue/--abort state is a little different, so the parents and
  dirstate needed updating
- Removed some untracked files at certain points that cluttered the output
2013-10-23 13:12:48 -07:00
FUJIWARA Katsunori
2151b431ba doc: put text into header of 1st column in table to generate page correctly
>From the table without header text of 1st column, docutils generates
the table with fully empty header row.
2013-10-25 01:14:18 +09:00
FUJIWARA Katsunori
23f95aaedb doc: use double quotation mark to quote arguments in examples for Windows users
On Windows, only double quotation mark can quote command line
arguments.

So, this patch uses double quotation mark to quote command line
arguments in all examples of online help document.
2013-10-25 01:14:18 +09:00
FUJIWARA Katsunori
19e586921c doc: end line preceding command line example with double colon 2013-10-25 01:14:18 +09:00
Takumi IINO
56ac953b3c hgweb: add missing semicolon 2013-10-24 21:37:13 +09:00
Mads Kiilerich
0f5241006f rebase: improve error message for more than one external parent 2013-10-23 23:42:13 +08:00
Mads Kiilerich
bb06a4346f rebase: refactor and rename checkexternal - it is a getter more than a setter 2013-10-24 12:05:22 +08:00
Mads Kiilerich
bcec8229ea largefiles: don't prompt for normal/largefile changes when doing plain updates
We used to get like:

  $ hg up -r 2
  foo has been turned into a normal file
  keep as (l)argefile or use (n)ormal file? l
  getting changed largefiles
  0 largefiles updated, 0 removed
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
  $ cat foo
  cat: foo: No such file or directory
  [1]

- which both asked the wrong question and did the wrong thing.

Instead, skip this conflict resolution when the local conflicting file has been
scheduled for removal and there thus is no conflict.
2013-10-25 02:33:59 +08:00
Mads Kiilerich
d2031cc679 largefiles: remove extra check for file to get - it _is_ by definition in p2 2013-10-25 02:25:10 +08:00
Mads Kiilerich
db98125811 largefiles: don't process merge actions at all when overwriting 2013-10-25 01:24:10 +08:00
Mads Kiilerich
eabc047878 spelling: random spell checker fixes 2013-10-24 01:49:56 +08:00
Mads Kiilerich
63e01aeb0a largefiles: hide passwords in URLs in ui messages 2013-10-17 16:13:15 +08:00
Mads Kiilerich
59f7203fee largefiles: don't add extra \n when displaying remote messages in putlfile 2013-10-24 01:49:56 +08:00
Mads Kiilerich
46512da6c4 largefiles: add missing \n in ui.warn messages 2013-10-21 11:22:54 +08:00
Mads Kiilerich
ee0298712d largefiles: fix 'unexpected response' warning newlines
Warnings should always end with \n. The warning message might contain or end
with \n, so better show it with repr encoding.
2013-10-24 01:49:56 +08:00
Pascal Quantin
e36cdfe78f win32: add shelve extension to mercurial.ini 2013-10-21 23:40:56 +02:00
Javi Merino
74347222ce strip: fix spelling: "allows to" -> "allows you to" 2013-10-21 22:23:36 +01:00
Yuya Nishihara
4a2a9b7d3a cmdutil: fix makefileobj not to clobber default modemap dict
Problem occurs if "hg cat -o" is invoked more than once in the same process.
The output of "hg cat" will be appended because of modemap[fn] = 'ab'.
2013-10-22 23:38:58 +09:00
Takumi IINO
c3c2c45028 shelve: make unshelve work even if it don't run in repository root
revertfiles are relative to the repository root. not paths relative to the cwd.
2013-10-22 12:41:05 +09:00
Matt Mackall
b3d6f9b337 tests: move generaldelta test to inline python (issue4064) 2013-10-21 10:50:58 -07:00
Matt Mackall
6ddd78602b help: minor tweak to push help 2013-10-21 10:26:38 -07:00
Johan Bjork
6055bcdec2 patch: ensure valid git diffs if source/destination file is missing (issue4046)
This is arguably a workaround, a better fix may be in the repo to
ensure that it won't list a file 'modified' unless there is a file
context for the previous version.
2013-10-13 08:38:30 -04:00
FUJIWARA Katsunori
6371252cb7 histedit: add description about exit code 2013-10-27 00:24:25 +09:00
FUJIWARA Katsunori
88d39077f8 rebase: add description about exit code when there are unresolved conflicts 2013-10-27 00:24:25 +09:00
FUJIWARA Katsunori
46e5c834e4 shelve: remove unused variable assignment
Fix test-check-pyflakes.t error after 98058c06ff6b.

This patch replaces "readshelvedfiles()" invocation by
"shelvedfile().exists()" check and aborting, because it is required
only to ensure that shelved changes corresponded to specified name
exist after invocation.

This patch also remove definition of "readshelvedfiles()" itself,
because it is invoked only from the line removed by this patch.
2013-11-02 04:49:42 +09:00
Pierre-Yves David
6652b6ffb3 rebase: fix selection of base used when rebasing merge (issue4041)
Prior this changeset, rebasing a merge whose first parent was not in
the rebase lead to wrong and highly conflicting merge. See the in-line
comment for details.

Test have been updated with the data provided by the reported.
2013-10-30 19:45:14 +01:00
Pavlos Touboulidis
7e1d441f10 doc: fix internal date sample (issue4072) 2013-10-29 21:54:49 +02:00
Mads Kiilerich
3c628b9e09 largefiles: use 'remote'/'local' in merge prompts like in other merge prompts
Prompts like
  foo has been turned into a largefile
  use (l)argefile or keep as (n)ormal file?
was not as clear as the usual prompts that use 'remote' or 'local' to explain
what happened on which side ... especially not when used to the normal prompts.

"as" could also indicate that it would be possible to take the content of the
largefile and somehow put it into the normal file. It could make it more clear
that it was a choice between one side or the other.

For consistency we will now phrase it like:
  remote turned local normal file f into a largefile
  use (l)argefile or keep (n)ormal file?
2013-10-28 22:34:07 +01:00
Mads Kiilerich
fa135cf955 largefiles: systematic testing of merges to/from largefiles
bc94b1afd3c9 fixed one problem with update and added a test case for it. The
test coverage was thus insufficient before that.

To make sure we have good test coverage in this area we add systematic testing
of all cases of merges that may or may not change normal files to largefiles or
vice versa.

The tests shows some annoying extra merge prompts in some cases, but these
prompts are hard to avoid and they are now "safe" - they do not leave the
system in a confused inconsistent state.
2013-10-28 22:34:05 +01:00
Mads Kiilerich
a07958f34c check-code: fix no-check-code skip message - obfuscation was too obscure 2013-10-23 23:42:13 +08:00
FUJIWARA Katsunori
fde2c292ff shelve: remove useless and incorrect code paths for file access
This patch removes code paths in "shelvedfile.opener()", because:

    - explicit "vfs.mkdir()" invocation is useless

      "vfs.__call__()" for modes other than "read" creates parent
      directory of target file automatically by "util.ensuredirs()".

    - mode checking in "except IOError" code path is useless

      ENOENT occurs only for "read" mode, because target file is
      created forcibly for other modes.

    - there is no explicit "return" statement in the code path for
      "except IOError" if "mode[0] in 'wa'"

      this is incorrect, because None may be returnd unexpectedly,
      even though it seems the EEXIST case in the directory creation
      race for ".hg/shelved" and is very rare.

      this directory creation race is also treated in
      "util.ensuredirs()".
2013-10-29 01:03:43 +09:00
FUJIWARA Katsunori
98a7c1d4c1 shelve: disallow commit while unshelve is in progress
Before this patch, commit is allowed even while unshelve is in
progress.

In the other hand, "hg unshelve --abort" and "hg unshelve --continue"
check whether parent revisions of the working directory have changed
or not since last "hg unshelve", and abort without clearing state for
unshelve in progress if they have.

This causes that accidental commit makes clearing state for unshelve
difficult in ordinary ways.

This patch disallows commit while unshelve is in progress for
consistency.
2013-10-29 01:03:43 +09:00
Matt Mackall
a40dbdbbc6 bdiff: avoid a memory error on malloc failure 2013-10-30 16:03:42 -05:00
David Soria Parra
d4d544f551 pager: honour internal aliases
If paging is configured for a command all it's internal defined aliases
will be paged as well. This will make attend=log cause 'hg history'
to run the pager. However custom aliases will not be paged by default.
2013-10-12 18:51:34 -07:00
Matt Mackall
1c2609ed8a Added signature for changeset a0d2347ecd75 2013-10-20 16:45:04 -07:00
FUJIWARA Katsunori
9246c0599a discovery: revise hint message introduced by changeset 49ed20ea8da0
This patch revises hint message from "for detail about" introduced by
changeset 49ed20ea8da0 to "for details about", to unify it with the
hint message introduced by proceeding patch.
2013-10-03 23:16:07 +09:00
FUJIWARA Katsunori
ad1b5de6ff push: add more detailed explanation about "--force" to online help document
This patch adds more detailed explanation about "--force" to online
help document of "hg push" to prevent novice users to execute "push
--force" easily without understanding about problems of multiple
branch heads in the repository.
2013-10-03 23:16:06 +09:00
FUJIWARA Katsunori
3198fa3830 push: hide description about "-f" in the hint to prevent from using it easily
"use push -f to force" in the hint at abortion of "hg push" may cause
novice users to execute "push -f" easily without understanding about
problems of multiple branch heads in the repository.

This patch hides description about "-f" in the hint, and leads into
seeing "hg help push" for details about pushing new heads.
2013-10-03 23:16:06 +09:00
FUJIWARA Katsunori
d01f604fec demandimport: allow extensions to import own modules by absolute name
Before this patch, python modules of each extensions can't import
another one in own extension by absolute name, because root modules of
each extensions are loaded with "hgext_" prefix.

For example, "import extroot.bar" in "extroot/foo.py" of "extroot"
extension fails, even though "import bar" in it succeeds.

Installing extensions into site-packages of python library path can
avoid this problem, but this solution is not reasonable in some cases:
using binary package of Mercurial on Windows, for example.

This patch retries to import with "hgext_" prefix after ImportError,
if the module in the extension may try to import another one in own
extension.

This patch doesn't change some "_import()"/"_origimport()" invocations
below, because ordinary extensions shouldn't cause such invocations.

    - invocation of "_import()" when root module imports sub-module by
      absolute path without "fromlist"

      for example, "import a.b" in "a.__init__.py".

      extensions are loaded with "hgext_" prefix, and this causes
      execution of another (= fixed by this patch) code path.

    - invocation of "_origimport()" when "level != -1" with "fromlist"

      for example, importing after "from __future__ import
      absolute_import" (level == 0), or "from . import b" or "from .a
      import b" (0 < level),

      for portability between python versions and environments,
      extensions shouldn't cause "level != -1".
2013-10-05 01:02:22 +09:00