Commit Graph

17809 Commits

Author SHA1 Message Date
Mads Kiilerich
96d2cbf93b largefiles revert: update lfdirstate with result from first cleanliness check
Largefiles revert do for some reason have two lfdirstates and lfdirstatestatus
invocations in one function. The result from the first lfdirstate check was
however not written back to the lfdirstate, and some files was thus checked
twice.
2012-12-13 19:19:06 +01:00
Mads Kiilerich
f9eedbbdd4 largefiles status: update lfdirstate with result from cleanliness check
Problem: 'hg status' kept checking largefiles with an unknown state until some
other command wrote the updated dirstate.

Solution: Add missing lfdirstate.write().
2012-12-13 19:19:06 +01:00
Mads Kiilerich
861c915f14 bundlerepo: don't return the peer without bundlerepo from getremotechanges
Problem:
getremotechanges would return the 'other' repo if nothing was incoming and
there thus wasn't any bundle to base the repo on. The 'other' could be a http
peer which only implement the functionality available over the http protocol.
Transplant could thus fail with
  TypeError: argument of type 'httppeer' is not iterable

Solution:
Return the local repo instead of the remote peer if there is no reason to place
a bundlerepo on top of the local repo.
2012-12-28 11:16:01 +01:00
Mads Kiilerich
a17080a566 bookmarks: fix head selection for merge with two bookmarked heads
A type mismatch caused the search for the other head to fail. The code is
fragile, and instead it ended up using the 'first' bookmark head, but the
ordering is undefined and it could thus randomly use the wrong bookmarkhead
and fail with:

  $ hg up -q -C e@diverged
  $ hg merge
  abort: merging with a working directory ancestor has no effect
2012-12-24 13:26:13 +01:00
Tim Henigan
31b2db1033 dirstate: remove obsolete comment from setbranch
This comment should have been removed in 9d5893d31db9, when the call
to scmutil.checknewlabel was removed.
2012-11-29 08:44:54 -05:00
Idan Kamara
26e04e85c9 dirstate: don't rename branch file if writing it failed 2012-12-15 20:19:07 +02:00
Levi Bard
5ac6c21477 largefiles: commit directories that only contain largefiles (issue3548)
If we pass a directory to commit whose only commitable files
are largefiles, the core commit code aborts before finding
the largefiles.
So we do the following:
For directories that only have largefiles as matches,
we explicitly add the largefiles to the matchlist and remove
the directory.
In other cases, we leave the match list unmodified.
2012-12-10 14:58:42 +01:00
Matt Mackall
b867b2de5c hgweb: avoid generator exhaustion with branches 2012-12-06 13:21:27 -06:00
Matt Mackall
a671a1cc84 hgweb: fix iterator reuse in atom feed generation 2012-12-05 15:38:18 -06:00
Julien Cristau
2c91c44855 tests: don't hardcode errno==2 for ENOENT
Hurd seems to set ENOENT to 2 + 2**30, unlike everyone else.
2012-12-04 14:35:02 +01:00
Wagner Bruna
e86ba933bc merge with i18n 2012-12-03 19:37:36 -02:00
Matt Mackall
0ffbcde821 Added signature for changeset 044fc8ab2b5e 2012-12-03 14:03:57 -06:00
FUJIWARA Katsunori
09beefd65b i18n-ja: synchronized with a0dc97a53c9f 2012-11-30 21:39:01 +09:00
FUJIWARA Katsunori
b81a7802fd subrepo: add argument to "diff()" to pass "ui" of caller side (issue3712) (API)
Color extension achieves colorization by overriding the class of
"ui" object just before command execution.

Before this patch, "diff()" of abstractsubrepo and classes
derived from it has no "ui" argument, so "diff()" of hgsubrepo
uses "self._repo.ui" to invoke "cmdutil.diffordiffstat()".

For separation of configuration between repositories, revision
1498948ee815 changed the initialization source of "self._repo.ui"
from "ui"(overridden) to "baseui"(plain) of parent repository.
And this caused break of colorization.

