Commit Graph

13651 Commits

Author SHA1 Message Date
Peter Arrenbrecht
54d1d4736b wireproto: fix decodelist to properly return empty list
Needed by tests for next patch introducing known().
2011-03-22 07:40:02 +01:00
Peter Arrenbrecht
5925b26799 wireproto: fix handling of '*' args for HTTP and SSH 2011-03-22 07:38:32 +01:00
Peter Arrenbrecht
375ab88b9f debug: add debugwireargs to test argument passing over the wire
Tests argument passing locally, via HTTP, and via SSH. This is mainly preparation
for the next patch.
2011-03-22 07:38:32 +01:00
Peter Arrenbrecht
27bf9fafce sshserver: drop unnecessary line 2011-03-22 07:37:56 +01:00
Matt Mackall
8a1d106a60 changegroup: minor cleanups 2011-03-20 20:25:41 -05:00
Matt Mackall
00a0332ced repair: revlog has an iterator 2011-03-20 20:21:19 -05:00
Matt Mackall
5468a6deab changegroup: fix leftover from delta read 2011-03-20 20:17:57 -05:00
Matt Mackall
6c9dcf752e changegroup: drop expensive redundant usage of readdelta for progress 2011-03-20 20:16:51 -05:00
Matt Mackall
d4b4c17c11 changegroupsubset: use manifest.readfast to simplify collector 2011-03-20 19:43:28 -05:00
Matt Mackall
5be0491c06 manifest: add readfast method 2011-03-20 19:43:28 -05:00
Matt Mackall
3e746ce14e changegroupsubset: simplify filenode_collector 2011-03-20 19:43:28 -05:00
Matt Mackall
91e167ab79 changegroupsubset: more renaming 2011-03-20 19:43:28 -05:00
Matt Mackall
bd3182c8ff changegroupsubset: simplify prune
Ancestors of nodes linked to commonrevs can be expected to be linked
to commonrevs. Walking graphs of each revlog looking for rare/nonexistent outliers is overkill.
2011-03-20 19:43:28 -05:00
Matt Mackall
f97f8563d2 changegroupsubset: more minor cleanups
- remove more excessive comments
 - simplify some sorting operations
 - rename some variables
 - replace identity with a lambda
2011-03-20 19:43:28 -05:00
Matt Mackall
4e33ba22d8 changegroupsubset: minor cleanups
- move some variable declarations
 - drop some excessive comments
 - use standard variable naming
2011-03-20 19:43:28 -05:00
Matt Mackall
920f4c5db4 strip: simplify collectone 2011-03-20 19:43:28 -05:00
Greg Ward
4bcecd8160 dirstate: avoid a race with multiple commits in the same process
(issue2264, issue2516)

The race happens when two commits in a row change the same file
without changing its size, *if* those two commits happen in the same
second in the same process while holding the same repo lock.  For
example:

  commit 1:
    M a
    M b
  commit 2:           # same process, same second, same repo lock
    M b               # modify b without changing its size
    M c

This first manifested in transplant, which is the most common way to
do multiple commits in the same process. But it can manifest in any
script or extension that does multiple commits under the same repo
lock. (Thus, the test script tests both transplant and a custom script.)

