Commit Graph

16514 Commits

Author SHA1 Message Date
Patrick Mezard
352ebc2cec phases: stop modifying localrepo in writeroots()
Also pass the phaseroots being written for clarity. repo._dirtyphases
was already reset to False at call site.
2012-05-10 18:52:07 +02:00
Patrick Mezard
f8945add9d phases: stop modifying localrepo in readroots()
phasedefaults is also passed explicitely to help the casual reader
understand where it is used without grepping all the sources.
2012-05-10 18:52:04 +02:00
Patrick Mezard
e918020a6f phases: call filterunknown() in readroots()
One less function manipulating localrepo state.
2012-05-10 18:21:15 +02:00
Patrick Mezard
2940b01bad repair: no need to call filterunknown() in strip()
Calling strip() will eventually trigger localrepo.destroyed() which will
invalidate _parseroots. It will call filterunknown() upon reload.

Changes to test-keyword.t are related to commit --debug running after
either qpop or rollback.
2012-05-10 18:21:15 +02:00
Patrick Mezard
df9b03eafa test-phases: test changing null revision phase
The behaviour is correct but for bad reasons: the repo.set() call in
phase command fails for '-1'. It should be rejected explicitely by phase
boundary commands, sadly this is hard to do because phase changes are
not applied atomically.
2012-05-10 18:21:15 +02:00
Matt Mackall
6d78ec67ed merge with stable 2012-05-11 14:48:24 +02:00
Bryan O'Sullivan
449c0e1dbf tests: fix test-parseindex2.py when run with --pure 2012-05-11 02:32:26 -07:00
Bryan O'Sullivan
ab8ba40835 changelog: ensure that nodecache is valid (issue3428)
This ensures that an out-of-process hook can see an incoming changegroup.
2012-05-11 01:55:33 -07:00
Bryan O'Sullivan
9daeaf8600 parsers: change the type of nt_level
We should generally prefer Py_ssize_t whenever we are talking about
lengths.
2012-05-08 14:48:50 -07:00
Bryan O'Sullivan
2d6b967125 parsers: change the type signature of hexdigit
An upcoming change will make use of this.
2012-05-08 14:48:48 -07:00
Bryan O'Sullivan
98bb617e51 parsers: allow nt_find to signal an ambiguous match 2012-05-08 14:48:44 -07:00
Bryan O'Sullivan
2b933f4aaf parsers: factor out radix tree initialization 2012-05-08 14:48:39 -07:00
Bryan O'Sullivan
7434efb91b parsers: update ntrev when we stop scanning
This prevents us from inserting some nodes twice, wasting work.
2012-05-08 14:46:06 -07:00
Matt Mackall
153e35df5d tests: set a standard terminal type
This makes test-ui-color.py happy when run in a dumb terminal.

Spotted by Jesse Glick <jesse.glick@oracle.com>
2012-05-08 15:46:51 -05:00
Nikolaj Sjujskij
4640646cf7 build: fix hgrc manpage building with docutils 0.9
Since docutils 0.9, `roman` module has been moved from module directory root
(i.e. `site-packages/roman.py`) to `docutils.utils` module. Therefore `import
roman` statement should be wrapped in `try: ... except ImportError: ...` block
to handle importing correctly.
2012-05-08 23:59:39 +04:00
Travis Herrick
c8cb411c3a branches: quiet option observes other parameters 2012-05-06 17:12:22 -07:00
Idan Kamara
6360e96576 context: fix call to util.safehasattr 2012-05-09 02:46:58 +03:00
Matt Mackall
d7cd292c1a merge with stable 2012-05-08 12:05:45 -05:00
Patrick Mezard
742f6b3850 pure/base85: align exception type/msg on base85.c
brendan mentioned on IRC that b64decode raises a TypeError too, but while the
previous exception type may be better in general, it is much easier to make it
behave like the related C code and changes nothing for mercurial itself.
2012-05-07 21:49:45 +02:00
Matt Mackall
d8dfd80d76 parsers: fix refcount bug on corrupt index
When we encounter a corrupt index, we "fail" the init but our
destructor still gets called. On some systems, this was causing us to
attempt to decref a dangling to self->data.
2012-05-07 15:40:50 -05:00
Matt Mackall
4d062ed81e context: add copies method with caching 2012-05-06 14:37:51 -05:00
Matt Mackall
e38c9f282e filectx: handle some other simple cases for finding merge ancestor 2012-05-06 14:20:53 -05:00
Matt Mackall
a7305a2b09 graft: remark on empty graft 2012-05-06 14:15:17 -05:00
Patrick Mezard
9c5568246f alias: inherit command optionalrepo flag (issue3298)
Commands working without a repository, like "init", are listed in
commands.norepo. Commands optionally using a repository, like "showconfig", are
listed in commands.optionalrepo. Command aliases were inheriting the former but
not the latter.
2012-05-05 12:21:22 +02:00
Mads Kiilerich
64a9bbd95b tests: improve test of hg-ssh and make the test pass on windows 2012-05-07 00:52:11 +02:00
Mads Kiilerich
99a4f5f5b9 hg-ssh: exit with 255 instead of -1 on error
Unix sh would cast -1 to 255 anyway, but on windows -1 become 0. Better be
explicit with the 255 everywhere.
2012-05-07 00:52:08 +02:00
Mads Kiilerich
91529dce53 hg-ssh: use %s for printing paths in error messages
This avoids \\ if this ever is run on windows - for example in the test suite.
2012-05-07 00:49:01 +02:00
Mads Kiilerich
1014b093a1 tests: accept \ in test-casefolding on windows 2012-05-07 00:48:51 +02:00
Adrian Buehlmann
4482ec8070 parsers: statically initializing tp_new to PyType_GenericNew is not portable
As detailed on http://docs.python.org/extending/newtypes.html (quote):

  "In this case, we can just use the default implementation provided by the API
  function PyType_GenericNew(). We’d like to just assign this to the
  tp_new slot, but we can’t, for portability sake. On some platforms or
  compilers, we can’t statically initialize a structure member with a function
  defined in another C module, so, instead, we’ll assign the tp_new slot in the
  module initialization function just before calling PyType_Ready()."

