Commit Graph

4006 Commits

Author SHA1 Message Date
Alexis S. L. Carvalho
31232bf5ab run-tests.py: use coverage.py with "#!/usr/bin/env python" tests 2007-04-07 04:27:55 -03:00
Alexis S. L. Carvalho
63574c7e40 run-tests.py: small cleanup 2007-04-07 04:27:55 -03:00
Alexis S. L. Carvalho
5dd065da79 run-tests.py: use coverage.py with *.py tests 2007-04-07 04:27:55 -03:00
Alexis S. L. Carvalho
77c152a933 run-tests.py: tell coverage.py to ignore errors
Otherwise there'll be some IOErrors when it tries to open python
files created during the execution of e.g. test-hook.
2007-04-07 04:27:55 -03:00
Alexis S. L. Carvalho
766df29f00 test-bad-pull: try to avoid timing-related failures 2007-04-07 04:27:55 -03:00
Alexis S. L. Carvalho
0489c59b5e Try to find diffstat in PATH before calling it
At least on Solaris, /bin/sh will print a "command not found" message
even if we redirect stderr.
2007-04-07 04:27:55 -03:00
Alexis S. L. Carvalho
8e9491052e Add a pointer to "hg -v help" to the bottom of hg help {,cmd} output
This should make it easier to discover global options.

As a bonus, they are no longer displayed by something like a
hg -v help dates
2007-04-07 04:27:55 -03:00
Alexis S. L. Carvalho
b98b34fc2e revlog.py: fix/tweak read ahead code in lazyparser 2007-04-07 04:27:55 -03:00
Matt Mackall
ebc2b5ccc8 merge: fix a bug where copies were ignored 2007-04-05 16:43:18 -05:00
Matt Mackall
84a6ecd211 tags: require -f to replace an existing tag
based on a patch from Johan Herland <johherla@online.no>
2007-03-23 00:12:28 -05:00
Matt Mackall
6d86b7e7d9 tags: fix abababa case, with test case 2007-03-22 23:52:50 -05:00
Alexis S. L. Carvalho
1ff95ba799 debugsetparents: wlock the repo before updating the dirstate 2007-03-19 19:07:40 -03:00
Alexis S. L. Carvalho
3082154fa5 avoid _wsgioutputfile <-> _wsgirequest circular reference
We use the _wsgirequest object itself as the output file object.

To avoid a "self.out = self" which would create another circular
reference, we make the "out" attribute a trivial property.
2007-03-19 19:07:39 -03:00
Alexis S. L. Carvalho
b2ef464fc4 avoid wsgiapplication <-> MercurialHTTPServer circular reference 2007-03-19 19:07:38 -03:00
Alexis S. L. Carvalho
69ecc6b336 hgwebdir: break templater -> templater circular reference
This is essentially another instance of the same problem fixed
by the parent changeset.  See its commit message for the details.
2007-03-19 19:07:37 -03:00
Alexis S. L. Carvalho
8bb9d231ee hgweb: break templater -> templater circular reference
The problem were some functions passed in the "defaults" argument
during the templater creation which use "self.t" directly.  This
creates the cycle:

 hgweb object
  -> templater object
      -> defaults dict
          -> footer function
              -> hgweb object

Instead of completely avoding the cycle, we break it after using
the templater.
2007-03-19 19:07:35 -03:00
Thomas Arendsen Hein
a6c18d39af Fixed synopsis for some mq commands 2007-03-18 20:39:25 +01:00
Thomas Arendsen Hein
1bd533bfe0 hg qseries -m: guards file was not ignored 2007-03-18 20:37:47 +01:00
Thomas Arendsen Hein
b05341e0d2 Tests for qapplied/qunapplied fixes (10a3604dafc6 and 394fae2055db) 2007-03-18 19:41:28 +01:00
Thomas Arendsen Hein
3c65cfc2d4 Simplified qseries and hg qapplied to fix some bugs caused by optimization:
- hg qapplied -v now works consistendly to hg qunapplied -v, i.e. showing
  guarded (or unapplied because they were guarded during hg qpush) patches.
- hg qapplied <patchname> now works again
2007-03-18 12:20:15 +01:00
Thomas Arendsen Hein
6e23ab4e60 Fix issue443: inconsistent output of "hg qunapplied -v"
1. Don't skip over unpushable (guarded) unapplied patches.
2. Don't display unpushable patches, unless -v is given, otherwise
   guarded and unguarded patches can't be distinguished.
2007-03-17 18:46:52 +01:00
Alexis S. L. Carvalho
beebce1bec avoid a traceback with hg branch newbranch; hg up 2007-03-16 00:22:59 -03:00
Alexis S. L. Carvalho
e488c0e84f Fix handling of paths when run outside the repo.
The main problem was that dirstate.getcwd() returned just "",
which was interpreted as "we're at the repo root".  It now returns
an absolute path.