This patch adds "ui" argument to "diff()" of abstractsubrepo and
classes derived from it to pass "ui" object of caller side.
2012-11-30 00:43:55 +09:00
Pierre-Yves David
39909ce228 rebase: fix pull --rev options clashing with --rebase (issue3619)
Rebase also have a plain `--rev` option used to select the rebase set (as
`--base` or `--source` would). But the content of the --rev option was intended
for the remote repo and is irrelevant for the local rebase operation. We expect
`hg pull --rebase` to stick with the default behavior here:

    hg rebase --base . --dest tip(branch(.))

The `rev` option is dropped from the option passed to rebase.
2012-11-29 16:37:15 +01:00
Matt Mackall
d0aed02210 tests: fix broken fix of test-phases output 2012-11-28 17:53:52 -06:00
Tim Henigan
68a1fc4488 update: allow update to existing branches with invalid names (issue3710)
Starting with 049792af94d6, users are no longer able to update a
working copy to a branch named with a "bad" character (such as ':').

Prior to v2.4, it was possible to create branch names using "bad"
characters, so this breaks backwards compatibility.

Mercurial must allow users to update to existing branches with bad
names.  However, it should continue to prevent the creation of new
branches with bad names.

A test was added to confirm that 'hg update' works as expected. The
test uses a bundled repo that was created with an earlier version of
Mercurial.
2012-11-27 08:47:35 -05:00
Pierre-Yves David
292c83cd65 command: remove phase from the list of basic command
This is not a basic command. There is no reason new user should needs to know
about it. Thanks to Matt Mackall for pointing this.
2012-11-28 11:20:56 +01:00
André Sintzoff
94ef5e50d6 phases: fix missing "error" module import (issue3707) 2012-11-25 20:39:37 +01:00
Matt Mackall
1c34c93b25 hooks: be even more forgiven of non-fd descriptors (issue3711)
Looks like there are instances where sys.stdout/stderr contain file
handles that are invalid. We should be tolerant of this for hook I/O
redirection, as our primary concern is not garbling our own output stream.
2012-11-26 17:48:39 -06:00
Matt Mackall
c6fe65e9e2 hooks: delay I/O redirection until we actually run a hook (issue3711)
We were attempting to redirect I/O even if no hook was actually
getting called. This defers redirection until we've found something to
do.
2012-11-26 16:14:22 -06:00
Matt Mackall
af5b4b62cf util: make chunkbuffer non-quadratic on Windows
The old str-based += collector performed very nicely on Linux, but
turns out to be quadratically expensive on Windows, causing
chunkbuffer to dominate in profiles.

This list-based version has been measured to significantly improve
performance with large chunks on Windows, with negligible overall
overhead on Linux (though microbenchmarks show it to be about 50% slower).

This may increase memory overhead where += didn't behave quadratically. If we
want to gather up 1G of data to join, we temporarily have 1G in our
list and 1G in our string.
2012-11-26 15:42:52 -06:00
Matt Mackall
d4deebc4f7 revset: backed out changeset 7a8dc9a35aa2
This was causing clones of the hg repo to go from 12.4s to 14.7s.
2012-11-26 13:44:11 -06:00
Durham Goode
6a6b8c49d1 commit: increase perf by avoiding checks against entire repo subsets
When commiting to a repo with lots of history (>400000 changesets)
checking the results of revset.py:descendants against the subset takes
some time.  Since the subset equals the entire changelog, the check
isn't necessary.  Avoiding it in that case saves 0.1 seconds off of
a 1.78 second commit. A 6% gain.

