Commit Graph

1785 Commits

Author SHA1 Message Date
Eric Hopper
7011a8d5a5 Cleanup hgweb and hgwebdir's run method a bit. 2006-06-30 09:50:25 -07:00
Benoit Boissinot
eb4253c05c validate the resulting date in parsedate 2006-06-30 18:48:06 +02:00
Jose M. Prieto
9f3a9a5e6e Allow the use of human readable dates (issue 251) 2006-06-30 18:47:35 +02:00
Eric Hopper
39248f1205 Fix hgwebdir to run hgweb using run_wsgi. 2006-06-30 08:47:41 -07:00
Benoit Boissinot
11e30052ea add -r/--rev arguments to incoming and outgoing 2006-06-30 16:16:35 +02:00
Benoit Boissinot
e2896f54f1 add a new template function 'hgdate'
'hgdate' turns a date into a cset timestamp as printed by 'hg export'
2006-06-30 10:15:18 +02:00
Eric Hopper
cbbc59972c Arrange for old copies of CGI scripts to still work. 2006-06-29 19:06:18 -07:00
Eric Hopper
f4e85c5507 Fix raw files in the web UI. 2006-06-29 18:34:26 -07:00
Haakon Riiser
7b06333d1a diff: add -b/-B options 2006-06-29 15:16:25 +02:00
Benoit Boissinot
7dd019b60b use __contains__, index or split instead of str.find
str.find return -1 when the substring is not found, -1 evaluate
to True and is a valid index, which can lead to bugs.
Using alternatives when possible makes the code clearer and less
prone to bugs. (and __contains__ is faster in microbenchmarks)
2006-07-09 01:30:30 +02:00
Benoit Boissinot
79ae0c65b1 coding style: use spaces instead of tabs 2006-07-08 16:55:49 +02:00
Vadim Gelfer
8c133566b8 bdiff: improve worst case behavior by 100x.
on 5.8MB (244.000 lines) text file with similar lines, hash before
this change made diff against empty file take 75 seconds.  this change
improves performance to 0.6 seconds.  result is that clone of smallish
repo (137MB) with some files like this takes 1 minute instead of 10
minutes.

common case of diff is 10% slower now, probably because of worse cache
locality. but diff does not affect overall performance in common case
(less than 1% of runtime is in diff when it is working ok), so this
tradeoff looks good.
2006-07-07 15:02:55 -07:00
Matt Mackall
b2760f583c Convert hg annotate to context api 2006-06-28 17:42:17 -05:00
Matt Mackall
0128820309 convert hg cat to new context api 2006-06-28 17:11:42 -05:00
Matt Mackall
828e814bf2 Add context helper functions to localrepo 2006-06-28 17:08:10 -05:00
Matt Mackall
092ee51a9a Add context.py: changeset and file revision contexts 2006-06-28 17:07:46 -05:00
Matt Mackall
2c85c281c4 simplify make_filename, fix hg cat bug
hg cat was using file-level rev/node ids for generating filename
templates. This simplifies make_filename to only use changeset
rev/node ids.
2006-06-28 17:06:56 -05:00
Matt Mackall
ca55a0ae02 revlog: make lookup handle binary nodes 2006-06-28 16:52:42 -05:00
Matt Mackall
e00f914b09 revlog: handle integer arguments to lookup 2006-06-28 15:49:33 -05:00
Vadim Gelfer
0abf0a06d3 import: make help clearer. suggested by asak. 2006-06-27 09:41:05 -07:00
Eric Hopper
a557f02a71 Really fix http headers for web UI and issue 254.
This also arranges for static content to allow a keepalive connection.
2006-06-27 09:33:12 -07:00
Vadim Gelfer
958489deb9 import: added tests, fixed bugs found by tests and asak. 2006-06-27 09:30:50 -07:00
Vadim Gelfer
6a5fd53170 merge with crew. 2006-06-27 00:13:44 -07:00
Vadim Gelfer
26b73700a8 merge with wsgi changes. 2006-06-27 00:10:41 -07:00
Eric Hopper
8ac8a46249 Put support for persistent connections back in. 2006-06-27 00:09:37 -07:00
Eric Hopper
000dcf2978 Fix two small bugs that would've prevented the web interface and IPv6
from working.
2006-06-27 00:09:35 -07:00
Eric Hopper
4498f60ff4 This patch make several WSGI related alterations.
First, it changes the server to be almost a generic WSGI server.

