Commit Graph

16502 Commits

Author SHA1 Message Date
Mads Kiilerich
b315fbc5ab largefiles: use wlock for lfconvert (issue3444)
largefiles and lfconvert do dirty hacks with dirstate, so to avoid writing that
as a side effect of the wlock release we clear dirstate first.

To avoid confusing lock validation algorithms in error situations we unlock
_before_ removing the target directory.
2012-05-13 17:34:55 +02:00
Matt Mackall
732d9d463a merge with i18n 2012-05-13 11:19:48 +02:00
Wagner Bruna
a0f8506b26 i18n-pt_BR: synchronized with 636975388817 2012-05-08 15:31:14 -03:00
Patrick Mezard
742f6b3850 pure/base85: align exception type/msg on base85.c
brendan mentioned on IRC that b64decode raises a TypeError too, but while the
previous exception type may be better in general, it is much easier to make it
behave like the related C code and changes nothing for mercurial itself.
2012-05-07 21:49:45 +02:00
Matt Mackall
d8dfd80d76 parsers: fix refcount bug on corrupt index
When we encounter a corrupt index, we "fail" the init but our
destructor still gets called. On some systems, this was causing us to
attempt to decref a dangling to self->data.
2012-05-07 15:40:50 -05:00
Patrick Mezard
f49c9eec1a subrepo: do not traceback on .hgsubstate parsing errors
Note that aborting in subrepo.state() prevents "repairing" commands like revert
to be issued. The user will have to edit the .hgsubstate manually (but he
probably had already otherwise this would not be failing). The same behaviour
already happens with invalid .hgsub entries.
2012-05-04 14:19:55 +02:00
Patrick Mezard
a124dced40 subrepo: ignore blank lines in .hgsubstate (issue3424)
Reported by Sebastian Krysmanski <infomail@lordb.de>
2012-05-04 14:19:52 +02:00
hlian
992a6313f9 largefiles: in putlfile, ensure tempfile's directory exists prior to creation
Let R be a repo served by an hg daemon on a machine with an empty largefiles
cache. Pushing a largefiles repo to R will result in a no-such-file-or-directory
OSError because putlfile will attempt to create a temporary file in
R/.hg/largefiles, which does not yet exist.

This patch also adds a regression test for this scenario.
2012-05-04 14:36:40 -04:00
Bryan O'Sullivan
130a47d385 bisect: save current state before running a command
This prevents an external command being run during a bisect from
querying stale data.
2012-05-02 17:15:11 -07:00
Yuya Nishihara
8284425c7d commands: parse ui.strict config item as bool 2012-05-06 23:58:04 +09:00
Patrick Mezard
9b4af94333 largefiles: fix "hg status dir" missing regular files (issue3421)
largefiles status implementation attemps to rewrite the input match objects to
match the "standins" as well as the regular files. When fixing the directories
listed in match.files(), if there was related standin entry, it was kept and
the original path discarded. But directories can appear both as regular and
standin entries.
2012-05-06 13:14:58 +02:00
Adrian Buehlmann
ac14489dc7 help/config: remove outdated false claim about pywin32
Since version 1.8 (released on 2011-03-01), Mercurial doesn't use pywin32 any
more. The old fallback mechanism to use C:\Mercurial\Mercurial.ini if pywin32 is
not installed was removed in 1fa0a833f143.
2012-05-06 10:36:32 +02:00
Steven Stallion
d5d80849ef factotum: add man reference to help output 2012-05-04 09:14:55 -07:00
Martin Geisler
da730824fe paper, monoblue: link correctly to lines in annotate view
The links were to "foo#123" instead of "foo#l123". The gitweb and
spartan templates were already producing the correct links.
2012-05-04 12:04:07 +02:00
Matt Mackall
17375148cb Added signature for changeset da339fc71ca6 2012-05-03 16:06:33 -05:00
Matt Mackall
ed0ae26f56 bookmarks: catch the proper exception for missing revisions
This fixes a regression from 1.7
2012-05-03 16:03:08 -05:00
Bryan O'Sullivan
1eb25dc7ef parsers: fix refcount leak, simplify init of index (issue3417)
This is most easily verified using valgrind on a long-running
process, as the leak has no visible consequences during normal
one-shot command usage.

In one window:

  valgrind --leak-check=full --suppressions=valgrind-python.supp \
    python ./hg serve

In another:

  for ((i=0;i<100;i++)); do
    curl -s http://localhost:8000/file/tip/README >/dev/null
  done

