Commit Graph

3822 Commits

Author SHA1 Message Date
Augie Fackler
2986e3abf8 Merge with stable. 2013-01-10 09:43:28 -05:00
Mads Kiilerich
79e0196dc6 largefiles: make update with backup files in .hglf slightly less broken
Largefiles update would try to copy f to f.orig if there was a .hglf/f.orig .
That is in many many ways very very wrong, but it also caused an abort if f
didn't exist.

Now it only tries to copy f if it exists.
2013-01-10 15:33:14 +01:00
Sean Farley
96729d25e1 color: add template label function 2012-12-28 19:25:10 -06:00
Idan Kamara
ba14804c98 record: remove unused import 2013-01-09 21:13:52 +02:00
Idan Kamara
547e15c84f cvsps: fix indentation 2013-01-09 21:11:00 +02:00
Pierre-Yves David
d625ea9d23 clfilter: drop unnecessary explicit filtering on histedit
Hidden changeset filtering is now done at repo level. The orphaned
children computation will not include any (unless you add --hidden).
2012-12-24 12:00:08 +01:00
Benoit Boissinot
12b2b140f5 zeroconf: use port from server instead of picking port from config (issue3746)
In order to get the port, wrap create server instead of
hgweb_mod/hgwebdir_mod.
2012-12-30 19:19:52 +01:00
Mads Kiilerich
82c7e260df largefiles: don't walk through all ignored files
Problem: 'hg status' with largefiles enabled would walk through all the files
that .hgignore said should be ignored. That made it slow if a lot of files were
.hgignored or the cache was cold.

It seems like there was a reason to this, but other improvements has rendered
this unnecessary.

Solution: .hgignore is now only ignored when that is requested (--ignore).

This is a minimal 'stable' change. There is room for other improvement.
2012-12-13 19:19:06 +01:00
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
Pierre-Yves David
d23fadbe9a clfilter: drop unnecessary explicit filtering on rebase
Hidden changeset filtering is now done at repo level. The rebaseset
computation will not include any (unless you add --hidden).
2012-12-04 14:58:19 +01:00
Pierre-Yves David
a1985448ad clfilter: enforce hidden changeset globally
The dispatch code now enables filtering of "hidden" changesets globally. The
filter is installed before command and extension invocation. The `--hidden`
switch is now global and disables this filtering for any command.

Code in log dedicated to changeset exclusion is removed as this global filtering
has the same effect.
2013-01-08 20:37:37 +01:00
Denis Laxalde
b706c87e50 record: use patch.diffopts to account for user diffopts
This allows user defined diff options (e.g. showfunc) to be accounted for
when using record. A test has been updated accordingly.
2013-01-08 21:16:39 +01:00
Bryan O'Sullivan
7b68f267c0 convert: fix most test-check-code-hg violations in cvsps code 2013-01-08 16:26:52 -08:00
Frank Kingswood
41de1ef081 cvsps: use commitids (when present) to detect changesets
Simplify core logic by no longer attempting to work around missing
class attributes. Instead always generate the attributes and ignore
the cache if the attributes are missing
2013-01-08 20:11:20 +00: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
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
Pierre-Yves David
4dda0af56b mq: drop _cacheabletip usage
Strip have dedicated work around to solve the same problem, strip is even a
fraction faster without that thanks to simpler update process of the branchcache.
2012-12-28 03:42:21 +01:00
Benoit Boissinot
e1a55dc93c zeroconf: use port from server instead of picking port from config (issue3746)
In order to get the port, wrap create server instead of
hgweb_mod/hgwebdir_mod.
2012-12-30 19:19:52 +01:00
Augie Fackler
2316255c71 largefiles: stop using <> operator in favor of !=
<> has been deprecated for a while, and != is futureproof
2013-01-01 13:04:40 -06:00
Pierre-Yves David
febbf1f08f histedit: allow operation from non-head if obsolete is enabled
Obsolescence markers can represent this situation just fine. Rewritten
revisions are marked as precursors of the ones creates by
histedit. Unaffected descendants become "unstable".

If obsolescence is not enabled we keep the current behavior of
aborting. This new behavior only applies when obsolete is
enabled and is subject to future discussion and changes.
2012-12-31 17:46:22 -06:00
Pierre-Yves David
5fe6f9df7f rebase: allow non-head rebase-set when obsolete is enabled
Obsolescence markers can represent this situation just fine. Rebased
revisions are marked as precursors of the ones create by
rebase. Unrebased descendants becomes "unstable".

If obsolescence is not enabled we keep the current behavior of
aborting. This new behavior only applies when obsolete is
enabled and is subject to future discussion and changes.
2012-12-31 17:45:52 -06:00
Mads Kiilerich
9302004c43 largefiles: cleanup of warnings on errors getting largefiles
Especially the "no default or default-push path set in hgrc" was often very
misleading and didn't give any hint where it actually was looking.