Second, it changes request.py to have wsgiapplication and
_wsgirequest.  wsgiapplication is a class that creates _wsgirequests
when called by a WSGI compliant server.  It needs to know whether
or not it should create hgwebdir or hgweb requests.

Lastly, wsgicgi.py is added, and the CGI scripts are altered to
use it to launch wsgiapplications in a WSGI compliant way.

As a side effect, all the keepalive code has been removed from
request.py.  This code needs to be moved so that it is exclusively
in server.py
2006-06-27 00:09:33 -07:00
Eric Hopper
a0494b3aa0 Fix server to set up a more WSGI compliant environment. 2006-06-27 00:09:31 -07:00
Vadim Gelfer
c311a0a586 import: parse email messages 2006-06-27 00:09:13 -07:00
Thomas Arendsen Hein
26282a0687 Don't require opts['dry_run'] to be set to fix external tools like tailor. 2006-06-27 08:31:03 +02:00
Thomas Arendsen Hein
609fc3aa7b Allow using default values with ui.configlist, too, and add a test for this. 2006-06-26 22:44:48 +02:00
Thomas Arendsen Hein
58e95b6ac7 Make "[web] allow_push, deny_push" and "[http_proxy] no" use ui.configlist. 2006-06-26 16:47:24 +02:00
Thomas Arendsen Hein
b1e9507c44 Fixed [web] allow_archive for comma separated parameters by using ui.configlist.
Changed tests/test-archive to use allow_archive instead of the deprecated
allowzip, allowgz and allowbz2.
2006-06-26 14:56:14 +02:00
Thomas Arendsen Hein
a8184486dc Added ui.configlist method to get comma/space separated lists of strings.
For example:
 users = alice, bob
 colors = red green blue
2006-06-26 14:52:26 +02:00
Thomas Arendsen Hein
6ed54e7d77 Fix ui.expandpath problem and broken test introduced by 5460bea2cce9. 2006-06-26 14:49:18 +02:00
Vadim Gelfer
fc206d2a40 do not try to package lsprof if not available. 2006-06-23 19:20:22 -07:00
Vadim Gelfer
b32329ed97 make ui.expandpath better with default path. 2006-06-23 18:23:32 -07:00
Vadim Gelfer
67d092ce02 push, outgoing, bundle: fall back to "default" if "default-push" not defined 2006-06-23 18:09:44 -07:00
Vadim Gelfer
b283318ce4 print message after backout that tells that backout adds new head. 2006-06-23 17:33:10 -07:00
Chris Mason
2124a015d1 Fix localrepo.changes() Correctly decide if we are diffing the working dir 2006-06-23 16:42:48 -07:00
Benoit Boissinot
231afefcb6 simplify filterfiles when filtering based on a directory
since an unkown files cannot be an exact match, we bisect
for a <path>/ instead of <path> and we get only the files
below the directory.
2006-06-23 08:09:48 +02:00
Brendan Cully
4c25b98467 filterfiles: Search as long as the target is a prefix of current.
filterfiles was failing to find files for directory arguments if
another file existed that started with the directory name and
sorted earlier. For example, a manifest of ('foo.h', 'foo/foo')
would cause filterfiles('foo') to return nothing. This resolves
issue #294.
2006-06-23 00:11:53 +02:00
Vadim Gelfer
df5378a901 remove duplicate code. 2006-06-21 22:45:29 -07:00
Shun-ichi GOTO
13b2a0288b Fixed conditional include of stdint.h for windows/msvc6/python2.3 environment. 2006-06-22 13:19:52 +09:00
andrea@suse.de
a73c78bc87 Fix hg diff regression 2006-06-22 02:44:39 +02:00
Vadim Gelfer
29a0efc318 fix -I/-X when relative paths used or in subdir 2006-06-21 17:30:31 -07:00
Vadim Gelfer
acba08e292 hg.repository: many routines expect path to be a string even if empty. 2006-06-21 17:09:29 -07:00
Vadim Gelfer
c6946676ed fix bug in localrepo.changes.
caused by a7bed91ac70412cad91b76f93863bba06d289ff4.
2006-06-21 16:20:21 -07:00
Vadim Gelfer
b2be07e448 use commit time as mtime for file archives.
now output from two run of "hg archive -t zip" is same.
2006-06-21 15:31:23 -07:00
Vadim Gelfer
ed8f9c5fd3 archive: make "hg archive -t XXX -" to write to stdout 2006-06-21 15:15:06 -07:00
Vadim Gelfer
f6098bdc1f merge with crew. 2006-06-21 09:32:31 -07:00
Chris Mason
4bb4096145 Fix cold cache diff performance
cold cache diff performance has regressed in two ways.  localrepo.changes
has optimizations for diffing against the working dir parent that expect
node1 to be None.  commands.revpair() usage means that commands.dodiff()
never sends node1 == None.  This is fixed in localrepo.changes by checking
against the dirstate parents.

