Commit Graph

15420 Commits

Author SHA1 Message Date
Steven Brown
51a1bd2f20 rebase: reinstate old-style rev spec support for the source and base (issue3181)
As of 1ffaca626da1 (first released as part of Mercurial 2.0), the rebase command
accepted ONLY revsets for the source and base arguments and no longer accepted
old-style revision specifications. As a result, some revision names were no
longer recognised, e.g.

hg rebase --base br-anch
abort: unknown revision 'br'!

These arguments are now interpreted first as old-style revision specifications,
then as revsets when no matching revision is found. This restores backwards
compatibility with releases prior to 2.0.
2012-01-08 23:09:35 +08:00
Pierre-Yves David
cbc6c76868 dirstate: propagate IOError other than ENOENT when reading branch 2012-01-06 07:37:59 +01:00
Olav Reinert
16da43099e mq: Document that qdel requires exact patch identifiers 2012-01-06 15:05:51 +01:00
Na'Tosha Bard
d2bd6a2acb largefiles: fix output of hg summary (issue3060) 2012-01-08 12:35:47 +01:00
Na'Tosha Bard
0bd0abc6e9 largefiles: fix confusion upon removal of added largefile (issue3176)
This patch makes "hg remove" work the same way on largefiles as it does on
regular Mercurial files.  If you try to remove an added largefile, the removal
fails and you are instead prompted to use "hg forget" to undo the add.
2012-01-08 11:19:51 +01:00
Martin Geisler
649b8283da commands: add link to addremove in commit help text 2012-01-06 11:15:32 +01:00
Matt Mackall
a5d2446886 tests: patch up silly new year's bug 2012-01-03 17:09:26 -06:00
Matt Mackall
8ba239a418 grep: make multiline mode the default (BC)
This is a much more logical way to deal with ^ and $.
Old ^ and $ behavior are available with \A and \Z.
2012-01-03 15:48:58 -06:00
Steve Borho
80262e7e1a wix: add map-commandline.bisect 2012-01-02 20:52:16 -06:00
Matt Mackall
6638238c51 Added signature for changeset 02ea40439373 2012-01-01 13:46:50 -06:00
Matt Mackall
439f06d5a0 merge with i18n 2012-01-01 13:37:30 -06:00
FUJIWARA Katsunori
b977a4dff3 i18n-ja: synchronized with 3082e981a393 2011-12-31 15:23:05 +09:00
Matt Mackall
f3ededa444 convert: improve exception reporting for SVN logstream
- catch all exceptions
- pickle a stringified version of the exception
- use a normal abort

Hopefully this will result in less mysterious convert exceptions
2011-12-30 15:47:58 -06:00
Matt Mackall
2fc5d7ef51 fetch: fix unneeded commit when no merge attempted (issue2847) 2011-12-30 15:07:05 -06:00
Matt Mackall
02441ac6a9 fetch: patch cornercase in children calculation (issue2773) 2011-12-30 14:31:59 -06:00
Wagner Bruna
2567bf8f0d i18n-pt_BR: synchronized with 783c713954f6 2011-12-30 00:54:36 -02:00
Matt Mackall
e71ca537a7 merge with i18n 2011-12-29 14:44:30 -06:00
Matt Mackall
61f1d2e359 rollback: clarify --force text (issue3175) 2011-12-29 14:02:18 -06:00
FUJIWARA Katsunori
7cb93f1061 i18n-ja: synchronized with 25c2408b68b3 2011-12-29 16:10:53 +09:00
Michal Sznajder
1dd342b724 largefiles: clarify help when options are ignored until first add is done 2011-12-28 00:01:48 +01:00
FUJIWARA Katsunori
5a148330f8 windows: use normalized path as path to subrepo
path to subrepo is used to identify or check location of subrepo.

it should be normalized (in "/" delimiter form), because it is also
used with narrowmatcher which uses only normalized path even on
Windows environment.

this patch applies "util.pconvert()" on path to subrepo (called
"subpath") to normalize it.

for this patch, referers of below were checked.

  - subrepo.state()
  - subrepo.itersubrepos()
  - subrepo.subrepo()
  - context.sub()
  - context.substate()

typical usecase is:

    for subpath in ctx.substate:
        sub = ctx.sub(subpath)
        ... ctx.substate[subpath] ....

in this case, normalization has no side effect, because keys given
from substate are used as key itself.

other cases shown below also seem to require subpath to be normalized.

    - path components are joined by "/", in "commands.forget()":

        for subpath in ctx.substate:
            subforget[subpath + '/' + fsub] = (fsub, sub)

    - normalized "file" is used to check below condition, in
      "commands.revert()", "localrepository.commit()", and
      "localrepository._checknested()"

        file in ctx.substate

    - substate.keys() is passed to dirstate.walk()/status() which use
      only normalized pathes