Fixes "gcc (GCC) 3.4.5 (mingw-vista special r3)" complaining with:

  mercurial/parsers.c:1096: error: initializer element is not constant
  mercurial/parsers.c:1096: error: (near initialization for `indexType.tp_new')
2012-05-08 11:20:07 +02:00
Matt Mackall
da4217097f filectx: make ancestor require actx
When grafting or rebasing, we need to know the target ancestor.
2012-05-04 17:27:14 -05:00
Martin Geisler
db0acd4d7e merge with stable 2012-05-07 13:40:58 +02:00
Martin Geisler
24e4bf05a3 check-code: catch unnecessary s.strip().split() calls 2012-05-07 10:02:50 +02:00
Yuya Nishihara
8284425c7d commands: parse ui.strict config item as bool 2012-05-06 23:58:04 +09:00
Patrick Mezard
9b4af94333 largefiles: fix "hg status dir" missing regular files (issue3421)
largefiles status implementation attemps to rewrite the input match objects to
match the "standins" as well as the regular files. When fixing the directories
listed in match.files(), if there was related standin entry, it was kept and
the original path discarded. But directories can appear both as regular and
standin entries.
2012-05-06 13:14:58 +02:00
Adrian Buehlmann
ac14489dc7 help/config: remove outdated false claim about pywin32
Since version 1.8 (released on 2011-03-01), Mercurial doesn't use pywin32 any
more. The old fallback mechanism to use C:\Mercurial\Mercurial.ini if pywin32 is
not installed was removed in 1fa0a833f143.
2012-05-06 10:36:32 +02:00
Steven Stallion
d5d80849ef factotum: add man reference to help output 2012-05-04 09:14:55 -07:00
Martin Geisler
84d98e014b tags: line.rstrip().split() can be replaced with line.split()
The line looks like "123 <node> <node>" and does not start with
whitespace: it was therefore not significant that rstrip was used
instead of strip. Furthermore, the first part is fed to int, which
will itself strip away whitespace before converting the string to an
integer.
2012-05-04 15:29:07 +02:00
Martin Geisler
f8393191de phases: line.strip().split() == line.split() 2012-05-04 15:24:00 +02:00
Martin Geisler
4640718d42 merge with stable 2012-05-06 14:36:42 +02:00
Martin Geisler
6954ff2d10 merge with stable 2012-05-04 19:19:28 +02:00
Kevin Bullock
cce50f4d35 revert: don't re-create changeset context 2012-05-04 09:20:28 -05:00
Martin Geisler
24d40d77b2 test-largefiles: better formatting of comments 2012-05-04 14:40:11 +02:00
Martin Geisler
ffc78c7061 test-largefiles: sort output to ensure test stability 2012-05-04 14:39:37 +02:00
Patrick Mezard
f49c9eec1a subrepo: do not traceback on .hgsubstate parsing errors
Note that aborting in subrepo.state() prevents "repairing" commands like revert
to be issued. The user will have to edit the .hgsubstate manually (but he
probably had already otherwise this would not be failing). The same behaviour
already happens with invalid .hgsub entries.
2012-05-04 14:19:55 +02:00
Patrick Mezard
a124dced40 subrepo: ignore blank lines in .hgsubstate (issue3424)
Reported by Sebastian Krysmanski <infomail@lordb.de>
2012-05-04 14:19:52 +02:00
hlian
992a6313f9 largefiles: in putlfile, ensure tempfile's directory exists prior to creation
Let R be a repo served by an hg daemon on a machine with an empty largefiles
cache. Pushing a largefiles repo to R will result in a no-such-file-or-directory
OSError because putlfile will attempt to create a temporary file in
R/.hg/largefiles, which does not yet exist.

This patch also adds a regression test for this scenario.
2012-05-04 14:36:40 -04:00
Martin Geisler
82b328e84d merge with stable 2012-05-04 12:21:56 +02:00
Martin Geisler
da730824fe paper, monoblue: link correctly to lines in annotate view
The links were to "foo#123" instead of "foo#l123". The gitweb and
spartan templates were already producing the correct links.
2012-05-04 12:04:07 +02:00
Matt Harbison
2a3bf0a137 largefiles: make archive -S store largefiles instead of standins
This is essentially a copy of largefile's override of archive() in the
archival class, adapted for overriding hgsubrepo's archive().  That
means decoding isn't taken into consideration, nor is .hg_archival.txt
generated (the same goes for regular subrepos).  Unlike subrepos, but
consistent with largefile's handling of the top repo, ui.progress() is
*not* called.  This should probably be refactored at some point, but
at least this generates the archives properly for now.  Previously,
the standins were ignored and the largefiles were archived only for
the top level repo.

Long term, it would probably be most desirable to figure out how to
tweak archival's archive() if necessary such that largefiles doesn't
need to override it completely just to special case the translating of
standins to the real files.  Largefiles will already return a context
with the true largefiles instead of the standins if lfilesrepo's
lfstatus is True- perhaps this can be leveraged?
2012-05-03 21:32:57 -04:00
Matt Mackall
a1bde95990 merge with stable 2012-05-03 16:12:52 -05:00