In the non-dirstate parents case, localrepo.changes does a loop comparing
files without first sorting the file names, leading to random access
across the disk.
2006-06-21 09:28:48 -07:00
Vadim Gelfer
fb46b0c6ed change some repo messages in small ways.
move "pushing" and "pulling" after repo create so error message and exit
happens before messages printed.

fix sshrepo parse error message.
2006-06-21 09:15:42 -07:00
Vadim Gelfer
529a731a4f make repo scheme table driven. 2006-06-21 09:14:36 -07:00
Vadim Gelfer
cbbcaa74fe merge with crew. 2006-06-20 23:58:45 -07:00
Vadim Gelfer
9a0c813fdc use demandload more. 2006-06-20 23:58:21 -07:00
Vadim Gelfer
bdb09ce800 hg.repository: make protocol table driven.
allows extensions to add new protocols.
2006-06-20 18:39:52 -07:00
Vadim Gelfer
e18ca75a83 mac os x: fixes for 10.2 from chris monson <monpublic@gmail.com> 2006-06-20 17:51:39 -07:00
Vadim Gelfer
f76d70d9bf http client: better work with authorization errors, broken sockets. 2006-06-20 15:23:54 -07:00
Vadim Gelfer
9420a748d4 push over http: server side authorization support.
new hgrc entries allow_push, deny_push, push_ssl control push over http.

allow_push list controls push.  if empty or not set, no user can push.
if "*", any user (incl. unauthenticated user) can push.  if list of user
names, only authenticated users in list can push.

deny_push list examined before allow_push.  if "*", no user can push.
if list of user names, no unauthenticated user can push, and no users
in list can push.

push_ssl requires https connection for push.  default is true, so password
sniffing can not be done.
2006-06-20 15:23:01 -07:00
Vadim Gelfer
ce407e5396 push over http: client support.
stream bundle data using PUT request.
2006-06-20 15:17:28 -07:00
Vadim Gelfer
6086f69eb4 push over http: server support.
write "unbundle" verb for http.
2006-06-20 15:16:50 -07:00
Vadim Gelfer
f40e35da3c localrepository.push: propagate return value 2006-06-20 15:14:12 -07:00
Vadim Gelfer
b1e704337e util: add limit to amount filechunkiter will read 2006-06-20 15:13:17 -07:00
Alexis S. L. Carvalho
30401d484f Change revlog.heads to walk the revision graph using revision numbers
On the kernel repo:
$ hg heads -q
           before    after
RevlogNG    1.11     0.52
Revlogv0    0.80     0.69

Since the current code for tags has to find all the heads of the repo,
this also helps there:
$ hg tags
           before    after
