Commit Graph

14068 Commits

Author SHA1 Message Date
Mads Kiilerich
6688bea829 convert: also catch missing revlogs when introduced in repo roots
The previous behaviour was almost as if convert.hg.ignoreerrors was always set
for revisions without parents, except that errors were silently ignored. Revlog
errors are handled as a side effect of getcopies(), but getcopies() was only
called when convert.hg.ignoreerrors was set.

Now we always call self.getcopies for root revisions, not only when
convert.hg.ignoreerrors is set, just like we do on all other revisions.
The extra call might be a bit expensive, but the proper fix for that would be
to catch these errors in another way.
2011-05-01 17:34:16 +02:00
Mads Kiilerich
8c1c7b8a31 status: remove unreachable code for status between revisions
The manifest value of a file will never be false when "not parentworking", and
the expensive content comparision would thus fortunately never be reached. (If
it was reached it would be wrong for example in case of renames.)

This code once handled status against working directory, but that has been done
elsewhere for a long time.
2011-02-24 14:06:08 +01:00
Mads Kiilerich
aec14e75e6 httprepo: proper handling of invalid responses without content-type (issue2019)
This can currently be tested on http://sf.net/
2011-03-07 14:47:30 +01:00
Mads Kiilerich
e24ddf937d httprepo: use the original exception after falling back to static-http failed
Before the fine exception handling in httprepo was never shown.

The static-http exception will now only be shown when static-http is requested
explicitly.
2011-03-07 22:50:55 +01:00
Mads Kiilerich
d27df0bd40 test: test that backslash is preserved by the url class 2011-05-01 15:49:13 +02:00
Mads Kiilerich
e0a200cbea tests: use raw string for url tests of '\' handling 2011-05-01 15:49:13 +02:00
Augie Fackler
3d09b5a236 run-tests: add flag to provide extra hgrc options for test runs 2011-05-01 08:00:25 -05:00
Patrick Mezard
ebc1f0434a graphlog: always sort revisions topologically
The grapher cannot really handled revisions if they are not emitted in
topological order. The previous 'reverse()' revset was not enough to achieve
that and was replaced by an explicit sort call for simplicity. The --limit
option is now also handled as usual with cmdutil.loglimit() instead of a
'limit' revset.
2011-05-01 15:51:52 +02:00
Patrick Mezard
399c49e7c9 graphlog: take the union of --rev specs instead of the intersection 2011-05-01 15:51:48 +02:00
Patrick Mezard
6386b88096 graphmod: correctly emit nodes with more than 2 predecessors
The grandparent() function was returning only the closest predecessor of a
missing parent while it must return all of them to display a correct ancestry
graph.
2011-05-01 15:51:46 +02:00
Patrick Mezard
aaafe977fe graphlog: display nodes with more than 2 predecessors
While nodes with more than 2 parents do not exist in revision graphs, they do
appear when you transform them by removing subgraphs while trying to preserve
ancestry links.

This code was borrowed from Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
pbranch extension.
2011-05-01 15:51:20 +02:00
Matt Mackall
2f3e73a448 context: provide an efficient iterator for workingctx
This avoids needing to call status or build a synthetic manifest.
2011-05-01 08:29:50 -05:00
Matt Mackall
e941b69730 merge with stable 2011-05-01 06:06:59 -05:00
Matt Mackall
77a126fc95 merge with nicdumz 2011-05-01 06:04:08 -05:00
Matt Mackall
851d81f156 Added signature for changeset b4c87295fc30 2011-05-01 05:58:04 -05:00
Matt Mackall
a7a9f14c5c merge with i18n 2011-05-01 05:53:28 -05:00
Brodie Rao
5a336c7b00 color: use ui.formatted() to test TTYness, not sys.stdout.isatty()
This fixes the color extension not working with pager (broken in
cab5f9b68e3a). The pager extension already sets ui.formatted=True to
allow this use case.
2011-05-01 12:14:22 +02:00
Brodie Rao
92f1644187 pushkey: add hooks for pushkey/listkeys 2011-05-01 11:12:36 +02:00
Nicolas Dumazet
c45338f8d5 tests: export patches only once in test-impexp-branch 2011-05-01 10:51:10 +02:00
Nicolas Dumazet
892f3cacb5 zeroconf: notify the Zeroconf threads when hg exits
Zeroconf launches two threads in the background, and they wait on
Condition objects to exit. We need to call Zeroconf.close() to
release those conditions so that threads can gracefully exit.