We use the length of the subset to determine if it is the entire repo.
There is precedence for this in revset.py:stringset.
2012-11-16 15:39:12 -08:00
Durham Goode
cce0517fb6 commit: increase perf by avoiding unnecessary filteredrevs check
When commiting to a repo with lots of history (>400000 changesets)
the filteredrevs check (added with 373606589de5) in changelog.py
takes a bit of time even if the filteredrevs set is empty. Skipping
the check in that case shaves 0.36 seconds off a 2.14 second commit.
A 17% gain.
2012-11-16 15:39:12 -08:00
Kevin Bullock
b676337ab7 grep: remove useless while condition
A revised version of 51ea4dcf1448 was sent to the list that fixed this
<http://markmail.org/message/jmfuiise5igcyh2m>, but the older version of
the patch was applied.
2012-11-15 11:27:30 -06:00
Idan Kamara
4ae64fdb03 grep: don't search past the end of the searched string
'*' causes the resulting RE to match 0 or more repetitions of the preceding RE:

>>> bool(re.search('.*', ''))
>>> True

This causes an infinite loop because currently we're only checking if there was
a match without looking at where we are in the searched string.
2012-11-12 19:27:03 +02:00
Pierre-Yves David
cc961a38fb amend: force editor only if old message is reused (issue3698)
This regression was added by 435d13b1e757. It triggered the editor even if
--message or --logfile were provided.
2012-11-13 08:41:56 -08:00
Adrian Buehlmann
c700586a1f test-subrepo: adapt for Windows after 6e587aaeb4ef
Fixes

  @@ -606,7 +606,7 @@
     issue3276_ok
     $ rm repo/s/b
     $ hg -R repo revert --all
  -  reverting repo/.hgsubstate
  +  reverting repo\.hgsubstate
     reverting subrepo s
     $ hg -R repo update
     1 files updated, 0 files merged, 0 files removed, 0 files unresolved

on Windows
2012-11-02 20:47:03 +01:00
Adrian Buehlmann
e6900cf097 test-mq-qrefresh: adapt for Windows after 94dce4b70643
Fixes

  @@ -208,7 +208,7 @@
     $ echo 'orphan' > orphanchild
     $ hg add orphanchild
     $ hg qrefresh nonexistentfilename # clear patch
  -  nonexistentfilename: No such file or directory
  +  nonexistentfilename: The system cannot find the file specified
     $ hg qrefresh --short 1/base
     $ hg qrefresh --short 2/base

on Windows
2012-11-02 20:22:09 +01:00
Matt Mackall
1f23e5d8ac Added signature for changeset 64827fed3444 2012-11-01 16:09:21 -05:00
Matt Mackall
92926a8771 tests: fix test for issue3581 for vfat on Linux 2012-11-01 14:59:55 -05:00
Keegan Carruthers-Smith
74acb324a1 filemerge: only run test for issue3581 on non-windows environments 2012-10-30 17:23:51 -07:00
Adrian Buehlmann
b5e726b312 openpath: specify binary mode and use util.posixfile
follow-up to aa655773f574
2012-11-01 13:46:03 +01:00
Wagner Bruna
54f80e922f i18n-pt_BR: synchronized with afc2d2d081bf 2012-11-01 11:37:40 -02:00
Matt Mackall
f0b297f1cb merge with i18n 2012-10-31 16:34:36 -05:00
Wagner Bruna
488be52c06 i18n-pt_BR: synchronized with 8a4638abc213 2012-10-31 11:13:44 -02:00
FUJIWARA Katsunori
29eb1c1d38 i18n-ja: synchronized with 4c2efd1a5aa9 2012-10-31 18:44:40 +09:00
Matt Mackall
f1d087a830 merge with i18n 2012-10-30 16:46:52 -05:00
Adrian Buehlmann
ba8bb9b602 clone: show status "updating to bookmark @"
if bookmark @ is not on the default branch, we show

  updating to bookmark @ on branch <name>
2012-10-29 14:02:30 +01:00
Adrian Buehlmann
38a6491671 test-clone: fix directory level
c1644655c164 inserted a "cd a" but didn't restore the previous directory.
2012-10-28 14:16:16 +01:00
Julian Cowley
af02d686b4 patchbomb: -c is not an alias for the --confirm option
The help text shows "-c/--confirm", which implies that -c is an alias
for --confirm.  Actually, it is an alias for --cc.  Correct the text
by removing -c.
2012-10-28 05:44:50 -10:00
Simon Heimberg
b731b379ec subrepo: only do clean update when overwrite is set (issue3276)
Files in a subrepo were overwritten on update. But this should only happen on a
clean update (example: -C is specified).
Use the overwrite parameter introduced for svn subrepos in e3640daa4703 to
decide whether to merge changes (as update) or remove them (as clean).

