Commit Graph

20061 Commits

Author SHA1 Message Date
Simon Heimberg
e2f8f71e76 Makefile: fix po file updating by using same file name everywhere
The update is done on a temporary file since d6abb3586946. The name of this
file was first XX.po~ and has been changed to XX.po.tmp in all except of one
place. Do this now.
2013-11-17 12:17:55 +01:00
Kevin Bullock
938beaeee7 mq: prefer a loop to a double-for list comprehension
The [x for y in l for x in y] syntax is nigh-incomprehensible, and this
is a particularly easy case to expand into a loop since there's no 'if'
condition in the list comprehension.
2013-11-24 17:29:10 -06:00
Martin Geisler
dcfdb001e6 graphlog: mark as deprecated 2013-11-23 18:34:32 +01:00
Martin Geisler
7316194bdf tests: don't load unnecessary graphlog extension
Since graphlog is in core, we can use 'hg log -G' instead.
2013-11-22 19:14:17 +01:00
Martin Geisler
865c68aba2 hg: remove outdated comment
The graphlog functionality has been in core since Mercurial 2.3.
2013-11-22 19:13:26 +01:00
Martin Geisler
505a3bce01 tests: use strip extension instead of mq where it makes sense
When a test only uses 'hg strip', it no longer needs to load MQ.
2013-11-22 17:10:08 +01:00
Simon Heimberg
2f030231df tests: fix hghave root on windows
This lets tests\test-hghave.t pass on windows where geteuid does not exist.
2013-11-23 01:06:20 +01:00
Christian Ebert
2d9f477387 keyword: wlock while setting branch in kwdemo 2013-11-20 12:55:08 +00:00
Simon Heimberg
765aac2e8e tests: add missing glob 2013-11-17 15:43:46 +01:00
Bryan O'Sullivan
0fb3ccb7e6 Merge 2013-11-26 21:55:21 -08:00
Abhay Kadam
fbe291d0cf mercurial/parsers.c: fix compiler warning
When try to compile on x64 OS X, I get this warning:

mercurial/parsers.c:931:27: warning: implicit conversion loses integer precision
: 'long' to 'int' [-Wshorten-64-to-32]
                        ? 4 : self->raw_length / 2;

The patch verifies if value of self->raw_length falls bellow INT_MAX; if not,
it raises the ValueError exception.

If value of self->raw_length is greater than 4, it's casted to int type, to
eliminate the warning.
2013-11-19 23:49:11 +05:30
Matt Mackall
05fd1f2542 merge with stable 2013-11-25 16:15:44 -06:00
Siddharth Agarwal
c63108e7d7 strip.stripcmd: remove redundant wlock acquire/release
Now that we acquire and release a wlock in the outer scope, this is redundant.
2013-11-18 09:09:05 -08:00
Matt Mackall
322fcce8a9 merge with stable 2013-11-25 12:18:29 -06:00
Siddharth Agarwal
9b0eab9940 bookmarks: make setcurrent with None an error 2013-11-15 18:41:40 -08:00
Siddharth Agarwal
8116051405 strip: use bookmarks.unsetcurrent instead of setcurrent with None 2013-11-15 18:31:02 -08:00
Siddharth Agarwal
e7e0c5ad48 bmstore.write: use unsetcurrent instead of setcurrent with None 2013-11-15 18:28:57 -08:00
Siddharth Agarwal
ac345dd993 commands.bookmark: use unsetcurrent instead of setcurrent with None
There are currently two different ways we can have no active bookmark:
.hg/bookmarks.current being missing and it being an empty file. This patch and
upcoming ones make an empty file the only way to represent no active bookmarks.
This is the right choice because it matches the state that a new repository
without bookmarks will be in.
2013-11-15 18:06:01 -08:00
Matt Mackall
40d3e4ba4e merge with stable 2013-11-22 17:26:58 -06:00
FUJIWARA Katsunori
cf37230008 lock: take both vfs and lock file path relative to vfs to access via vfs
This patch makes "lock.lock.__init__()" take both vfs and lock file
path relative to vfs, instead of absolute path to lock file.

This allows lock file to be accessed via vfs.
2013-11-12 16:23:52 +09:00
FUJIWARA Katsunori
f2d55c7c7d vfs: add "makelock()" and "readlock()" 2013-11-12 16:23:52 +09:00
FUJIWARA Katsunori
2b101a0a9d hg: rewrite "copystore()" with vfs
This patch rewrites "copystore()" with vfs, because succeeding patch
requires "lock.lock()" invocation with vfs.

This patch uses 'dstbase + "/lock"' instead of "join()" with both
elements even on Windows environment but it should be reasonable,
because target files given from "store.copyfiles()" already uses "/"
as path separator.

"util.copyfiles()" between two vfs-s may have to be rewritten in the
future.
2013-11-12 16:23:52 +09:00
FUJIWARA Katsunori
461da17148 localrepo: import "lock" module as "lockmod" for readability
Before this patch, "localrepo.py" has many methods defining local
variable "lock", even though it imports "lock" module as "lock". This
ambiguity decreases readability.
2013-11-12 16:23:52 +09:00
FUJIWARA Katsunori
ed122f7175 transaction: take journal file path relative to vfs to use file API via vfs 2013-11-12 16:23:52 +09:00
FUJIWARA Katsunori
f39330457a vfs: add "chmod()" 2013-11-12 16:23:52 +09:00
FUJIWARA Katsunori
d6fa8a9bfa vfs: add "isfile()" 2013-11-12 16:23:52 +09:00
FUJIWARA Katsunori
cf2ceb0ac9 transaction: unlink target file via vfs
Before this patch, unlink target file is once opened before unlinking,
because "opener" before vfs migration doesn't have "unlink()"
function.

