Commit Graph

554 Commits

Author SHA1 Message Date
Matt Mackall
a8a2c25a67 wire protocol: avoid infinite loop (issue1483) 2009-01-25 10:16:45 -06:00
Patrick Mezard
7930704b3e localrepo: fix bad manifest delta generation (issue1433)
The issue came from the 63f9ab8034d1 fix for issue586 working only for
manifest.add() fast path, where the incorrect removed file set was
ignored. This path was no longer taken after 5958346d119e refactoring.
2009-01-03 20:16:10 +01:00
Benoit Boissinot
e5063ce27a push: use the fast changegroup() path on push
The race doesn't happen on push (because the discovery is done
in the same hg process), so use the fast path instead.
2008-12-02 19:36:43 +01:00
Dirkjan Ochtman
35a7a2d857 bundlerepo doesn't really have a dirstate, throw AttributeError if requested 2008-11-27 16:07:17 +01:00
Benoit Boissinot
ea0e021c3d protocol: use changegroupsubset() if possible (issue1389)
Due to the fix to the pull race, to avoid sending unnecessary
changesets, use changegroupsubset if possible.
This will increase the load on the server.
2008-11-25 23:26:33 +01:00
Matt Mackall
d725fd83a0 lookup: fast-paths for int and 'tip' 2008-11-14 14:12:43 -06:00
Matt Mackall
b2807810c6 linkrev: take a revision number rather than a hash 2008-11-12 15:19:14 -06:00
Benoit Boissinot
566c5d9e55 findincoming: build the correct list from the start 2008-10-24 16:20:53 +02:00
Adrian Buehlmann
42f1fb6f03 add format.usefncache config option (default is true)
This enables for example "hg clone --config format.usefncache=0" which
creates a non-fncache repository, which then can be read by Mercurial
versions before 74698d160f52.
2008-10-24 10:31:51 +02:00
Benoit Boissinot
4f2e35bc33 fix pull racing with push/commit (issue1320)
changegroup() has a problem when nodes which does not descend from a node
in <bases> are added to remote after the discovery phase.
If that happens, changegroup() won't send the correct set of nodes, ie.
some nodes will be missing.
To correct it we have to find the set of nodes that both remote and self
have (called <common>), and send all the nodes not in <common>.

This fix has some overhead, in the worst case it will re-send a whole branch.

A proper fix to avoid this overhead might be to change the protocol so that
the <common> nodes are sent (instead of the <bases> of the missing nodes).
2008-10-21 17:00:35 +02:00
Adrian Buehlmann
f3f0f9ecd6 introduce fncache repository layout
* adds a new entry 'fncache' to '.hg/requires' for new repos
* writes new file '.hg/store/fncache'
* hash-encodes filenames with long paths (issue839)
* encodes Windows reserved filenames (issue793)
2008-10-19 19:12:07 +02:00
Mads Kiilerich
156ce431aa Make it possible to disable filtering for a pattern.
Rationale: Apparently there were no way to disable for example win32text extension locally.