RevlogNG    2.35     1.76
Revlogv0    2.04     1.90
2006-06-20 15:02:23 -03:00
Alexis S. L. Carvalho
6b69fa6621 Add revlog.parentrevs function.
This allows one to walk the revision graph using only revision numbers,
which can be faster than using revision hashes, especially for
RevlogNG, where the parents of a revision are stored as revision
numbers.
2006-06-20 14:57:30 -03:00
Vadim Gelfer
bc2cb8b453 tidy up mtime patch of andrea, get back half of performance loss.
this makes diff < 3% slower than before.
2006-06-20 09:11:41 -07:00
andrea@suse.de
6083ed97d2 report correct mtime in the hg diff output 2006-06-20 15:37:41 +02:00
Benoit Boissinot
c1d180ca1d change log message creation when using 'hg import'
if found cmdline is used
else if found patch header is used
else launch hgeditor
2006-06-18 19:10:48 +02:00
Benoit Boissinot
ea689c7cfa merge with crew 2006-06-17 18:36:04 +02:00
Benoit Boissinot
b46c312897 fix an undefined variable spotted by pychecker 2006-06-17 18:20:09 +02:00
Benoit Boissinot
c52f027dd4 fix unused variable warning from pychecker 2006-06-17 18:15:48 +02:00
Vadim Gelfer
6144b74dd7 replace os.stat with os.lstat in some where. 2006-06-16 12:58:24 -07:00
Vadim Gelfer
d0da6a6a6f httprepo: make "http://user:pass@host/" urls work 2006-06-16 10:19:45 -07:00
Vadim Gelfer
1df1c4def9 httprepo: fix small bug in authentication. 2006-06-16 10:02:59 -07:00
Alexis S. L. Carvalho
30e9b6e2d4 Update keepalive.py to current CVS version of urlgrabber.
This fixes a bug where the output of test-bad-pull would differ
between python 2.3 and 2.4.  Also update the expected output of
this test.
2006-06-16 10:00:37 -03:00
Vadim Gelfer
f739175f8c http: query server for capabilities 2006-06-15 17:07:30 -07:00
Vadim Gelfer
db0725df5c remove use of undefined variable. 2006-06-15 16:41:49 -07:00
Vadim Gelfer
9117f9f380 extend network protocol to stop clients from locking servers
now all repositories have capabilities slot, tuple with list of names.

if 'unbundle' capability present, repo supports push where client does
not need to lock server.  repository classes that have unbundle capability
also have unbundle method.

implemented for ssh now, will be base for push over http.

unbundle protocol acts this way.  server tells client what heads it
has during normal negotiate step.  client starts unbundle by repeat
server's heads back to it.  if server has new heads, abort immediately.
otherwise, transfer changes to server.  once data transferred, server
locks and checks heads again.  if heads same, changes can be added.
else someone else added heads, and server aborts.

if client wants to force server to add heads, sends special heads list of
'force'.
2006-06-15 16:37:23 -07:00
Vadim Gelfer
b0f5563c91 hgweb: split "verbs" into methods. 2006-06-15 13:27:57 -07:00
Vadim Gelfer
d71b1891cb http client: support persistent connections.
uses keepalive module from urlgrabber package.  tested against "hg serve",
cgi server, and through http proxy.  used ethereal to verify that only
one tcp connection used during entire "hg pull" sequence.

if server supports keepalive, this makes latency of "hg pull" much lower.
2006-06-15 12:57:59 -07:00
Vadim Gelfer
a6efe6d9e6 http server: support persistent connections.
only "hg serve" affected yet.  http server running cgi script will not
use persistent connections.  support for fastcgi will help that.

clients that support keepalive can use one tcp connection for all
commands during clone and pull.  this makes latency of binary search
during pull much lower over wan.

