Commit Graph

4754 Commits

Author SHA1 Message Date
Alexis S. L. Carvalho
3b07689b6a serve: respect settings from .hg/hgrc
create_server was looking only at the root ui object, ignoring any
settings from .hg/hgrc.  To keep respecting command-line arguments,
commands.serve must also call repo.ui.setconfig.
2007-07-11 19:56:16 -03:00
Edouard Gomez
52552f6c05 Fix inconsistency for the stream_out capability in hgweb
During some experiments of mine, the uncompressed cloning could not
be enabled for hgweb.cgi nor hgwebdir.cgi though the server claimed
to be stream_out capable.

The only solution was to enable it using the user's .hgrc file.
This solution is not acceptable when publishing the repos through
an HTTP server because the CGI runs as a www dedicated user whose's
home hgrc file may not be accessible to users publishing their repos
through their userdir.

For such cases we could end up with this typical debug output:
hg --debug clone --uncompressed http://server/hg/project
destination directory: project
sending capabilities command
capabilities: lookup changegroupsubset stream=1
unbundle=HG10GZ,HG10BZ,HG10UN
sending stream_out command
abort: operation forbidden by server

The error lies in the fact the hgweb object defines new accessors
to the repo configuration that trust things by default (untrusted=True)
but the streamclone:stream_out function uses the usual accessors to the
repo.ui object, which do not trust by default (untrusted=False)

Fix this inconsistency, adding a new parameter to the stream_out function.
hgweb then forces a "trust by default" behavior.
2007-05-12 00:41:30 +02:00
Alexis S. L. Carvalho
5dde9c8a57 improve warning for hg add foo; hg mv foo bar 2007-07-11 19:56:16 -03:00
Alexis S. L. Carvalho
3739335e3b util._hgexecutable: default to 'hg'
This should make hooks work even if util.set_hgexecutable is not called
(e.g. hgweb.cgi).

Fixes issue625.
2007-07-11 18:15:21 -03:00
Alexis S. L. Carvalho
c2a8afba01 archive: add symlink support 2007-07-11 17:40:41 -03:00
Alexis S. L. Carvalho
ecefa1684a archive: use util.opener when archiving files.
This simplifies the code a bit and makes it easier to support symlinks.
2007-07-11 17:40:41 -03:00
Alexis S. L. Carvalho
ea93afaf3c localrepo.wwrite: use opener.symlink
This makes us fall back to regular files if symlinks are not supported.
2007-07-11 17:40:41 -03:00
Alexis S. L. Carvalho
422bcbcb1d Add symlink method to util.opener.
Differences from os.symlink:

- the symlink name is relative to the opener base directory

- if a file with that name already exists, it's removed

- if necessary, parent directories are created

- if the system (OS or filesystem) doesn't support symlinks, a
  regular file is created.  Its contents are the symlink target.
2007-07-11 17:40:41 -03:00
Alexis S. L. Carvalho
2a73361d92 turn util.opener into a class 2007-07-11 17:40:41 -03:00
Thomas Arendsen Hein
28e90ca5c4 Fixed double slash for doc install path introduced by using $DESTDIR (issue620)
$MANDIR already is an absolute path so the extra / isn't needed.
2007-07-08 12:58:19 +02:00
Thomas Arendsen Hein
898f48cc24 hg log: Move filtering implicit parents to own method and use it in templater.
Extended test repo in test-command-template to contain changeset to test this.
2007-07-08 12:52:08 +02:00
Thomas Arendsen Hein
a0ef6536ad Strip whitespace from changeset description in changeset_templater.
changeset_printer already does this, too.
2007-07-08 10:43:57 +02:00
Thomas Arendsen Hein
ef171537f6 merge with crew-stable 2007-07-06 08:48:28 +02:00
Lee Cantey
b7b57a0fbc Add html docs and use for help shortcut 2007-07-05 15:40:29 -07:00
Matt Mackall
aa6e63596e Merge with crew-stable 2007-07-05 16:15:57 -05:00
Matt Mackall
d00f8a1d6c merge: fix adding untracked files on directory rename (issue612)
Fix from Brendan
Added test case
2007-07-05 16:01:07 -05:00
Patrick Mezard
83721a8880 test-archive: stop checking md5 absolute values
Different tar/zlib versions can generate different binaries.
2007-07-05 20:39:03 +02:00
Matt Mackall
cfe7a0a522 merge: make test for fast-forward merge stricter (issue619)
don't allow merging with an ancestor
fix != on contexts
add a test
2007-07-05 13:34:18 -05:00
Patrick Mezard
cd13d33922 Fix issue589 wording problem 2007-07-05 19:13:08 +02:00
Thomas Arendsen Hein
d01208a3d1 Fixed calling the merge script and reporting errors in debuginstall (issue617) 2007-07-04 09:20:56 +02:00
Thomas Arendsen Hein
2501b7aeac Fix revlog.children so the real children of the null revision can be calculated. 2007-07-03 12:45:33 +02:00
Alexis S. L. Carvalho
f9b8c79d22 hgweb: use lrwxrwxrwx as the permissions of a symlink 2007-07-03 03:06:40 -03:00
Alexis S. L. Carvalho
8c2c88e404 Make hg add foo; hg mv foo bar work.
- foo will be removed (the user has a copy of its contents in bar)