The util.pathto function was also changed to deal with the "cwd is
an absolute path" case.
2007-03-16 00:22:58 -03:00
Alexis S. L. Carvalho
fcb39243b1 pass repo.root to util.pathto() in preparation for the next patch 2007-03-16 00:22:57 -03:00
Alexis S. L. Carvalho
2b2a1a8a86 hgweb: handle IOErrors and OSErrors during unbundle
This allows the client to display a reasonable message to the user
(e.g. "Permission denied: .hg/lock"), instead of the current
"<url> does not appear to be an hg repository".
2007-03-16 00:22:55 -03:00
Alexis S. L. Carvalho
8d63449217 hgweb.unbundle: call req.httphdr only after the last possible call to bail 2006-10-22 13:54:43 -03:00
Alexis S. L. Carvalho
b1e6fe8df6 Work around a urllib2 bug in Python < 2.4.2
When urllib2 base64-encodes the password needed for the Proxy-authorization
header, it forgets to remove the trailing "\n".  Later, a "\r\n" sequence
is appended to every header, as required by the standard.

Some proxies interpret the resulting "\n\r\n" sequence in the same way as
"\r\n\r\n": end of headers.  This usually doesn't cause trouble for this
request, but when the proxy tries to read the next one, it thinks the
request starts with some garbage and returns a "400 - Bad Request" error.
2007-03-16 00:22:53 -03:00
Alexis S. L. Carvalho
459844ad17 Fix confusing message from hg revert (issue332)
% mkdir sub1
   % touch sub1/file1
   % hg add sub1/
   adding sub1/file1
   % hg rev sub1
   sub1: No such file in rev 53588684b6e6
   forgetting sub1/file1
2007-03-16 00:22:52 -03:00
Matt Mackall
e07d848162 Merge with crew 2007-03-15 18:55:53 -05:00
Matt Mackall
e33842c05f revlog: attempt to gracefully handle some interleaved damage 2007-03-15 18:38:46 -05:00
Thomas Arendsen Hein
87850b6a0e Merge with hg-stable 2007-03-15 09:49:45 +01:00
Matt Mackall
d6ce65f557 tags: add --remove 2007-03-14 19:13:04 -05:00
Matt Mackall
ba891a21b8 tags: remove unused variables 2007-03-14 18:49:10 -05:00
Matt Mackall
6788bba79c Make the tags algorithm smarter 2007-03-14 18:47:29 -05:00
Matt Mackall
bc68a5f878 Refactor tags code to prepare for improving the algorithm 2007-03-14 16:40:47 -05:00
Thomas Arendsen Hein
678e517eae Only hg repositories override [paths], not simple directories (fixes issue510) 2007-03-14 22:38:40 +01:00
Matt Mackall
c1ade819b5 Remove dummy branch hack from tests 2007-03-13 18:53:23 -05:00
Matt Mackall
c2bb73121f Move branch read/write to dirstate where it belongs 2007-03-13 18:50:02 -05:00
Matt Mackall
19d825d10e Minor default branch cleanups 2007-03-13 15:47:55 -05:00
Matt Mackall
2e188aa5f4 Move branches.cache to branch.cache
Keeps old clients from conflicting with new caches, makes features
logic unnecessary.
2007-03-13 15:18:10 -05:00
Alexis S. L. Carvalho
fd69fe8d91 "default" is the default branch name 2007-03-13 15:02:33 -03:00
Brendan Cully
28541ac316 Test update to branch tip 2007-03-10 17:36:29 -08:00
Brendan Cully
09cc2427b1 Make update with no node jump to the tip of the current branch 2007-03-10 17:36:27 -08:00
Alexis S. L. Carvalho
d3e0262e32 fix qrefresh'ing an empty patch
This is not superefficient (the commit will have to walk the whole tree),
but it works.
2007-03-10 22:03:23 -03:00
Alexis S. L. Carvalho
0458b30ebf statwalk: don't put self.root in the files list
That list is supposed to contain internal, normalized names ("/"-separated,
relative to the repo root), not OS-native paths.
2007-03-10 22:03:22 -03:00
Alexis S. L. Carvalho
264f45926a fix qclone to a remote repo
This fixes issue467.  -stable still needs something like revision
cb494d252290 - mq: allow push if -r is given explicitly.

In the meantime, hg qpop -a; hg qclone . ssh://...  is a workaround.
2007-03-10 22:03:21 -03:00
Alexis S. L. Carvalho
fb49d2b002 Save an absolute path in repo.path
This should keep things working if the process changes directories
after creating a repo object.
2007-03-10 22:03:20 -03:00
Thomas Arendsen Hein
5329cb6bed Add tests for .hg/branches.cache feature list. 2007-03-09 19:57:26 +01:00
Thomas Arendsen Hein
71a353f733 Add a features list to branches.cache to detect caches of old hg versions.
The leading space in the written file makes sure that the feature list never
can match an existing version, even if the first feature can be read as hex.
Additionally old hg versions display the id with --debug, too.
2007-03-09 19:12:03 +01:00
Thomas Arendsen Hein
92fa573aed Store empty (default) branch in branch cache, too.
Operations on this branch don't work otherwise.

Reading branches.cache had to be adjusted to allow an empty label.
Adjusted reading of the cache tip for symmetry, no functional change here.
2007-03-09 18:09:02 +01:00