if server does not know content-length, it will force connection to
close at end.  right fix is to use chunked transfer-encoding but this is
easier and does not hurt performance. only command that is affected is
"changegroup" which is always last command during a pull.
2006-06-15 12:55:58 -07:00
Benoit Boissinot
6eff6b4069 replace old-http:// syntax by static-http:// and deprecate the redundant hg:// 2006-06-14 21:53:42 +02:00
Vadim Gelfer
ae14071210 dirstate: fix call to os.lstat when st is None 2006-06-13 14:56:01 -07:00
Vadim Gelfer
74267cb826 honor signals during load of extensions. 2006-06-13 08:56:23 -07:00
Vadim Gelfer
a7a6090062 dirstate.read: make 15% faster.
time to read dirstate for my kernel repo goes from 0.22s to 0.18s.
2006-06-12 22:09:50 -07:00
Vadim Gelfer
d3100d1f2c merge with crew. 2006-06-12 09:36:44 -07:00
Vadim Gelfer
6ee0c5dc9f dirstate: speed up inner loop of read. 2006-06-12 09:36:23 -07:00
Thomas Arendsen Hein
56a3c0876e Report on push/pull if heads are merged, too, like for new heads.
Use case: If a remote repo has two heads and I _want_ to merge them, I merge
and push. Meanwhile someone else pushed on top of one of the heads. He won't
get a warning, because he doesn't create a new head, I won't notice that I
don't close a head, because I don't get a message telling me.
2006-06-10 17:39:29 +02:00
Benoit Boissinot
4c76bf148e merge with upstream 2006-06-10 11:28:40 +02:00
Matt Mackall
6452b6e88f ssh: add capability detection at startup
Because older servers don't return any output for unknown commands,
it's tricky to add new commands. The approach is this: we add a
"hello" command that reports any interesting capabilities (and other
things that might be of interest in the future). To detect whether
this new command is supported, we issue both it and our startup
detection command ("between") at the beginning of a connection.
2006-06-09 18:03:35 -05:00
Matt Mackall
e9d5610b1d ssh: gather initial output so we can do capability detection 2006-06-09 17:48:14 -05:00
Matt Mackall
3debcf9f86 Initial implementation of hello command for ssh 2006-06-09 17:47:38 -05:00
Vadim Gelfer
8861256257 add --lsprof option. 3x faster than --profile, more useful output.
results include calls to c code and nested calls.

requires python 2.5 or lsprof installed from svn at
http://codespeak.net/svn/user/arigo/hack/misc/lsprof/
2006-06-09 12:05:17 -07:00
Vadim Gelfer
14cebaa7d7 copy: fix introduced bug. 2006-06-09 09:14:30 -07:00
Vadim Gelfer
2f048b868e make description of -n option better. 2006-06-09 09:09:17 -07:00
Vadim Gelfer
440db9b651 revert: add -n/--dry-run option 2006-06-09 09:06:40 -07:00
Vadim Gelfer
7273631cf4 remove: add -n/--dry-run option 2006-06-09 09:00:08 -07:00
Vadim Gelfer
86d912ea78 copy: add -n/--dry-run option 2006-06-09 08:48:30 -07:00
Vadim Gelfer
99c2de6f9e addremove: add -n/--dry-run option 2006-06-09 08:42:36 -07:00
Vadim Gelfer
114744d3cb add: add -n/--dry-run option 2006-06-09 08:40:06 -07:00
Vadim Gelfer
58d36bd614 debugconfig: allow to print by section and exact item name 2006-06-08 11:28:27 -07:00
Vadim Gelfer
aa92622634 revert: better fix for not printing 'reverting' message 2006-06-07 13:16:25 -07:00
Vadim Gelfer
de949d0590 revert: check for changes against target rev 2006-06-07 10:33:26 -07:00
Benoit Boissinot
796cc73beb pick a non-conflicting module name when loading an extension
prefix the module name by 'hgext_' so that it doesn't conflict
with any core python module (for example bisect -> hgext_bisect)