2011-12-24 19:05:35 +09:00
FUJIWARA Katsunori
be239ba6ee windows: use normalized path to check repository nesting
current "localrepository._checknested()" uses specified path itself to
compare against subrepo pathes.

it is invoked from "hgsubrepo.subrepo()" or pathauditor (as callback),
and both use "os.sep" as separator.

this causes unexpected nesting check result, if subrepo configuration
uses "/" as path separator for sub repo path.

this path uses "/" to join path components (or apply "util.pconvert()"
on path) to normalize.
2011-12-24 19:05:25 +09:00
FUJIWARA Katsunori
529dcf14a4 windows: force specified path to be audited in localpath form
pathauditor is invoked not only for localpath form using "os.sep" as
separator, but also for normalized form using "/": for example, hg
internal path like "store/data" under ".hg", or ones normalized by
match object

this causes insufficient repository nesting check, because current
pathauditor implementation divides specified path into components by
"os.sep", and this causes to treat multiple path components joined by
"/" as single one on Windows environment.

this patch applies "util.localpath()" on specified path to force it to
be divided into components correctly.

in fact, root for pathauditor also uses multiple path separator on
Windows. but this does not affect audit itself, so "util.localpath()"
is not applied on it.
2011-12-24 19:01:07 +09:00
Kevin Bullock
0fb78c49bd graft: use consistent language in help
Removes the word 'aborted' from the 3rd paragraph in favor of
'interrupted', the same word used in the description of the
-c/--continue switch. The word 'interrupted' is also consistent with
the help for rebase.
2011-12-20 14:11:14 -06:00
Matt Mackall
c0c746bcbd largefiles: copy files in binary mode (issue3164) 2011-12-20 11:43:38 -06:00
Alistair Bell
8423597fba diff: when diffing a revision with a deleted subrepo, maintain the node context (issue3153) 2011-12-15 16:41:03 -05:00
Matt Mackall
e996adc45c merge with i18n 2011-12-19 14:04:09 -06:00
Wagner Bruna
ccd491a91c i18n-pt_BR: synchronized with de6501d18b23 2011-12-16 10:43:18 -02:00
FUJIWARA Katsunori
1a00d3603f merge: check filename case collision between changesets for branch merging
this patch makes branch merging abort when merged changesets have same
file in different case on case insensitive filesystem.

this patch does not prevent linear update which merges between target
and working contexts, because 'branchmerge' is False in such case.
2011-12-16 21:21:27 +09:00
FUJIWARA Katsunori
fe972435d4 i18n: use encoding.lower/upper for encoding aware case folding
this patch uses encoding.lower/upper for case folding, because ones of
str can not fold case of non ascii characters correctly.

to avoid cyclic dependency and to encapsulate logic of normcase in
each platforms, this patch introduces encodinglower/encodingupper in
both posix/windows specific files.

this patch does not change implementation of normcase() in posix.py,
because we do not know the encoding of filenames on POSIX.

some "normcase()" are excluded from function wrap list in
hgext/win32mbcs.py, because they become encoding aware by this patch.
2011-12-16 21:09:41 +09:00
FUJIWARA Katsunori
cfdf6a59f4 windows: use upper() instead of lower() or os.path.normcase()
this patch uses upper() instead of lower() or os.path.normcase() for
case folding on Windows(NTFS), because lower-ing causes problems for
some languages on it.

see below for detail about problem of lower-ing:

    https://blogs.msdn.com/b/michkap/archive/2005/01/16/353873.aspx
2011-12-16 21:09:40 +09:00
FUJIWARA Katsunori
055136813d icasefs: avoid normcase()-ing in util.fspath() for efficiency
'dirstate._normalize()', the only caller of 'util.fspath()', has
already normcase()-ed path before invocation of it.

normcase()-ed root can be cached on dirstate side, too.

so, this patch changes 'util.fspath()' API specification to avoid
normcase()-ing in it.
2011-12-16 21:09:40 +09:00
FUJIWARA Katsunori
c71595845e icasefs: use util.normcase() instead of lower() or os.path.normcase in fspath
this also avoids lower()-ing on each path components by reuse the path
normcase()-ed at beginning of function.
2011-12-16 21:09:40 +09:00
FUJIWARA Katsunori
167dff84e5 dirstate: prevent useless util.fspath() invocation for '.'
at first of dirstate.walk() on case insensitive filesystem,
normalization of '.' causes util.fspath() invocation, but '.' is not
cached in it.

