Commit Graph

7946 Commits

Author SHA1 Message Date
Matt Mackall
35b02109ec remove: suggest forget to undo adds 2011-09-16 17:53:58 -05:00
Matt Mackall
afc77ff233 remove: simplify help
- move the obscure parts into the verbose help
- drop confusing references to "remove from repository" / "not remove
  from history"
- add mention of hg forget
2011-09-16 17:41:36 -05:00
Matt Mackall
0fdc02c47b import: add help examples 2011-09-16 17:08:18 -05:00
Matt Mackall
ed765a6700 id: add some help examples 2011-09-16 16:52:45 -05:00
Matt Mackall
ed8757e2e2 export: add help examples 2011-09-16 16:40:27 -05:00
Matt Mackall
f675d667e0 diff: add help examples 2011-09-16 16:39:55 -05:00
Matt Mackall
2bdbf24590 archive: add help examples 2011-09-16 15:31:21 -05:00
Simon Heimberg
d6ebf02048 util: fix finding of hgexecutable
The version introduced in 0070c1dc1b72 would for example return thg
(thanks to Mads Kiilerich for pointing to this)
2011-07-23 06:18:18 +02:00
Matt Mackall
fbed9a5363 log: add a usage note about --removed 2011-09-16 14:37:57 -05:00
Matt Mackall
715141efcd log: rearrange the help text a bit 2011-09-16 14:37:56 -05:00
Matt Mackall
c1eff9f80e log: add some usage examples to verbose help 2011-09-16 14:37:55 -05:00
Matt Mackall
f48ca50b08 minirst: fix container stripping logic 2011-09-16 14:37:53 -05:00
Greg Ward
5dc38028a3 share: allow trailing newline on .hg/sharedpath.
This is extremely handy for those occasional circumstances where you
need to edit .hg/sharedpath manually, since modern Unix text editors
make it surprisingly difficult to create a text file with no trailing
newline.
2011-09-14 22:28:27 -04:00
Matt Mackall
1071a1b580 merge with stable 2011-09-14 14:37:10 -05:00
Matt Mackall
ce9126c527 win32: quietly ignore missing CreateHardLinkA for Wine 2011-09-13 17:01:07 -05:00
Greg Ward
897039c55d rollback: improve readability; clarify that the return value is an int. 2011-09-11 21:21:58 -04:00
Steve Streeting
6a5c8744b6 osutil: avoid accidentally destroying the True object in isgui (issue2937)
Needed to use 'Py_RETURN_TRUE' instead of 'return Py_True' to avoid
reference count errors which would randomly crash the Python
executable during merge. This only happened when you had something
configured in merge-tools and the merge was large enough.
2011-09-08 11:34:59 +01:00
Sune Foldager
2a9298df3c bundlerepo: add argument check before unlink
The default argument value of None, for bundlename, would cause an exception.
Callers currently pass an empty string, thus dodging this problem.
2011-09-14 13:51:50 +02:00
Simon Heimberg
4cccc99bac ui: write traceback to self.ferr 2011-09-11 14:42:30 +02:00
Dan Villiom Podlaski Christiansen
c5a1d45b09 patch: handle 'gitpatches' being empty, but not none 2011-09-11 18:49:41 +02:00
Renato Cunha
fca28dd4ac url: Remove the proxy env variables only when needed (issue2451)
This is an attempt to fix issue 2451 and its duplicates (2599 and 2949, AFAIK).
Its main idea is that it is only necessary to clean the proxy environment
variables *when* http_proxy is set in the config file (since it takes
precedence over the environment variables). Otherwise, hg shouldn't bother with
them, since they will most likely be used to reach the server.
2011-09-08 20:40:24 -03:00
Matt Mackall
19be20e2ef url: parse fragments first (issue2997) 2011-09-10 17:49:19 -05:00
Matt Mackall
3b9c548c27 log: remove -h short option for --hidden (issue2995) 2011-09-09 14:41:22 -05:00
Matt Mackall
b63b8d693b hgweb: properly check for bookmarks when drawing graph 2011-09-08 18:29:53 -05:00
FUJIWARA Katsunori
5b5a083f16 i18n: calculate terminal columns by width information of each characters
neither number of 'bytes' in any encoding nor 'characters' is
appropriate to calculate terminal columns for specified string.