fix issue271
2006-06-07 18:33:15 +02:00
Thomas Arendsen Hein
494ca88023 Fixed 'hg serve --webdir-conf foo' which broke due to split of hgweb. 2006-06-05 16:48:24 +02:00
Thomas Arendsen Hein
531e4e3573 Further cleanup of ui.py (changeset 158595c3f09e used one-char variable names). 2006-06-05 12:24:00 +02:00
Eung-Ju PARK
03e548ea66 packagescan can't scan nested packages 2006-06-02 16:19:47 +09:00
Vadim Gelfer
1014e2c420 import: allow to import stdin with file name "-" 2006-06-04 16:47:46 -07:00
Vadim Gelfer
d2bc16b368 fix comment. 2006-06-04 10:32:13 -07:00
Vadim Gelfer
38798208ac merge with crew. 2006-06-04 10:30:46 -07:00
Vadim Gelfer
fd56f76ec7 merge change to ssh protocol. 2006-06-04 10:29:34 -07:00
Vadim Gelfer
c57ade3a95 refactor ssh server. 2006-06-04 10:26:05 -07:00
Matt Mackall
292b3da40c Give a response to unknown SSH commands 2006-06-04 18:05:52 +01:00
Benoit Boissinot
55cbea1661 remove appendfile for the manifest when adding a changegroup
Since the changelog is using appendfile, the manifest entries cannot
be referenced, so we don't need to use append file for the manifest.
2006-06-04 17:46:33 +02:00
Benoit Boissinot
e0e1e090fa hgweb: fix errors and warnings found by pychecker
- fix missing import
- use type_ instead of type
- remove unused variable
2006-06-04 12:19:51 +02:00
Benoit Boissinot
72acadbf1d dirstate: refactor the dirstate binary format, remove magic numbers 2006-06-04 02:25:27 +02:00
Eric Hopper
1d1293da03 Adjusting hgweb splitup to be a little cleaner. 2006-06-02 08:25:02 -07:00
Eric Hopper
c6fcaec078 Fixing up comment headers for split up code. 2006-06-02 08:05:01 -07:00
Vadim Gelfer
c2592d7d3d merge with crew. 2006-06-01 15:55:09 -07:00
Markus F.X.J. Oberhumer
a0e21775b5 Cleanup: unifiy the coding style in the ui.py configitems forwarders.
No functional changes.
2006-06-01 15:54:31 -07:00
Markus F.X.J. Oberhumer
54c6cdc1d8 Expand '~' in path to extensions. 2006-06-01 15:53:43 -07:00
Thomas Arendsen Hein
4b040d1963 Renamed localrepo.undo() to rollback() and talk about "rollback information". 2006-06-01 19:08:29 +02:00
Thomas Arendsen Hein
e4abeb4452 Fix automatic decompression of tarballs with Firefox.
The encoding was set to gzip/bzip2, so Firefox (correctly) assumed, that this
has to be "decoded" (i.e. decompressed).
2006-06-01 18:36:32 +02:00
TK Soh
63cd05485f hgweb: fix tracebacks on both index and repo pages 2006-06-01 09:14:27 -05:00
Thomas Arendsen Hein
28d5a5ad5d Allow comma to separate types in allow_archive, too. Use longer variable name. 2006-06-01 17:51:40 +02:00
TK Soh
633f958ebe hgweb: add allow_archive support to [web] section of hgrc 2006-06-01 10:02:24 -05:00
Vadim Gelfer
36a7dc7e89 merge with crew. 2006-05-31 14:16:21 -07:00
Thomas Arendsen Hein
5800bfc290 Manifest groups may be empty, so don't abort in this case (fixes issue210).
Only abort on empty changelog and file revlogs.
2006-05-31 22:25:20 +02:00
Eric Hopper
0379b620c6 Final stage of the hgweb split up.
hgweb and hgwebdir now have their own modules.
2006-05-31 10:42:44 -07:00
Thomas Arendsen Hein
6e9c33e5eb Pass filename to decoder for 'hg archive' (fixes issue267)
Despite writing to a file descriptor, the check in the
[decode] section needs a filename.
localrepo.wwrite() still writes to the file descriptor.
2006-05-31 19:41:01 +02:00
Eric Hopper
20797956ec Splitting up hgweb so it's easier to change. 2006-05-31 08:03:29 -07:00
Benoit Boissinot
7f2c70ddf8 use a more reliable way to find what are the new changesets on pull/unbundle
The number of csets and the hooks where wrong (negative number of csets) when
we unbundled a bundle which contains csets we already had.
Remove unused variables.
2006-05-24 10:59:30 +02:00
Benoit Boissinot
d91b489a27 merge with crew 2006-05-24 09:27:16 +02:00
Benoit Boissinot
c070465611 n is always 'True', we can only stop the loop with the break statement 2006-05-24 01:01:39 +02:00
Vadim Gelfer
88b27ca967 add ui.has_config method. 2006-05-23 14:57:45 -07:00
Benoit Boissinot
ba6fa6a223 document and fix findincoming
- add documentation about what the function does, notably
  the fact that it updates 'base'
- transform the workflow to a more simple 'if elif elif else'
- do not call remote.branches if not necessary
- some nodes where missing in 'base' (from what I understand,
  if the root of a branch is missing but one parent is present,
  the parent should be in 'base')
