Commit Graph

2602 Commits

Author SHA1 Message Date
Alexis S. L. Carvalho
9497591b05 use atomictemp files to write the dirstate 2007-04-09 04:24:17 -03:00
Alexis S. L. Carvalho
9c723b4f96 use atomictemp files to write branch.cache 2007-04-09 04:24:17 -03:00
Alexis S. L. Carvalho
c9f461c7af util.opener: if requested, use atomicfile even if the file doesn't exist
Right now, surprisingly enough, if you request an atomic file but the
file still doesn't exist, you get a regular file.  AFAICS, the only time
this happens is during the initial creation of the dirstate.
2007-04-09 04:24:17 -03:00
Alexis S. L. Carvalho
cbe674cc00 cache os.umask even on windows 2007-04-09 04:24:17 -03:00
Matt Mackall
9d8e9305e4 pull umask-checking up 2006-12-29 20:04:30 -06:00
TK Soh
8a4ed5c177 help: log --keyword is case-insensitive 2007-03-29 10:25:19 -05:00
TK Soh
bdd80aea95 hgweb: expand keyword search to full list of files 2007-03-29 09:32:59 -05:00
TK Soh
9f11c60f21 log: expand keyword search to full list of files 2007-03-29 09:28:10 -05: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
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
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
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
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
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
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
Thomas Arendsen Hein
1de135fc65 Fix help text for hg status -i 2007-03-06 12:52:07 +01:00
Thomas Arendsen Hein
2c5a2d1059 Don't truncate tag and branch names after 30 chars (introduced 42bf4f46781a)
with test added for a long (local) tag name.
2007-03-05 19:48:21 +01:00
Andrei Vermel
3fdb0dcf56 Close keepalive connections to fix server traceback 2007-02-19 12:38:58 +03:00
Erling Ellingsen
3c83c5579e don't return uninitialized memory from bdiff.blocks()
bdiff.blocks() returns a dummy match at the end of both files; the
length of that chunk is never set, so it will sometimes contain random
heap garbage. There are apparently workarounds for this elsewhere:

  # bdiff sometimes gives huge matches past eof, this check eats them,
2007-02-20 22:20:16 +01:00
Patrick Mezard
c887e90ae6 web/server: disable address reuse option for BaseHTTPServer on windows
On windows, a socket with the SO_REUSEADDR option set is able to bind to
any port, even if there's already an active socket listening on it.

test-http: check server address cannot be reused.
2007-02-19 10:08:59 +01:00
Patrick Mezard
5a74c065fc stdout raises EINVAL when flush() is called on a closed pipe under win32.
Maybe the exception should be caught and translated at raise location instead (sshserver.py).
2007-02-19 10:32:46 +01:00
Patrick Mezard
367b6626be localrepo: stream_in may raise ZeroDivisionError with nul float elapsed argument. 2007-02-19 10:29:05 +01:00