RFC: Can it already be done another way?
2008-10-14 21:28:49 +02:00
Benoit Boissinot
8b4d17702e findincoming: do the binary search in branches in parallel 2008-10-22 21:43:35 +02:00
Benoit Boissinot
3ef88afae1 fix issue with strip() for revlog with non-monotonic linkrevs (issue1342)
extra nodes should always be included, do the call after the pruning
2008-10-18 20:25:45 +02:00
Matt Mackall
d06459495e rename: handle renaming to a target marked removed 2008-10-18 04:26:09 -05:00
Matt Mackall
d8fdfa3f85 diff: pass contexts to status
Allow status() to take contexts as well as nodes. This lets us avoid
unpacking manifests multiple times and intelligently unpack manifests
in revision order. Also, we can avoid unpacking manifests at all when
there are no changes in the working directory.
2008-10-12 15:21:08 -05:00
Patrick Mezard
ad3b5c4ec9 context: improve memctx documentation 2008-10-11 13:07:29 +02:00
Patrick Mezard
e8a232c5c8 Show added files as "added" in editor commit message (issue 1330) 2008-10-09 14:16:17 +02:00
Matt Mackall
11fc6ebc37 status: don't warn about missing files present in base revision (issue1323) 2008-10-08 16:22:10 -05:00
Patrick Mezard
ddd1cf2de8 Merge with crew-stable 2008-10-06 13:51:36 +02:00
Bernhard Leiner
f1a8298e61 Add missing catch of a TypeError 2008-10-03 23:13:03 +02:00
Benoit Boissinot
f4db28e2cc Backed out changeset 1aa58165fc81 (see issue916 for details) 2008-09-10 08:48:23 +02:00
Benoit Boissinot
416e5f2ef9 tag: without a checkout, base the tag changeset on tip instead of nullid
issue916
2008-09-08 14:04:10 +02:00
Peter Ruibal
30a2036f9e use Exception(args)-style raising consistently (py3k compatibility) 2008-09-08 13:07:00 +02:00
Martin Geisler
28fb695e9a i18n: mark strings for translation in Mercurial 2008-08-31 16:12:02 +02:00
Matt Mackall
e03f4e2f73 util: set_flags shouldn't know about repo flag formats 2008-08-10 21:55:06 -05:00
Matt Mackall
4d074f2f87 add a fix for issue 1175
If we copy a file followed by an update, it's possible for the parent
manifest to no longer contain the source file of the copy, which could cause
commit to fail. If this happens, we search backwares from the first
parent to find the most likely original revision.
2008-08-10 18:01:03 -05:00
Matt Mackall
879e08f657 commit: simplify file copy logic 2008-08-10 18:01:03 -05:00
Dirkjan Ochtman
3e077a5422 strip trailing whitespace, replace tabs by spaces 2008-08-21 11:35:17 +02:00
Patrick Mezard
c7f6f81b90 Ignore dummy copies in dirstate and localrepo.filecommit() 2008-06-15 13:01:03 +02:00
Patrick Mezard
53bdaf2c6b localrepo: forbid nullid copyrev 2008-04-14 22:31:33 +02:00
Benoit Boissinot
46509e2ba0 fix error spotted by pychecker 2008-03-30 20:21:46 +02:00
Martin Geisler
bf6b9a2dd1 Begin commit messages with two empty lines.
This makes editors like Emacs wrap the commit message correctly. With
no empty line between the commit message and the 'HG:' lines, the
'HG:' lines would be wrapped as if they belonged to the commit message
and so lose their significance to Mercurial.

This makes no difference to what is stored by the commit -- whitespace
was already stripped from the beginning and end of commit messages.
2008-03-29 23:05:45 +01:00
Matt Mackall
3a7193d270 streamclone: fold in localrepo.storefiles 2008-08-13 20:18:44 -05:00
Matt Mackall
2793481364 store: change handling of decoding errors 2008-08-13 20:18:43 -05:00
Matt Mackall
7e9e494932 store: take opener as an argument 2008-08-13 20:18:42 -05:00
Matt Mackall
2f3a27a9da localrepo: simplify requirements checking 2008-08-13 20:18:42 -05:00
Matt Mackall
6cbbb747e5 localrepo: kill _createmode 2008-08-13 20:18:42 -05:00
Stefano Tortarolo
61967725af make commit fail when committing unresolved files 2008-08-13 20:18:40 -05:00
Dirkjan Ochtman
6b51480caa merge with crew-stable 2008-08-12 17:47:08 +02:00
Matt Mackall
08b29d9875 Merge with stable
Simplify the copy search algorithm
2008-08-10 18:38:43 -05:00
Adrian Buehlmann
904617b7d8 introduce store classes
move store walking from streamclone.py into store.py
2008-07-24 16:32:52 +02:00
Adrian Buehlmann
34afc460b4 move filename encoding functions from util.py to new store.py 2008-07-24 16:32:51 +02:00
Matt Mackall
8cb2b4a288 dirstate.walk: push sorting up 2008-07-22 13:03:19 -05:00
Matt Mackall
b4ff221e3e minor status fixups 2008-07-22 13:00:22 -05:00
Patrick Mezard
ba0d5cdad9 localrepo: fix status() typos from 854b907527e5a and 51f105e04825 2008-07-20 19:09:00 +02:00
Christian Boos
3bad7927f6 localrepo: do not modify a dictionary being iterated in status() 2008-07-18 12:31:40 +02:00
Matt Mackall
75293bf8bd status: various cleanups
- rename lookup to cmp for formatting reasons
- reduce nesting level of fixup code
- sort fixup results
- group comparison cases in a separate clause
- make list initialization simpler
- delay flag lookup for working directory
- sort removed list in comparison
- avoid sorting already sorted lists
2008-07-11 18:46:02 -05:00
Matt Mackall
7157575a82 status: use contexts 2008-07-11 18:46:02 -05:00
Matt Mackall
f1402a6652 context: add walk method 2008-06-27 19:25:48 -05:00