- add a testcase for an incorrect outgoing that is fixed by
  this cset
- add a testcase for an empty group bug, it needs fixing
2006-05-23 10:44:40 +02:00
Vadim Gelfer
46bfa5a813 http: fix many problems with url parsing and auth. added proxy test.
problems fixed:

- https scheme handled properly for real and proxy urls.

- url of form "http://user:password@host:port/path" now ok.

- no-proxy check uses proper host names.
2006-05-22 15:42:49 -07:00
Vadim Gelfer
36e6b802b2 http: print better error if exception happens. 2006-05-22 09:00:24 -07:00
Vadim Gelfer
b8bc35963b add ui.print_exc(), make all traceback printing central. 2006-05-22 08:47:53 -07:00
Vadim Gelfer
5c09ef5952 merge with crew. 2006-05-21 23:07:50 -07:00
Vadim Gelfer
fc995eeb9e diff: allow to use -rA:B syntax as well as -rA -rB 2006-05-21 23:07:19 -07:00
Vadim Gelfer
d4708f60e2 add 'uisetup' function to extension module protocol.
if uisetup functin exists in extension, is called before cmdtable examined.
called with ui object as parameter. lets module modify cmdtable before
commands.py sees it.
2006-05-21 22:14:11 -07:00
Alexis S. L. Carvalho
8b1ff2c942 hgweb.manifest: revno of manifest and changelog aren't always the same
In the v4l-dvb repo, the manifest revno and the changelog revno are not
in sync.  This happened because the same patch was applied to the same
revision in two different branches, resulting in the same manifest text,
with the same parents and so the first revision was reused.

Since hgweb.manifest was assuming the revnos of the manifest and of the
changelog were always the same, clicking on manifest -> bz2 in the
v4l-dvb site would download the wrong revision.

Use the linkrev to go from manifest revision to changelog revision.

This still won't be perfect since the page will still talk about
"manifest for changeset XYZ", where XYZ was the first changeset to have
this manifest, which is not necessarily the same changeset that the user
clicked to get to this page - but at least the contents will be the
same.
2006-05-20 15:34:19 -03:00
Vadim Gelfer
6870c5c25e merge with crew. 2006-05-19 08:57:26 -07:00
Vadim Gelfer
4e8a64a4b7 merge with crew. 2006-05-19 08:57:12 -07:00
Volker Kleinfeld
271afc71fc setup.py: install packagescan before any mercurial modules is imported
Further the installation of packagescan over demandload is moved to the
packagescan module.

I added as well few more comments in the packagescan module to avoid
the wrong use of package scan in the future.

Reason:

mercurial.packagescan acts as fake mercurial.demandload during a py2exe
run.  Unfortunatly the import of mercurial.version in setup.py is done
before mercurial.packagescan is installed. This results in few imports
without mercurial.packagescan in charge and therefore not all dependend
modules are detected when running mercurial.packagescan.getmodules
later e.g.  winerror is missed.
2006-05-19 08:54:28 -07:00
Volker Kleinfeld
cbdd4c99a6 packagescan: handle demandload module naming changes. 2006-05-19 08:51:58 -07:00
Vadim Gelfer
5eb540c338 fix parsing of tags. make parse errors useful. add new tag tests.
old code read every head of .hgtags. delete and recreate of .hgtags gave
new head, but if error in deleted rev, .hgtags had error messages every
time it was parsed. this was very hard to fix, because deleted revs hard
to get back and update, needed merges too.

new code reads .hgtags on every head. advantage is if parse error
happens with new code, is possible to fix them by editing .hgtags on a
head and committing.

NOTE: new code uses binary search of manifest of each head to be fast,
but still much slower than old code. best thing would be to have delete
record stored in filelog so we never touch manifest. could find live
heads directly from filelog. this is more work than i want now.

new tests check for parse of tags on different heads, and inaccessible
heads created by delete and recreate of .hgtags.
2006-05-18 23:31:12 -07:00
Volker Kleinfeld
138d9f83fc Remove quotes from patch command.
When the gpatch fix for solaris was introduced in b67447b909f3 the
patch command was "". For some strange reason windows 2000 is
not happy with those quotes when given in os.popen.
2006-05-18 22:35:41 -07:00