This means that an interrupt on the hg process will now gracefully
propagate to the Zeroconf children, fixing that bug which did not
allow us to kill an `hg serve` process.
2011-04-30 19:36:59 +02:00
Augie Fackler
f360f9d092 test-patchbomb.t: clean up progress tests 2011-04-30 12:02:09 -05:00
Matt Mackall
4cd6f6bed2 util: really drop size from readfile 2011-05-01 04:56:24 -05:00
Dan Villiom Podlaski Christiansen
20529399de util: add readfile() & writefile() helper functions
These two functions allow quickly reading or writing a file, without
relying on reference counting to close the file handle afterwards.
2011-05-01 11:46:49 +02:00
Nicolas Dumazet
98949c2559 tests: do not export several times the same patch/diff in test-import 2011-04-30 18:31:28 +02:00
Alexander Solovyov
2f6ab6bf04 revset aliases 2011-04-30 18:30:14 +02:00
Dan Villiom Podlaski Christiansen
e36632966a opener: add read & write utility methods
The two new methods are useful for quickly opening a file for reading
or writing. Unlike 'opener(...).read()', they ensure they the file is
immediately closed without relying on CPython reference counting.
2011-04-30 19:41:53 +02:00
Dan Villiom Podlaski Christiansen
1eaa37ca32 dispatch: handle IndexErrors 2011-05-01 11:01:57 +02:00
Augie Fackler
720e112a65 color: verify stdout is a tty before using curses
Without this change, curses complains when invoked in certain contexts
because stdout isn't a tty (such as emacs integration) but we ask it
to check for various bits of information from terminfo.
2011-04-30 11:18:43 -05:00
Matt Mackall
89ec131e91 http: minor tweaks to long arg handling
x-arg -> x-hgarg
replace itertools.count(1)
2011-05-01 03:51:04 -05:00
Steven Brown
c1075f3880 httprepo: long arguments support (issue2126)
Send the command arguments in the HTTP headers. The command is still part
of the URL. If the server does not have the 'httpheader' capability, the
client will send the command arguments in the URL as it did previously.

Web servers typically allow more data to be placed within the headers than
in the URL, so this approach will:
- Avoid HTTP errors due to using a URL that is too large.
- Allow Mercurial to implement a more efficient wire protocol.

An alternate approach is to send the arguments as part of the request body.
This approach has been rejected because it requires the use of POST
requests, so it would break any existing configuration that relies on the
request type for authentication or caching.

Extensibility:
- The header size is provided by the server, which makes it possible to
  introduce an hgrc setting for it.
- The client ignores the capability value after the first comma, which
  allows more information to be included in the future.