The new function hg.updaterepo is intruduced to keep all update calls in hg.

test-subrepo.t is extended to test if an untracked file is overwritten
(issue3276). (Update -C is already tested in many places.)
The first two chunks are debugging output which has changed. (Because overwrite
is not always true anymore for subrepos)
All other tests still pass without any change.
2012-10-24 18:45:22 +02:00
FUJIWARA Katsunori
5434449902 i18n: change output of largefiles for summary to distinguish from one for outgoing
Before this patch, largefiles extension uses "largefiles: No remote
repo" message not only for "outgoing" as status report, but also for
"summary" as summarized information.

This sharing prevents message translators from inserting white spaces
between "largefiles:" and "No remote repo" in translated message to
align column position of summarized information.

This patch changes output of largefiles for summary to distinguish
from one for outgoing.

This patch puts "no remote repo" into parentheses, because this is not
summarized information.
2012-10-31 03:59:28 +09:00
FUJIWARA Katsunori
536e35fc32 i18n: make column positioning message of MQ summary output translatable
Before this patch, one of column positioning messages of MQ summary
output is not translatable, and patches are always listed up at fixed
column position like below, when patch queue is not empty:

    mq:     1 applied, 1 unapplied

But column positioning messages for other summarized information are
translatable, so other information may be displayed at different
column position on non-English locale environments.

This patch makes column positioning message of MQ summary output
translatable.
2012-10-31 03:59:28 +09:00
FUJIWARA Katsunori
f05ff4243c i18n: add "i18n" comment to column positioning messages of "hg summary"
This comment makes it easier to distinguish such messages from others
for message translators.
2012-10-31 03:59:28 +09:00
FUJIWARA Katsunori
ff00b9869d i18n: add "i18n" comment to column positioning messages of "hg log"
This comment makes it easier to distinguish such messages from others
for message translators.
2012-10-31 03:59:27 +09:00
FUJIWARA Katsunori
78e9fa90ae i18n: add "i18n" comment to error messages of template functions 2012-10-31 03:59:27 +09:00
FUJIWARA Katsunori
2cf8855a64 icasefs: make case-folding collision detection as deletion aware (issue3648)
Before this patch, case-folding collision is checked simply between
manifests of each merged revisions.

So, files may be considered as colliding each other, even though one
of them is already deleted on one of merged branches: in such case,
merge causes deleting it, so case-folding collision doesn't occur.

This patch checks whether both of files colliding each other still
remain after merge or not, and ignores collision if at least one of
them is deleted by merge.

In the case that one of colliding files is deleted on one of merged
branches and changed on another, file is considered to still remain
after merge, even though it may be deleted by merge, if "deleting" of
it is chosen in "manifestmerge()".

This avoids fail to merge by case-folding collisions after choices
from "changing" and "deleting" of files.

This patch adds only tests for "removed remotely" code paths in
"_remains()", because other ones are tested by existing tests in
"test-casecollision-merge.t".
2012-10-31 16:50:22 +09:00
Durham Goode
a2ecd990ef mq: fix qrefresh case sensitivity (issue3271)
When calling qrefresh with filenames, the filenames were being
treated as case-sensistive on case-insensitive file systems.
So 'qrefresh foo' would not match file 'Foo', and it failed silently.
This fix makes it work correctly on case-insensitive file systems.

Previously the matching function was applied directly to the filenames.
Now we apply the matching function through repo.status, which handles
the case logic for us. A side effect of using repo.status is that
if the qrefresh file doesn't exist, there is output stating it
doesn't exist.

Adds a test to an existing mq refresh case test.
2012-10-30 13:19:06 -07:00