valgrind should report no leaks.
2012-05-02 14:37:44 -07:00
Na'Tosha Bard
da576e6ebb largefiles: fix commit of both largefiles and non-largefiles (issue3354)
This bug was caused by some old code that should have been removed long ago.
2012-05-03 15:24:45 +02:00
Paul Boddie
2b32ff611e help: added description for the web.collapse setting
The collapse configuration setting for hgweb was recently
introduced, but the help text was unfortunately omitted from the
patch concerned. This patch provides a suitable help text.
2012-05-03 01:07:22 +02:00
A. S. Budden
95a9277375 help: add reference to template help (issue3413)
There is currently no clear link between the help for log
and the help on templates.  The log option is --template
but the template help is 'help templating' or 'help templates'.
This patch makes 'hg help template' work and also adds a
note into the log help explaining where to find more info.
2012-05-01 22:14:51 +01:00
Matt Mackall
42ad4a30f1 Added signature for changeset 3d09cfbfd04c 2012-05-01 16:40:31 -05:00
FUJIWARA Katsunori
dfcb34bd3f i18n-ja: synchronized with ae8f8ec04f94 2012-05-01 19:09:15 +09:00
Wagner Bruna
a0188871df i18n-pt_BR: synchronized with 4648276b8935 2012-05-01 00:52:57 -03:00
Matt Mackall
a686c15ee6 merge with i18n 2012-04-30 16:06:37 -05:00
Michael Tjørnemark
e68243ee04 changegroup: decompress GZ algorithm in larger chunks for better performance 2012-04-29 20:58:50 +02:00
FUJIWARA Katsunori
c6b98d6694 i18n-ja: synchronized with 95d2d46b08bc 2012-04-29 21:15:06 +09:00
Steven Stallion
d36350c9a1 plan9: mkfile and 9diff fixes
This patch deals with an unnecessary backslash in 9diff and improper
quoting in the contrib mkfile.
2012-04-28 23:01:31 -07:00
Patrick Mezard
ac389a393c subrepo/svn: cache _wcrev() value in merge() 2012-04-30 17:05:19 +02:00
Patrick Mezard
5e78cfbfbb subrepo/svn: fix checked out rev number retrieval (issue2968)
The initial version was to take the "Revision" field from svn info. It works
but produces false positive when parent paths are being moved or unrelated
changes are being committed, causing it to change while the svn checkout itself
remains the same. To avoid spurious commit, we took "Revision" and "Last
Changed Rev" for general comparison and kept the latter to answer "what is your
revision?" question. This is better but fails when the subrepo path exists at
"Revision" but not at "Last Changed Rev". This patch adds a check for this, and
returns "Revision" if the path does not exist. We try to avoid doing this as
much as possible at it implies an extra, *remote* call.
2012-04-30 17:03:15 +02:00
Patrick Mezard
bf0d75c9d1 amend: fix copy records handling (issue3410)
Messing with the dirstate before the intermediate commit seems error prone.
Instead, commit and recompute the copies with copies.pathcopies(), then use
that with commitctx().

Since copies.pathcopies() does not support file replacement very well, the
whole .renamed() condition in samefile() is removed and the "file replacement
caused by differing copy source" effect is discarded.

Test shamelessly stolen from Idan Kamara <idankk86@gmail.com>
2012-04-30 20:45:45 +02:00
Patrick Mezard
8f18af5bfc test-commit-amend: exhibit an --amend weirdness
The weirdness is --amend let you replace one file with another with same data
and flags if the new file copy record differ from the one in the parent
revision. In theory, there is no problem with this kind of thing, subversion
supports it, but here we see log and status disagree. The reason is log reads
the copy record from the filelog, while status calls copies.pathcopies() which
eventually invokes some expensiveness argument to discard this case (copies.py,
_forwardcopies(), line 132). Since the next patch will side with pathcopies(),
I prefer to call this behaviour a bug.
2012-04-30 20:36:29 +02:00
Patrick Mezard
2c65c226cf localrepo: add setparents() to adjust dirstate copies (issue3407)
The fix introduced in 3509b9cf8f86 was only partially successful. It is correct
to turn dirstate 'm' merge records into normal/dirty ones but copy records are
lost in the process. To adjust them as well, we need to look in the first
parent manifest to know which files were added and preserve only related
records. But the dirstate does not have access to changesets, the logic has to
moved at another level, in localrepo.
2012-04-29 22:25:55 +02:00
Patrick Mezard
2b7ed041e6 test-rebase-parameters: more tests for revset/opts
- --source and revset
- --base and revset
- --rev and revset
- --rev and --source combination
- --rev and --base combination
2012-04-29 16:18:46 +02:00
Martin Geisler
a6c8a11cca help/config: expand [subpaths] help
Brifly explain why rewriting subrepository paths can be necessary.
Explain that relative subrepository paths are made absolute before
rewrite rules are applied.
2012-04-30 12:45:44 +02:00
Martin Geisler
bde13df69f doc: update copyright years to 2012
I sometimes look at a piece of software and if the man page says
"Copyright 2004", then I'm inclined to think that the project is stale
or that the authors are lazy. Neither is good publicity for us :-)
2012-04-30 12:04:30 +02:00
Martin Geisler
63259931d2 help: consistently use title capitalization for help topics 2012-04-30 11:51:24 +02:00
Matt Mackall
059c88a779 merge with i18n 2012-04-28 16:38:07 -05:00
Patrick Mezard
68ff0fa6cf dirstate: preserve path components case on renames (issue3402)
The original issue was something like:

  $ hg init repo
  $ cd repo
  $ mkdir D
  $ echo a > D/a
  $ hg ci -Am adda
  adding D/a
  $ mv D temp
  $ mv temp d
  $ echo b > d/b
  $ hg add d/b
  adding D/b
  $ hg ci -m addb
  $ hg mv d/b d/c
  moving D/b to d/c
  $ hg st
  A d/c
  R D/b