- bar will not be marked as a copy (there was no committed version of foo).
  We print a warning telling that to the user.

Fixes issue269.
2007-07-03 03:06:40 -03:00
Alexis S. L. Carvalho
a21d4fc96a test-copy2: use status -C instead of debugstate | grep copy 2007-07-03 03:06:40 -03:00
Alexis S. L. Carvalho
d69c63e916 test-rename: use hg status -C; don't use hg debugstate | grep copy 2007-07-03 03:06:40 -03:00
Thomas Arendsen Hein
34b7fe0900 Make hgk handle filenames with spaces (issue49) 2007-07-01 19:15:25 +02:00
Thomas Arendsen Hein
03bf1f420d Use "--config ui.report_untrusted=false" for hg calls in hgk, fixes issue523.
tcl's exec yields an error if output to stderr happens and isn't redirected to
a file, so the warnings about untrusted .hg/hgrc caused problems in hgk.
The warning is still printed when executing 'hg view', so the user can see it
when using it from the shell.
2007-07-01 15:22:49 +02:00
Thomas Arendsen Hein
12ab0bc744 Added full URL to debug output if something doesn't look like an http hg repo.
This way it is easier to debug problems with failing subcommands, like
changegroupsubset due to permission problems, when generally accessing
the repository works fine.
2007-06-29 11:13:36 +02:00
Brendan Cully
b1034db3e9 Handle extensions with defined but empty cmdtable 2007-06-28 21:16:25 -07:00
Brendan Cully
edeeaca988 mq: more qdelete help text tweaks 2007-06-28 09:19:08 -07:00
Brendan Cully
98fb3fa634 mq: require patch argument or revision for qdelete 2007-06-28 08:42:43 -07:00
Thomas Arendsen Hein
d17146e533 Make hg glog abort if unused arguments are given. 2007-06-28 16:18:09 +02:00
Thomas Arendsen Hein
4784c1900b Abort if earlygetopt fails to detect an option.
Otherwise it could happen that a command is used on the wrong repository,
because abbreviations of --cwd or --repository were ignored.
2007-06-28 16:03:45 +02:00
Thomas Arendsen Hein
780c8f7779 Simplified earlygetopt and made it remove parsed options and values.
The order of aliases is no longer important, too.
2007-06-28 15:56:25 +02:00
Thomas Arendsen Hein
e10fcd1450 Disallow short earlygetop option combined with other short options
While "hg commit -qRfoo" can be read as "--quiet --repository foo",
"hg commit -mRfoo" should be "--message Rfoo".
2007-06-27 20:37:33 +02:00
csaba.henk@creo.hu
b3d7f22dba Fix tgz archival on Windows.
Making tgz's on Windows has been broken by 4183b5f64f62
due to not being careful enough about binary mode opens.
2007-06-27 08:35:26 -07:00
Thomas Arendsen Hein
0b7147a667 Updated command tables in commands.py and hgext extensions.
- Marked for translation where extensions already had _()
- Corrected indentation
- fixed a few synopsises
2007-06-26 22:38:57 +02:00
Thomas Arendsen Hein
c6d47ef08c Catch illegal boolean values in hgrc nicely.
With hg 0.9.3 the section and parameter name wasn't printed,
with hg 0.9.4 there was a traceback for ValueError.
2007-06-26 20:37:15 +02:00
Thomas Arendsen Hein
b90da02eb3 Added test for earlygetopt fixes (8301dd2ee152 and fd08e85716bd) 2007-06-26 18:39:28 +02:00
Thomas Arendsen Hein
1dcdb0a53a Fix earlygetop for short options with unnecessary spaces removed
Examples:
 hg log -qR foo
 hg log -Rfoo
 hg log -qRfoo
2007-06-26 18:35:31 +02:00
Nathan Jones
8fc48b4f99 Fix serve on Windows without win32* modules. 2007-06-26 10:48:58 -04:00
Patrick Mezard
fa253700b6 test-demandimport: match upper-case hexadecimal 2007-07-05 19:11:38 +02:00
Thomas Arendsen Hein
5b3cfe2be9 Fix and test 'hg backout' without or with too many revisions. 2007-06-26 15:28:17 +02:00
Matt Mackall
ef34871a77 Added signature for changeset e64b8d651071183a358d6f98136eb08450366023 2007-06-25 21:23:24 -05:00
Bryan O'Sullivan
753061d492 Update binary installer files. 2007-06-25 16:35:27 -07:00
Brendan Cully
23fe084573 mq: regularize patch header creation.
Do not prefix qnew patches with [mq]: when a message has been given.
Always use [mq]: as the prefix for generated commit messages.
2007-06-25 15:57:01 -07:00
Alexis S. L. Carvalho
08bab0f618 convert: "unknown" is a string 2007-06-25 18:52:12 -03:00
Jean-Francois PIERONNE
7a71f63f2b OpenVMS patches 2007-06-08 16:24:43 +02:00
Hollis Blanchard
50bf402546 fix 'convert' with single commit repositories
The attached patch passes the three 'convert' testcases, and also is
able to successfully convert the git.git repository.
2007-06-25 14:50:25 -05:00
Matt Mackall
469dca271e backout: report short hash in commit message 2007-06-25 12:44:48 -05:00