The problem was that dirstate.status() failed to notice the change to
b when localrepo is about to do the second commit, meaning that change
gets left in the working directory. In the context of transplant, that
means either a crash ("RuntimeError: nothing committed after
transplant") or a silently inaccurate transplant, depending on whether
any other files were modified by the second transplanted changeset.

The fix is to make status() work a little harder when we have
previously marked files as clean (state 'normal') in the same process.
Specifically, dirstate.normal() adds files to self._lastnormal, and
other state-changing methods remove them. Then dirstate.status() puts
any files in self._lastnormal into state 'lookup', which will make
localrepository.status() read file contents to see if it has really
changed.  So we pay a small performance penalty for the second (and
subsequent) commits in the same process, without affecting the common
case.  Anything that does lots of status updates and checks in the
same process could suffer a performance hit.

Incidentally, there is a simpler fix: call dirstate.normallookup() on
every file updated by commit() at the end of the commit.  The trouble
with that solution is that it imposes a performance penalty on the
common case: it means the next status-dependent hg command after every
"hg commit" will be a little bit slower.  The patch here is more
complex, but only affects performance for the uncommon case.
2011-03-20 17:41:09 -04:00
Benoit Boissinot
5d27fc0ccb changegroupsubset: extranodes are no longer needed 2011-03-20 01:16:57 +01:00
Benoit Boissinot
66804f4889 strip: remove usage of extranodes
Instead of computing the exact set of missing revlog revisions, we only
compute the set of missing/broken changesets. The resulting bundle can be
slightly bigger but we will be able to get rid of the ugly extranodes handling
in changegroupsubset.
2011-03-20 00:50:22 +01:00
Patrick Mezard
1597f620c9 patch: move closefile() into patchfile.close() 2011-03-20 00:22:47 +01:00
Patrick Mezard
189b71bbde patch: inline patchfile.hashlines() 2011-03-20 00:09:44 +01:00
Patrick Mezard
6a59fcba00 patch: fix hunk newlines when parsing hunks, not in iterhunks() 2011-03-20 00:08:44 +01:00
Patrick Mezard
bd8804161f i18n: register new template keywords for translation 2011-03-19 19:50:55 +01:00
Matt Mackall
ca9fdc1884 annotate: catch nonexistent files using match.bad callback (issue1590) 2011-03-19 01:34:49 -05:00
Steve Borho
4b3a38e051 merge with stable 2011-03-18 13:01:18 -05:00
Steve Borho
ebbe78951f wix: add new file templates/paper/bookmarks.tmpl
This file was snuck onto the stable branch with 77ea38e46cc8
2011-03-18 11:36:36 -05:00
Matt Mackall
9bb3fa8c69 merge with stable 2011-03-17 17:08:13 -05:00
Miloš Hadžić
b3d3d7aa76 push/outgoing: print remote target path even if there's an error (issue2561)
This is a simple patch to make hg push/hg outgoing print their remote target
path even if the operation fails. I'm not sure if the original behavior was by
design.

This patch also changes one test to reflect the changed behaviour.
2011-03-17 22:55:02 +01:00
Patrick Mezard
ce258b1ae4 convert: add svnrev, svnpath and svnuuid template keywords
$ hg -R A-hg log --template '{rev} {svnuuid}{svnpath}@{svnrev}\n'
  10 644ede6c-2b81-4367-9dc8-d786514f2cde/trunk@10
2011-03-17 22:17:27 +01:00
Patrick Mezard
542a74b67c convert/svn: extract revsplit() in a function 2011-03-17 22:17:27 +01:00
Patrick Mezard
ef8d429854 transplant: add "transplanted" keyword
$ hg log --template '{rev} {transplanted}\n'
  7 a53251cdf717679d1907b289f991534be05c997a
2011-03-17 22:17:27 +01:00
Eric Eisner
3cc72a297f subrepo: recognize scp-style paths as git URLs 2011-03-17 16:29:09 -04:00
Matt Mackall
37bd74cb45 merge with i18n 2011-03-17 12:00:49 -05:00
Markus F.X.J. Oberhumer
489871ea69 revset: fix a number of highly dubious continue statements
This patch definitely needs a review and would also benefit from
some new testsuite entries.
2011-03-16 23:54:55 +01:00
Markus F.X.J. Oberhumer
17565c031b graphlog: do not swallow all TypeError exceptions (fix fe7058294ec5) 2011-03-16 23:54:55 +01:00
Markus F.X.J. Oberhumer
c2ca636151 archive: use hardcoded constants when creating .zip archives
Do not rely on local stat constants, which may differ.
2011-03-16 23:54:55 +01:00
Martin Geisler
9567e5a379 i18n: merge with stable 2011-03-16 17:43:43 +01:00
Martin Geisler
c18e2c0bc2 i18n-da: synchronize with 3bcc6424bb23 2011-03-16 17:42:42 +01:00
Martin Geisler
a0a2144b94 i18n: don't mark trivial string for translation 2011-03-16 17:38:25 +01:00
Martin Geisler
6f502a2558 i18n: merge with mpm 2011-03-16 17:34:13 +01:00
Martin Geisler
87e06b967c relink: mark abort message for translation 2011-03-16 15:34:45 +01:00
Martin Geisler
ba5898d620 relink: avoid trying to lock the same repo twice 2011-03-16 15:34:10 +01:00
timeless
81c1d7fc8b hgweb: support multiple directories for the same path
[paths]
/dir = /path/1/*, /path/2/*
2011-03-16 03:06:57 +01:00
timeless
56241a1f0c templates: provide granularity for future values for age filter 2011-03-16 03:28:56 +01:00
Bernhard Leiner
baf797018e revset: report a parse error if a revset is not parsed completely (issue2654) 2011-03-16 23:09:14 +01:00
Adrian Buehlmann
c639e13569 config: use util.posixfile 2011-03-16 18:48:59 +01:00
David Soria Parra
8cd17f87d7 i18n-de: correct translation for some fuzzy strings 2011-03-15 10:39:19 +01:00
David Soria Parra
31bf9ec82f i18n-de: synchronize with 3fc1a48c5069 2011-03-15 10:20:55 +01:00
David Soria Parra
10510a0de1 bundle: update current bookmark to most recent revision on current branch
We check if the current bookmark is set to the first parent of the
dirstate. Is this the case we move the bookmark to most recent revision
on the current branch (where hg update will update you to).
2011-03-14 23:03:56 +01:00
Patrick Mezard
ec6a1a3ed2 convert/svn: fix _iterfiles() output in root dir case (issue2647)
When converting directory additions/replacement with project directory set to
root, _iterfiles() sometimes returned paths starting with a slash making
following svn calls to fail.

I could not reproduce the issue with hand-crafted repositories.

Report and first analysis by Clinton Chau <clinton@clearcanvas.ca>
2011-03-14 21:35:31 +01:00