this patch modifies MBTextWrapper for:

  - overriding '_wrap_chunks()' to make it use not built-in 'len()'
    but 'encoding.colwidth()' for columns of string

  - fixing '_cutdown()' to make it use 'encoding.colwidth()' instead
    of local, similar but incorrect implementation

this patch also modifies 'encoding.py':

  - dividing 'colwith()' into 2 pieces: one for calculation columns of
    specified UNICODE string, and another for rest part of original
    one. the former is used from MBTextWrapper in 'util.py'.

  - preventing 'colwidth()' from evaluating HGENCODINGAMBIGUOUS
    configuration per each invocation: 'unicodedata.east_asian_width'
    checking is kept intact for reducing startup cost.
2011-08-27 04:56:12 +09:00
Simon Heimberg
ef1c701e57 demandimport: determine at load time if __import__ has level argument 2011-08-22 22:50:52 +02:00
Sune Foldager
10d4f7fdd7 merge with stable 2011-09-14 13:57:56 +02:00
Matt Mackall
af293bcf51 merge with stable 2011-09-12 23:02:45 -05:00
Matt Mackall
757bb24a98 merge with stable 2011-09-10 17:56:42 -05:00
Simon Heimberg
f88e344226 hg: extract copying the store out of clone 2011-08-11 00:03:16 +02:00
Mads Kiilerich
ec483cfecb util: wrap lines with multi-byte characters correctly (issue2943)
This re-introduces the unicode conversion what was lost in e5976ee55f4b 5 years
ago and had the comment:
  To avoid corrupting multi-byte characters in line, we must wrap
  a Unicode string instead of a bytestring.
2011-08-06 23:52:20 +02:00
Augie Fackler
e16b528122 encoding: use getattr isntead of hasattr 2011-07-25 15:19:43 -05:00
Peter Arrenbrecht
83352215f8 setdiscovery: fix hang when #heads>200 (issue2971)
When setting up the next sample, we always add all of the heads, regardless
of the desired max sample size. But if the number of heads exceeds this
size, then we don't add any more nodes from the still undecided set.
(This is debatable per se, and I'll investigate it, but it's how we designed
it at the moment.)

The bug was that we always added the overall heads, not the heads of the
remaining undecided set. Thus, if #heads>200 (desired sample size), we
did not make progress any longer.
2011-08-25 21:25:14 +02:00
Martin Geisler
9b3666843e ui: also swap sys.stdout with self.fout in _readline
In 55a66b5d9114, _readline was changed to output a space using
raw_input and this was done using sys.stdout directly, not self.fout.

This change broke the command server for JavaHg since it (and other
clients) would see a spurious ' ' on stdout and interpret this as an
unknown channel.
2011-08-30 14:18:58 +02:00
Mads Kiilerich
a9383c13c5 subrepo: fix cloning of repos from urls without slash after host (issue2970)
This fixes a regression introduced with the new url handling in 1.9.

This should perhaps be fixed in the url class instead, but that might be too
invasive for a stable bugfix.
2011-08-26 16:23:35 +02:00
Idan Kamara
9b89917a5f ui: pass ' ' to raw_input when prompting
This is a workaround for calling ui.prompt(...), typing some character then
hitting backspace which causes the entire line to delete rather than just the
one character. This was seen on Debian using gnome-terminal.

(credits to Mads for the idea)

Python bug can be found here: http://bugs.python.org/issue12833
2011-08-25 22:06:03 +03:00
Peter Arrenbrecht
bc696e8298 dagutil: fix off-by-one in inverserevlogdag buildup 2011-08-25 17:20:00 +02:00
Wagner Bruna
6790ac4b35 help/config: strip trailing whitespace
This disabled paragraph splitting for translations.
2011-08-18 10:15:14 -03:00
Martin Geisler
efdbb8077d commands: clarify that 'hg heads foo' shows heads on branch foo
This is a FAQ: people try 'hg heads -r foo' and only see the tip-most
branch heads on foo.
2011-08-18 13:56:58 +02:00
Pang Yan Han
92e6290eb7 commands: fix grammar in resolve help text 2011-08-17 16:41:14 +08:00
Shun-ichi GOTO
dad35e5a06 win32: msvcr71.dll should be used for python 2.4 and 2.5
Following is list of C-Runtime for versions of CPython on windows:
 - python 2.4.5 => MSVCR71.dll
 - python 2.5.4 => MSVCR71.dll
 - python 2.6.6 => MSVCR90.dll
 - python 2.7   => MSVCR90.dll
 - python 3.1.2 => MSVCR90.dll
