Commit Graph

13536 Commits

Author SHA1 Message Date
David Soria Parra
90a5744f74 bookmarks: forbid \0 \r \n : in bookmark names (BC)
We restrict : to 1. make it easer to convert bookmarks to git branches,
2. use : later for a syntax to push a local bookmark to a remote bookmark
of a different name. \0, \n, \r are fobbidden they are used to separate
bookmarks in the bookmark file.

This change breaks backward compatbility as ':' was an allowed character in
previous versions.
2011-02-16 18:36:45 +01:00
Mads Kiilerich
1edc9de542 url: merge BetterHTTPS with httpsconnection to get some proxy https validation 2011-02-16 04:36:36 +01:00
Mads Kiilerich
88522bde9b tests: test https through http proxy
These tests fails for me with Python 2.6(.nothing)
2011-02-16 04:28:11 +01:00
Mads Kiilerich
c7b145f8d2 url: always create BetterHTTPS connections the same way 2011-02-16 04:28:17 +01:00
Mads Kiilerich
ed367d71cf url: refactor BetterHTTPS.connect 2011-02-16 04:28:17 +01:00
Mads Kiilerich
6c8a377242 url: refactor _gen_sendfile 2011-02-16 04:28:17 +01:00
Mads Kiilerich
caabaf5584 url: remove test for self.ui in BetterHTTPS
We use self.ui unconditionally anyway so we would have noticed if it in some
cases wasn't set.
2011-02-16 04:28:17 +01:00
Mads Kiilerich
f0c431567a tests: update ssl requirement for test-https.t
hgweb requires OpenSSL for serving https.
2011-02-16 03:28:22 +01:00
Jonathan Nieder
be4a063fb7 backout: clarify which changesets are new in help text
Plus another wording tweak ("default behavior -> "behavior without
--merge").

Suggested by Kevin Bullock.
2011-02-11 21:17:27 -06:00
Martin Geisler
6d0223473c commands: update year to 2011 in version string 2011-02-25 11:39:19 +01:00
Martin Geisler
3bd524372d eol: clarify where the .hgeol file is located 2011-02-25 10:52:37 +01:00
Martin Geisler
276fc6ed07 commands: mark strings for translation 2011-02-24 15:35:22 +01:00
David Soria Parra
6b3204aa84 tests: remove bookmark extension configuration 2011-02-24 03:13:48 +01:00
Matt Mackall
7bcb1a26b9 context: generate file ancestors in reverse revision order (issue2642)
The related() function in copies assumes that revisions are generated
in reverse revision order, so it was getting confused in some situations.
2011-02-23 17:27:05 -06:00
Waqas Hussain
9981e2f9a8 export: only close files which export itself has opened 2011-02-23 13:21:55 +05:00
Eric Eisner
52f3c93dfa subrepo: only attempt pulling from git's origin
git fetch does not accept repository URLs as arguments, and the intended
logic of this code was not actually doing anything.
2011-02-23 10:59:36 -05:00
Eric Eisner
fc76e4918d subrepo: disallow all unknown git ref types 2011-02-23 10:17:44 -05:00
Adrian Buehlmann
b9288e15e7 sshrepo: catch passwords in ssh urls
see also d0162aaab5fc
2011-02-23 11:42:41 +01:00
Gilles Moris
dcdc58f0a5 rollback: clarifies the message about the reverted state (issue2628)
Previously, when rolling back a transaction, some users could be confused
between the level to which the store is rolled back, and the new parents
of the working directory.

  $ hg rollback
  rolling back to revision 4 (undo commit)

With this change:
  $ hg rollback
  repository tip rolled back to tip revision 4 (undo commit)
  working directory now based on revision 2 and 1

So now the user can realize that the store has been rolled back to an older
tip, but also that the working directory may not on the tip (here we are
rolling back the merge of the heads 2 and 1)
2011-02-10 09:03:06 +01:00
Mads Kiilerich
53a7e81f78 hgweb: handle invalid requests with both form data and querystring
Invalid requests could give an unhandled ErrorResponse.

Now this ErrorResponse is handled like other ErrorResponses so the client gets
an error message which also is logged on the server.
2011-02-21 00:57:19 +01:00
Mads Kiilerich
4a3ec69835 hgweb: give ErrorResponse a descriptive string/Exception representation
Very handy if the exception should appear in output.
2011-02-21 00:52:26 +01:00
Mads Kiilerich
c77a84761e serve: catch and log all Exceptions, not only StandardException
Other exceptions than StandardExceptions were left to the default error handler
which was muted when running in daemon mode.

Now all Exceptions are handled and logged to the log file.
2011-02-21 00:52:23 +01:00
Martin Geisler
722ee510d8 test-i18n: make test conditional on msgfmt availability 2011-02-20 13:35:30 +01:00
Steve Borho
909958e650 match: fix subtle error in _buildmatch
The trailing comma was causing a ValueError.  See
https://bitbucket.org/tortoisehg/thg/issue/132
2011-02-18 10:28:20 -06:00
Mads Kiilerich
b6559c7bf6 statichttprepo: don't modify localrepo class variables
This happened to crash in subrepo setups when the base class variable was
modified twice.

Now we don't modify the class variable but an instance copy.
2011-02-18 23:41:13 +01:00
Mads Kiilerich
e4660104cf util: flush stdout before calling external processes
stdout could have content in its buffer while a subprocess ran and emitted
output.

Flushing stdout ensures that output now comes in the right order.
2011-02-18 03:35:01 +01:00
Mads Kiilerich
733fae3e0f tests: update test-https.t output
I must have lost the insecure cert warning in a last minute patch series
cleanup of 117f170f7437.
2011-02-18 03:34:47 +01:00
Oleg Stepanov
ee35622d91 Do not allow merging with uncommitted changes in a subrepo 2011-02-16 08:56:11 -08:00
Wagner Bruna
44bdaed8cd hgwebdir: reduce memory usage for index generation
The archive list generator was holding a reference to each
temporary ui copy passed by rawentries(), so the memory
usage for index generation growed proportionally to the
ui object size and the amount of repositories. By returning a
list instead, the temporary reference is dropped immediately.
2011-02-17 18:05:27 -02:00
Wagner Bruna
da9841899b pure: fix index parsing on empty repositories 2011-02-17 13:37:52 -02:00
Steve Losh
41f29dd66c alias: add test cases for $ escaping in shell aliases 2011-02-17 17:15:32 -05:00
Augie Fackler
20e4786913 bookmarks: verify switching bookmarks works properly 2011-02-16 17:36:31 -06:00
Martin Geisler
d9e6fe01b4 subrepo: break long line found by check-code 2011-02-17 09:20:44 +01:00
Martin Geisler
904da501f5 test-convert: update output to match 397e5b8e1597 2011-02-17 09:19:15 +01:00
Erik Zielke
1d125c0477 subrepos: prompt on conflicts on update with dirty subrepos
Consider a repository with a single subrepository. The changesets in
the main repository reference the subrepository changesets like this:

  m0 -> s0
  m1 -> s1
  m2 -> s2

Starting from a state (m1, s0), doing 'hg update m2' in the main
repository will yield a conflict: the subrepo is at revision s0 but
the target revision says it should be at revision s2.

Before this change, Mercurial would do (m1, s0) -> (m2, s2) and thus
ignore the conflict between the working copy and the target revision.

With this change, the user is prompted to resolve the conflict by
choosing which revision he wants. This is consistent with 'hg merge',
which also prompts the user when it detects conflicts in the merged
.hgsubstate files.

The prompt looks like this:

  $ hg update tip
   subrepository sources for my-subrepo differ
  use (l)ocal source (fc627a69481f) or (r)emote source (12a213df6fa9)?
2011-02-09 10:53:09 +01:00
David Soria Parra
12aa64e430 bookmarks: make track.current=True default behaviour and remove option (BC) 2011-02-16 01:29:26 +01:00
David Soria Parra
e0c062923b update: preserve possible bookmark name to set current bookmark correctly 2011-02-16 01:28:42 +01:00
Martin Geisler
0af898a976 test-i18n: test translations 2011-02-16 10:02:24 +01:00
Erik Zielke
2017770368 subrepo: remove argument introduced by mistake in e3640daa4703 2011-02-09 13:37:21 +01:00
Martin Geisler
4009f00b54 remove unnecessary list comprehensions
These result lists were only built for the side effects, and so a
normal loop is just as good and more straight-forward.
2011-02-03 10:31:17 +01:00
Patrick Mezard
1e4894d773 commit: abort if a subrepo is modified and ui.commitsubrepos=no
The default behaviour is to commit subrepositories with uncommitted changes. In
my experience this is usually undesirable:

- Changes to dependencies are often debugging leftovers
- Real changes should generally be applied on the source project directly,
  tested then committed. This is not always possible, subversion subrepos may
  include only a small part of the source project, without the tests.

Setting ui.commitsubrepos=no will now abort commits containing such modified
subrepositories like:

  $ hg --config ui.commitsubrepos=no ci -m msg
  abort: uncommitted changes in subrepo sub

I ruled out the hook solution because it does not easily take --include/exclude
options in account. Also, my main concern is whether this flag could cause
problems with extensions. If there are legitimate reasons for callers to
override this behaviour (I could not find any), they might either override at ui
level, or we could add an argument to localrepo.commit() later.

v2:
- Renamed ui.commitsubs to ui.commitsubrepos
- Mention the configuration entry in hg help subrepos
2011-02-15 22:25:48 +01:00
Matt Mackall
f435f40e4e tests: fixes for svn 1.4.2 2011-02-15 16:19:11 -06:00
André Sintzoff
d724f20ddb mq: remove undo after a qimport 2011-02-15 20:02:52 +01:00
Adrian Buehlmann
76e8469c0d transaction: use posixfile and unlink from util
instead of open() and os.unlink()

Avoids potential issues with file access on Windows (e.g. AV-scanners).
2011-02-15 14:41:49 +01:00
Kevin Bullock
f9d396be75 bookmarks: update help text since moving into core
Clarifies the help text for the bookmarks command regarding the
requirements for pushing or pulling bookmarks.
2011-02-14 23:59:21 -06:00
jfh
48eb3f266f debugignore: catch the case when ignore.includepat doesn't exist
In testing of my recent addition of a debugignore command, some of my MacHg
users uncovered the exceptional case that if there is no ignore patterns of any
kind then a traceback occurred. Catch and fix this case.
2011-02-15 23:23:16 +13:00
Mads Kiilerich
3e84017cf0 tests: use printenv.py where it is - don't copy it around 2011-02-15 02:17:43 +01:00
Mads Kiilerich
43329863bd tests: let printenv.py show the real values
Test paths are now hidden by the test framework, so HG_URL no longer needs
mangling.
2011-02-15 01:05:32 +01:00
Mads Kiilerich
75f680564e hgweb: make paths wildcards expanding in a repo root match repo correctly
There was a trailing '/' too much when the wildcard part expanded to nothing.
The consequence was that the repo was announced but didn't work.
2011-02-15 01:04:10 +01:00
Mads Kiilerich
6e8efc0e0c hgweb: doctest of url creation from wildcard expansion 2011-02-15 01:04:10 +01:00