Commit Graph

16693 Commits

Author SHA1 Message Date
Bryan O'Sullivan
01cb9841ca bisect: track the current changeset (issue3382)
Introduce a new revset feature, bisect(current), that identifies
the changeset currently being bisected.
2012-05-08 15:29:09 -07:00
Bryan O'Sullivan
6f88d16cf2 parsers: use the correct maximum radix tree depth
Previously, we would not use more than half of a SHA-1 hash when
constructing and searching the tree.
2012-05-08 14:46:04 -07:00
Patrick Mezard
1ecfe35e64 revset: make matching() preserve input revision order 2012-05-09 18:45:14 +02:00
Jesse Glick
33aa2b5c45 revset: documentation typo "metatadata" 2012-05-10 14:17:05 -04:00
Na'Tosha Bard
7899056542 largefiles: fix deletion of multiple missing largefiles (issue3329) 2012-05-11 15:32:22 +02:00
Levi Bard
56db29ce72 addremove: document default similarity behavior (issue3429) 2012-05-11 15:15:50 +02:00
Na'Tosha Bard
d4432c172d largefiles: follow normal codepath for addremove if non-largefiles repo (issue3249) 2012-05-11 14:42:26 +02:00
Patrick Mezard
22eeeffed3 mq: add --no-backup for qpush/qpop/qgoto 2012-05-11 16:57:26 +02:00
Patrick Mezard
d775dd04bb mq: backup local changes in qpush --force
qpush help says the following about --force:
1- When -f/--force is applied, all local changes in patched files will
   be lost.
2- Apply on top of local changes

In practice, qpush --force will attempt to apply the patch on top of
local changes, and on success will merge them in the pushed patch. On
failure, patched files will contain a mix of local changes (where the
patch could not apply) and a mix of patch changes (were it applied). So,
local changes are less lost than entangled with a mass of other changes.

This patch makes qpush --force backup all locally modified files touched
by the next patch being applied. When multiple patches are being pushed,
this logic is repeated for each patch. Note that modified but
successfully patched files are preserved as well.
2012-05-11 16:18:47 +02:00
Patrick Mezard
b045ed706e mq: backup local changes in qpop --force (issue3433) 2012-05-11 16:17:02 +02:00
David Soria Parra
d6e40e51fb pager: remove quiet flag
With the pager running as a child process, exiting the pager doesn't
result in a broken pipe message. To distinguish the exit broken pipe code
from a mercurial abort we register the default action for SIGPIPE. This
results in a 141 exit code instead of a 255. On windows SIGPIPE doesn't
exists and a ValueError will be thrown.
2012-05-11 16:08:49 +02:00
Brodie Rao
6fdaf7d897 pager: preserve Hg's exit code (and fix Windows support) (issue3225)
This changes how the pager extension invokes the pager. Prior to this change,
the extension would fork Hg and exec the pager in the parent process. This
loses Hg exit code, and it doesn't work on Windows.

Now the pager is invoked using the subprocess library, and an atexit handler is
registered that makes Hg wait for the pager to exit before it exits itself.

Note that if you exit the pager before Hg is done running, you'll get an exit
code of 255, which is caused by Python blowing up due to a broken pipe. If you
set pager.quiet=True, you'll get the OS-level return code of 141.
2012-05-11 15:45:37 +02:00
Idan Kamara
c69934e20c amend: preserve extra dict (issue3430) 2012-05-11 18:33:45 +03: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
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
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
Jesse Glick
a1ec63bdbc localrepo: optimize internode status calls using withflags
Introduce manifestdict.withflags() to get a set of all files which have any
flags set, since these are likely to be a minority. Otherwise checking .flags()
for every file is a lot of dictionary lookups and is quite slow.
2012-05-04 15:56:45 -04:00
Jesse Glick
17675847fa localrepo: optimize internode status calls using match.always
Introduce match.always() to check if a match object always says yes, i.e.
None was passed in. If so, mfmatches should not bother iterating every file in
the repository.
2012-05-04 15:54:55 -04:00
Na'Tosha Bard
0f2fb0db6a largefiles: add --all-largefiles flag to clone (issue3188) 2012-05-11 23:11:43 +02:00
Augie Fackler
68b99d0585 httpclient: update to revision 892730fe7f46 of httpplus 2012-05-04 16:00:33 -05:00
Matt Mackall
48471fd098 merge with stable 2012-05-12 00:06:11 +02:00
Adrian Buehlmann
f5ca6da4d6 parser: use PyInt_FromSsize_t in index_stats
Eliminates

  mercurial/parsers.c(515) : warning C4244: 'function' : conversion from
  'Py_ssize_t' to 'long', possible loss of data
  mercurial/parsers.c(520) : warning C4244: 'function' : conversion from
  'Py_ssize_t' to 'long', possible loss of data
  mercurial/parsers.c(521) : warning C4244: 'function' : conversion from
  'Py_ssize_t' to 'long', possible loss of data

when compiling for Windows x64 target using the Microsoft compiler.

PyInt_FromSsize_t does not exist for Python 2.4 and earlier, so we define a
fallback in util.h to use PyInt_FromLong when compiling for Python 2.4.
2012-05-09 09:58:50 +02:00
redstone
7ea2f3b663 localrepo: cleanup var names and comments
Cosmetic cleanups.  Fix comment typo referring to the notion of multiple tips.
Make variable describing a generator end in 'gen'.
Fix another var containing a node not to end with 'rev'.
2012-05-11 10:53:12 -07:00
Levi Bard
23f20d7bd7 transplant: manually transplant pullable changesets with --log 2012-05-11 17:26:58 +02:00
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
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
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
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
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