This patch uses "vfs.unlink()" instead of "open()" and "fp.name".
2013-11-12 16:23:52 +09:00
Simon Heimberg
527ea5386e relink: abort earlier when on different devices (issue3916)
Add a first check of the devices before collecting candidate files. This is
much quicker when big repos are on different devices.
Keep the existing check in prune. It checks for same device of the files. This
could probably be different in a special repo store (with symlinks).
2013-11-09 14:50:58 +01:00
Simon Heimberg
cbac9e9e39 localrepo: prevent to copy repo local config, copy baseui instead
Copying a repos local configuration to another repo is a bad idea because the
2nd repo gets the configuration of the first. Prevent this by really calling
repo.baseui.copy when repo.ui.copy is called.
This requires some changes in commandserver which needs to clone repo.ui for
rejecting temporary changes.

This patch has its roots back in the topic "repo isolation" around 68ae3063a47d
and was suggested by mpm.
2013-11-11 22:59:26 +01:00
FUJIWARA Katsunori
8c1c74a873 doc: show details of command options in pages generated by docutils
Before this patch, HTML/man pages generated by docutils don't show
details of each command options, whether it should take argument or
not for example, even though "hg help" does.

This patch shows details of command options as same as "hg help"
shows.

This patch uses "--option <VALUE[+]>" style instead of "--option
<VALUE> [+]" used in output of "hg help", because docutils requires
that option argument strings starts with "<" and ends with ">".
2013-11-08 14:42:09 +09:00
Simon Heimberg
f2d4dbb37b Makefile: intermediate steps work with temporary copy of hg.pot
In case of abortion or a failing step, the target file remains untouched
instead of being in an intermediate state.
2013-11-05 09:43:26 +01:00
Matt Mackall
df890e8b8a merge with stable 2013-11-21 15:08:30 -06:00
Matt Mackall
1b2df1cd91 help: drop help for branches template keyword
The {branches} keyword dates to pre-1.0 Mercurial's tag-like branch
scheme which allowed changesets to be on multiple branches. This is
the last visible vestige of that scheme, users should instead be using
{branch}, possibly with if().
2013-11-21 11:49:31 -06:00
Siddharth Agarwal
5b9c86b786 test-command-template.t: fix failure due to trailing whitespace 2013-11-21 12:47:03 -08:00
Durham Goode
01ed192faf manifest: increase lrucache from 3 to 4
During a commit amend there are 4 manifests being handled:

- original commit
- temporary commit
- amended commit
- merge base

This causes a manifest cache miss which hurts perf on large repos. On a large
repo, this fix causes amend to go from 6 seconds to 5.5 seconds.
2013-11-11 16:35:12 -08:00
Durham Goode
d8c96277e4 strip: add faster revlog strip computation
The previous revlog strip computation would walk every rev in the revlog, from
the bottom to the top.  Since we're usually stripping only the top few revs of
the revlog, this was needlessly expensive on large repos.

The new algorithm walks the exact number of revs that will be stripped, thus
making the operation not dependent on the number of revs in the repo.

This makes amend on a large repo go from 8.7 seconds to 6 seconds.
2013-11-11 16:42:49 -08:00
Durham Goode
9840379432 revlog: return lazy set from findcommonmissing
When computing the commonmissing, it greedily computes the entire set
immediately. On a large repo where the majority of history is irrelevant, this
causes a significant slow down.

Replacing it with a lazy set makes amend go from 11 seconds to 8.7 seconds.
2013-11-11 16:40:02 -08:00
Matt Mackall
74cf3d4bf4 merge with stable 2013-11-19 11:29:56 -05:00
Matt Mackall
6c7d99a18d merge with stable 2013-11-17 20:22:59 -05:00
Augie Fackler
b707be4041 test-module-imports: skip on Python < 2.6, since ast is new in 2.6 2013-11-17 18:13:55 -05:00
Augie Fackler
39437ca6fb Merge with stable. 2013-11-17 17:49:48 -05:00
Siddharth Agarwal
a70310c09e statichttprepo.httprangeheader: implement readlines
bookmarks.readcurrent() requires readlines() on file objects returned from
repo.vfs. It isn't used right now but will be in upcoming patches.
2013-11-17 13:31:18 -08:00
Siddharth Agarwal
b1f5a2bec5 statichttprepo: pass in True to splitlines, not 1
splitlines actually takes a boolean.
2013-11-17 13:28:11 -08:00
Mads Kiilerich
429aab87ea mq: don't add '* * *' separators when there is no commit message 2013-11-16 15:46:28 -05:00
Mads Kiilerich
2dfba4c2b0 bisect: avoid confusing use of variables with same names in nested local scopes 2013-11-16 15:46:29 -05:00
Mads Kiilerich
a4925d4784 discovery: make note messages for new heads more readable 2013-11-16 15:46:29 -05:00
Mads Kiilerich
d93d477327 discovery: tweak error message for multiple branch heads 2013-11-16 15:46:29 -05:00
Mads Kiilerich
98d1245448 test-obsolete-checkheads.t: remove todo comment that was fixed in ed1786de7376 2013-11-16 15:46:29 -05:00
Mads Kiilerich
b0ab086db9 convert: readability and test of rpairs function 2013-11-17 11:18:39 -05:00
Mads Kiilerich
18b361e0b2 tests: make doctest test runner less verbose 2013-11-17 11:16:59 -05:00