2011-05-01 01:04:37 +08:00
Dan Villiom Podlaski Christiansen
17cec00272 store: rename the 'opener' argument to 'openertype'
The 'opener' argument wasn't, in fact, an actual opener instance, but
rather something expected to return an opener. The normal argument,
from localrepository, is the scmutil.opener type; hence 'openertype'.
2011-04-30 19:36:48 +02:00
Dan Villiom Podlaski Christiansen
6fdf8d9352 statichttprepo: make the opener a subclass of abstractopener 2011-04-30 19:41:25 +02:00
Dan Villiom Podlaski Christiansen
9b9141450f add filteropener abstraction for store openers 2011-04-30 19:37:13 +02:00
Dan Villiom Podlaski Christiansen
30ecd40f14 opener: introduce an abstact superclass of it
Currently, this class doesn't do anything useful.
2011-04-30 19:36:48 +02:00
Patrick Mezard
ea1a2e99d0 graphlog: use a set for inclusion test
This makes a big difference in performance in the special case where all
revisions are being graphed.
2011-04-30 19:42:00 +02:00
Nicolas Dumazet
13a26e7035 tests: move rebase-keep-branch into rebase-named-branches
It's not worth building a repository just to test keep branch
when we can do it our bigger, other, already built repositories.
2011-04-30 17:38:06 +02:00
Nicolas Dumazet
f349f5b9c5 tests: move testcase from rebase-named-branches to rebase-parameters
It saves us a clone of a repository.
2011-04-30 17:38:06 +02:00
Nicolas Dumazet
fc02c73f8c tests: change test-rebase-parameters to use bundle/rebase.hg 2011-04-30 17:38:06 +02:00
Nicolas Dumazet
cd356ed0bf tests: change test-rebase-detach to use bundle/rebase.hg 2011-04-30 17:38:06 +02:00
Nicolas Dumazet
53cb06c83f tests: simplify test-rebase-named-branches
We were cloning a repo to perform a smoke test that could
have been performed earlier.
2011-04-30 17:38:06 +02:00
Nicolas Dumazet
9a74500329 tests: upgrade bundles/rebase.hg to support test-rebase-collapse
Add two changesets to the scenario so that the bundle can be reused
within three tests.

Before:
  @  5: 'F'
  |
  | o  4: 'E'
  |/|
  o |  3: 'D
  | |
  | o  2: 'C'
  |/
  | o  1: 'B'
  |/
  o  0: 'A'

After:
  @  7: 'H'
  |
  | o  6: 'G'
  |/|
  o |  5: 'F'
  | |
  | o  4: 'E'
  |/
  | o  3: 'D'
  | |
  | o  2: 'C'
  | |
  | o  1: 'B'
  |/
  o  0: 'A'

Revisions 0-1 keep the same number/label. Others were translated by
an offset of 2 (2.C -> 4.E)
2011-04-30 17:38:06 +02:00
Nicolas Dumazet
1dd586b3dd tests: introduce a rebase bundle to use with rebase tests
Allows saving a few seconds in test runs by not constructing
over and over the same repository.
2011-04-30 17:38:06 +02:00
Nicolas Dumazet
be93b69b75 tests: create a bundle to bootstrap tests using a remote repository
It should be faster to use a single common bundle instead of
recreating 4 times the same repository manually.
2011-04-30 17:38:06 +02:00
Nicolas Dumazet
274ada7d8c tests: move test bundles in a bundles/ subdirectory 2011-04-30 17:38:06 +02:00
Nicolas Dumazet
561d5dd9fb tests: move test-issue436 in test-dispatch where fancyopts is tested 2011-04-30 17:38:06 +02:00
Nicolas Dumazet
b847a60638 tests: remove test-issue433 as it's covered by test-parents 2011-04-30 17:38:06 +02:00
Nicolas Dumazet
a2d3866adb tests: remove executable bits from unified tests
Those files are not executable.
2011-04-30 17:38:06 +02:00
Nicolas Dumazet
9d38dd1944 tests: remove test-issue322 as it's fully included in test-issue660 2011-04-30 17:38:06 +02:00
Martin Geisler
a5dc911698 merge with mpm 2011-04-30 15:30:51 +02:00
Idan Kamara
a4468d58f7 graphmod: restore generator nature of dagwalker
a32a0f72065a introduced the ability to walk the DAG
given arbitrary revisions, but changed the behaviour of
it to return a list of all nodes (and create a changectx
for each one) rather than doing it lazily.

This has a pretty significant impact on performance for large
repositories (tested on CPython repo, with output disabled):

  $ time hg glog

  real	0m2.642s
  user	0m2.560s
  sys	0m0.080s

Before a32a0f72065a:

  $ time hg glog

  real	0m0.143s
  user	0m0.112s
  sys	0m0.032s

And after this fix:

  $ time hg glog

  real	0m0.213s
  user	0m0.184s
  sys	0m0.028s
2011-04-30 15:10:58 +03:00