2011-08-08 14:32:27 +09:00
Matt Mackall
cb69aaee4e parsers: avoid pointer aliasing
Newer versions of GCC have aggressive pointer alias optimizations that
might get fooled by our pointer manipulations. These issues shouldn't
be encountered in practice because distutils compiles extensions with
-fno-strict-alias but the code was not valid according to the standard.
2011-08-10 13:40:01 -05:00
Patrick Mezard
107949ab73 http: pass user to readauthforuri() (fix f7ae45a69fcd)
urllib2 never handles URIs with credentials, we have to extract them and store
them in the password manager before handing the stripped URI. Half of the
changes deducing the username from the URI in f7ae45a69fcd were incorrect.
Instead, we retrieve the username from the password manager before passing to
readauthforuri().

test-hgweb-auth.py was passing because the test itself was flawed: it was
passing URIs with credentials to find_password(), which never happens.
2011-08-05 21:05:41 +02:00
Patrick Mezard
9aadd2540f http: strip credentials from urllib2 manager URIs (issue2885)
urllib2 password manager does not strip credentials from URIs registered with
add_password() and compare them with stripped URIs in find_password(). Remove
credentials from URIs returned by util.url.authinfo(). It sometimes works when
no port was specified as the URI host is registered too.
2011-08-05 21:05:40 +02:00
Idan Kamara
073a89cf8a dispatch: don't rewrap aliases that have the same definition
Previously aliases that overrode existing commands would wrap the old alias
on every call to dispatch() (twice actually), which is an obvious re-entrancy
issue for things like the command server or TortoiseHG.
2011-08-04 19:41:23 +03:00
Mads Kiilerich
965df356e5 url: really handle urls of the form file:///c:/foo/bar/ correctly
8264e5172141 made sure that paths that seemed to start with a windows drive
letter would not get an extra leading slash.

localpath should thus not try to handle this case by removing a leading slash,
and this special handling is thus removed.

(The localpath handling of this case was wrong anyway, because paths that look
like they start with a windows drive letter can't have a leading slash.)

A quick verification of this is to run 'hg id file:///c:/foo/bar/'.
2011-08-04 02:51:29 +02:00
Patrick Mezard
8028e79c02 hgweb: do not ignore [auth] if url has a username (issue2822)
The [auth] section was ignored when handling URLs like:

  http://user@example.com/foo

Instead, we look in [auth] for an entry matching the URL and supplied user
name. Entries without username can match URL with a username. Prefix length
ties are resolved in favor of entries matching the username. With:

  foo.prefix = http://example.org
  foo.username = user
  foo.password = password
  bar.prefix = http://example.org/bar

and the input URL:

  http://user@example.org/bar

the 'bar' entry will be selected because of prefix length, therefore prompting
for a password. This behaviour ensure that entries selection is consistent when
looking for credentials or for certificates, and that certificates can be
picked even if their entries do no define usernames while the URL does.
Additionally, entries without a username matched against a username are
returned as if they did have requested username set to avoid prompting again
for a username if the password is not set.

v2: reparse the URL in readauthforuri() to handle HTTP and HTTPS similarly.
v3: allow unset usernames to match URL usernames to pick certificates. Resolve
prefix length ties in favor of entries with usernames.
2011-08-01 23:58:50 +02:00
Matt Mackall
9dd4882287 hgweb: raw file mimetype guessing configurable, off by default (BC) (issue2923)
Before: hgweb made it possible to download file content with a content type
detected from the file extension. It would serve .html files as text/html and
could thus cause XSS vulnerabilities if the web site had any kind of session
authorization and the repository content wasn't fully trusted.

Now: all files default to "application/binary", which all important
browsers will refuse to treat as text/html. See the table here:

https://code.google.com/p/browsersec/wiki/Part2#Survey_of_content_sniffing_behaviors
2011-07-31 01:46:52 +02:00
wujek
05cf460c3e hgweb: handle 'baseurl' configurations with leading slash (issue2934) 2011-08-01 09:48:10 +02:00
Idan Kamara
bc85c198e4 ui: call write() so the prompt string goes through subclassed implementation 2011-08-01 19:53:00 +03:00