this invocation is not only useless, but also harmful: initial "hg
tag" causes creation of ".hgtags" file after dirstate.walk(), and
looking up ".hgtags" in cache will fail, because directory contents of
root is already cached at util.fspath() invocation for '.'.
2011-12-16 21:09:40 +09:00
FUJIWARA Katsunori
f9ca02bd18 icasefs: consider as case sensitive if there is no counterevidence, for safety
for safety, this patch prevents case-less name from misleading into
case insensitivity, even though such names should not be used.
2011-12-16 21:09:40 +09:00
FUJIWARA Katsunori
44af3b0ebf pathauditor: switch normcase logic according to case sensitivity of filesystem
this patch applies 'util.normcase()' to audit path only on case
insensitive filesystem.
2011-12-16 21:09:40 +09:00
FUJIWARA Katsunori
6b07b41e4f pathauditor: preserve case in abort messages
this patch uses both plain and normcase()-ed pathes to preserve letter
case of path in abort messages.
2011-12-16 21:09:40 +09:00
FUJIWARA Katsunori
afdb157d48 pathauditor: use normcase()-ed path for audit result cache
in current pathauditor implementation, un-normcase()-ed path is
stored into and compared with audit result cache.

this is not efficiency on case insensitive filesystem.
2011-12-16 21:09:40 +09:00
Kevin Gessner
edef96f084 largefiles: don't require a user cache (issue3088) (issue3155)
If the user cache path isn't specified in .hgrc, and it can't be constructed
from the environment, don't try to use that cache.
2011-12-15 13:19:43 -05:00
FUJIWARA Katsunori
ee602b5c96 icasefs: use util.normcase() instead of str.lower() or os.path.normpath() 2011-12-12 17:10:19 +09:00
Martin Geisler
54d4706f56 test-subrepo: test for Issue3153 2011-12-15 16:18:10 +01:00
Renato Cunha
cb456a1751 diff: don't crash when diffing a revision with a deleted subrepo (issue3153)
When a user requested a diff between a revision (r1) that contained a subrepo
and another (r2) that did not, mercurial would crash if r1 was specified before
r2 but would execute the diff otherwise. This fixes this behavior by skipping
the missing subrepo in the diff.
2011-12-14 12:28:00 -02:00
Martin Geisler
034d08dce7 status: add missing ":" to help text 2011-12-15 11:13:38 +01:00
Martin Geisler
19be7012dc largefiles: handle merges between normal files and largefiles (issue3084)
The largefiles extension prevents users from adding a normal file
named 'foo' if there is already a largefile with the same name.
However, there was a loop-hole: when merging, it was possible to bring
in a normal file named 'foo' while also having a '.hglf/foo' file.

This patch fixes this by extending the manifest merge to deal with
these kinds of conflicts. If there is a normal file 'foo' in the
working copy, and the other parent brings in a '.hglf/foo' file, then
the user will be prompted to keep the normal file or the largefile.
Likewise for the symmetric case where a normal file is brought in via
the second parent. The prompt looks like this:

  $ hg merge
  foo has been turned into a largefile
  use (l)argefile or keep as (n)ormal file?

After the merge, either the '.hglf/foo' file or the 'foo' file will
have been deleted. This would cause status to return output like:

  $ hg status
  M foo
  R foo

To fix this, the lfiles_repo.status method is changed so that a
removed normal file isn't shown if there is largefile with the same
name, and vice versa for largefiles.
2011-12-09 17:35:00 +01:00
David Soria Parra
900ed6b9a8 progress: check for ui.quiet and ui.debugflag before we write
ui.quiet and ui.debugflag are not initialized during uisetup and
reposetup.  progressui is always initialized, therefore we have to check
during write() if ui.quiet is set or not.
2011-12-14 15:41:08 +01:00
Matt Mackall
e6d872a339 changelog: handle decoding of NULs in extra more carefully (issue3156)
Escaped NULs adjacent to [0-7] could be decoded as octal. This hits
about 0.24% of changesets with transplant, which stores binary nodes.
2011-12-16 18:23:15 -06:00
Martin Geisler
3a9a310829 largefiles: fix 'hg status' abort after merge
If a largefile is introduced on the branch that is merged into the
working copy, then 'hg status' would abort with an error like:

   $ hg status
   abort: .hglf/foo@33fdd332ec: not found in manifest!

The problem was that the largefiles status code only looked in the
first parent for the largefile. Largefiles are now always reported as
modified if they don't exist in the first parent -- this matches the
behavior of localrepo.status for normal files.
2011-12-09 17:34:58 +01:00
Olav Reinert
f1e67c7732 Describe all files related to the standard commands. 2011-12-06 15:50:28 +01:00
Matt Mackall
a69962e18c branch: warn on branching 2011-12-08 14:32:44 -06:00
Matt Mackall
d91862b8e5 branch: move note about permanence to the top, add 'global' 2011-12-05 17:09:11 -06:00