A long error messages is better than several multi-line messages.
2012-12-13 19:19:06 +01:00
Mads Kiilerich
f356c36feb largefiles: remove trivial portability wrappers 2012-12-13 19:19:06 +01:00
Mads Kiilerich
8c4d272590 largefiles: remove reporemove portability wrapper 2012-12-13 19:19:06 +01:00
Mads Kiilerich
59edc6b723 largefiles: remove findoutgoing portability wrapper 2012-12-13 19:19:06 +01:00
Mads Kiilerich
b9392de5ec largefiles: use constant for '.hglf/'
Problem: '.hglf' + '/' was computed in some tight loops. There is no need for
that.
2012-12-13 19:19:06 +01:00
Mads Kiilerich
6b50b212dd largefiles: use plain wjoin instead of the complex pathto 2012-12-13 19:19:06 +01:00
Mads Kiilerich
c4f44002f9 largefiles: unindent code 2012-12-28 11:55:57 +01:00
Mads Kiilerich
38f4eda033 largefiles: simplify lfdirstate ignore handling - it is only for tracking .hglf 2012-12-13 19:19:06 +01:00
Mads Kiilerich
ba25df8826 largefiles: rename 'admin' to more descriptive 'lfstoredir' 2012-12-13 19:19:06 +01:00
Mads Kiilerich
8c0ce2a8b9 largefiles: simplify lfutil.getstandinmatcher by inlining getmatcher 2012-12-13 19:19:06 +01:00
Mads Kiilerich
e973341bd0 largefiles: remove overly complex handling of ignored and unknown files 2012-12-13 19:19:06 +01:00
Mads Kiilerich
20020a39e4 largefiles: introduce basic debugstate --large functionality
Very useful for debugging largefiles "performance" issues.

This is used for testing 45d039e26849.
2012-12-28 11:55:57 +01:00
Mads Kiilerich
275333d6c9 util: fold ENOENT check into unlinkpath, controlled by new ignoremissing flag
Refactor a common pattern.
2012-12-28 11:55:57 +01:00
Mads Kiilerich
056fcbf2bc merge with stable 2012-12-28 11:55:45 +01:00
Pierre-Yves David
6f3f4215a3 branchmap: simplify _branchtags using a new _cacheabletip method
The current _branchtags method is a remnant of an older, much larger function.
Its only remaining role is to help MQ to alter the version of branchcache we
store on disk. As MQ mutates the repository it ensures persistent cache does not
contain anything it is likely to alter.

This changeset makes explicit the stable vs volatile part of repository and
reduces the MQ specific code to the computation of this limit. The main
_branchtags code now handles this possible limit in all cases.

This will help to extract the branchmap logic from the repository.

The new code of _branchtags is a bit duplicated, but as I expect major
refactoring of this section I'm not keen to setup factorisation function here.
2012-12-20 11:52:50 +01:00
Bryan O'Sullivan
bac2c7da41 inotify: on Python < 2.6, socket.error lacks errno 2012-12-20 11:40:04 -08:00
Bryan O'Sullivan
783a54d437 inotify: pacify pestiferous pyflakes precipitously 2012-12-19 16:56:26 -08:00
Bryan O'Sullivan
3a10142595 posix: move server side of unix domain sockets out of inotify
We also turn the unix domain socket into a class, so that we have a
sensible place to hang its logically related attributes and behaviour.

We'll shortly want to reuse this in other code.
2012-12-18 17:15:13 -08:00
Bryan O'Sullivan
e063b46f80 inotify: don't fall over just because of a dangling symlink
Previously, the inotify server failed to start if .hg/inotify.sock was
a symlink that pointed to a non-existent path. This behaviour does not
seem to make any sense.

Now, if we encounter a broken symlink, we unlink it and continue.
2012-12-18 17:33:32 -08:00
Siddharth Agarwal
e01899aaca rebase: use lazy ancestor membership testing
For a repository with over 400,000 commits, rebasing one revision near tip,
this avoids one walk up the DAG, speeding the operation up by around 0.8
seconds.
2012-12-17 20:51:21 -08:00
Siddharth Agarwal
7a2f9d28dd transplant: replace incancestors uses with ancestors 2012-12-17 15:08:06 -08:00
Mads Kiilerich
f53a267ea1 mq: don't fail when removing a patch without patch file from series file 2012-12-09 00:25:21 +01:00
Mads Kiilerich
53f5b626ae largefiles: align rm warnings with warnings used in core 2012-12-13 19:19:06 +01:00
Mads Kiilerich
2d06a8beab merge with stable 2012-12-13 21:34:55 +01:00
Mads Kiilerich
ac8e1fc147 check-code: there must also be whitespace between ')' and operator
The check pattern only checked for whitespace between keyword and operator.

Now it also warns:
 >     x = f(),7
 missing whitespace after ,
 >     x = f()+7
 missing whitespace in expression
2012-12-09 23:33:16 +01:00
Pierre-Yves David
5ccc6bfa9a clfilter: rename unfilteredmeth to unfilteredmethod
As originally intended.
2012-11-30 22:34:21 +01: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