Here we expected:

  A D/c
  R D/b

the logic being we try to preserve case of path components already known in the
dirstate. This is fixed by the current patch.

Note the following stories are not still not supported:

Changing directory case
  $ hg mv D d
  moving D/a to D/D/a
  moving D/b to D/D/b
  $ hg st
  A D/D/a
  A D/D/b
  R D/a
  R D/b

or:

  $ hg mv D/* d
  D/a: not overwriting - file exists
  D/b: not overwriting - file exists

And if they were, there are probably similar issues with diffing/patching.
2012-04-28 20:29:21 +02:00
Wagner Bruna
97e6b0121a i18n-pt_BR: synchronized with f534c3cf4913 2012-04-28 14:15:43 -03:00
Wagner Bruna
2994112f09 merge with i18n 2012-04-28 13:22:52 -03:00
FUJIWARA Katsunori
d9e2732a47 i18n-ja: synchronized with 15af36e0a2ba 2012-04-29 00:48:22 +09:00
Mads Kiilerich
8564a7de60 tests: quote dummyssh in a way that works on windows too
Don't depend on $environmentvariableexpansion and 'quote' handling in system()
2012-04-28 02:00:04 +02:00
Mads Kiilerich
d94d866bcb tests: add missing accept of native pathname separator 2012-04-28 01:55:39 +02:00
Mads Kiilerich
8639b8b9e3 tests: skip new tests with requirements not available on windows 2012-04-28 01:22:56 +02:00
Mads Kiilerich
df37dcb230 tests: don't require 'hg' without extension on windows
Hackable uses hg.exe instead.
2012-04-28 01:22:47 +02:00
Mads Kiilerich
d6cf79df9b update .hgignore for hackable with Python 2.7 2012-04-28 01:22:35 +02:00
Patrick Mezard
cc838630b9 commit: abort on merge with missing files
Here is a script illustrating the previous behaviour:

The merge brings a new file 'b' from remote
  $ hg merge 1 --debug
    searching for copies back to rev 1
    unmatched files in other:
     b
  resolving manifests
   overwrite: False, partial: False
   ancestor: 07f494440405, local: 540395c44225+, remote: 102a90ea7b4a
   b: remote created -> g
  updating: b 1/1 files (100.00%)
  getting b
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  (branch merge, don't forget to commit)

Delete but do not remove b
  $ rm b
  $ hg st
  ! b

The commit succeeds
  $ hg commit -m merge
  $ hg parents --template "{rev} {desc|firstline} files: {files}\n"
  3 merge files:
  $ hg st
  ! b

b changes were ignored, but even b existence was ignored
  $ hg manifest
  a

This happens because localrepo.commitctx() checks the input ctx.files(), which
is empty for workingctx.files() only returns added, modified or removed
entries, and bypass files/manifest updates completely. So the committed
revision manifest is the same as its first parent one, not containing the 'b'
file.

This patch forces the commit to abort in presence of a merge and missing files.
test-merge4.t is modified accordingly as it was introduced to check hg was not
just terminating with a traceback (5cc0d3ba11f9).
2012-04-28 15:01:57 +02:00
Matt Mackall
aa9d8819cf merge with i18n 2012-04-26 13:18:47 -05:00
Wagner Bruna
cda58bb590 i18n-pt_BR: synchronized with 89513f7c2f08 2012-04-24 21:09:27 -03:00
Wagner Bruna
2331a9e94c merge with i18n 2012-04-24 20:54:56 -03:00