Commit Graph

368 Commits

Author SHA1 Message Date
mpm@selenic.com
f554f899b0 move repo.current to dirstate.parents()
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

move repo.current to dirstate.parents()

dirstate now tracks the parents for the working dir
add a parents command to show them

manifest hash: cd69237838c3f69f7937723c4a6803d47cb27cfa
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCoMGuywK+sNU5EO8RAg5UAKCVLUrsJtkoIOTM+e0BLqEVN3Ni3gCeNDyy
ZF8jD728cl9K7S4sIN4gX4Y=
=P4bu
-----END PGP SIGNATURE-----
2005-06-03 12:46:38 -08:00
mpm@selenic.com
34a8455a78 fix repo locking
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

fix repo locking

We've actually got to assign the lock to a local variable, otherwise
it gets released immediately.

manifest hash: d55fc8858649c59ed9fa1f8cb90b63b33a71c223
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCoMERywK+sNU5EO8RAgqwAKCPhmTOK/n5bjJ6Xh4mC9Q8mJDx4wCfZBGX
Uik+3sUcQRqgHjsP0fIjjiU=
=U1p0
-----END PGP SIGNATURE-----
2005-06-03 12:44:01 -08:00
mpm@selenic.com
2a4127e46c fix bad assumption about uniqueness of file versions
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

fix bad assumption about uniqueness of file versions

Mercurial had assumed that a given file hash could show up in only one
changeset, and thus that the mapping from file revision to changeset
was 1-to-1. But if two people perform the same edit with the same
parents, we can get an identical hash in different changesets.

So we've got to loosen up our uniqueness checks in addgroup and in
verify.

manifest hash: 5462003241e7d071ffa1741b87a59f646c9988ed
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCoMDkywK+sNU5EO8RAg9PAJ9YWSknfFBoeYve/+Z5DDGGvytDkwCgoMwj
kT01PcjNzGPr1/Oe5WRvulE=
=HC4t
-----END PGP SIGNATURE-----
2005-06-03 12:43:16 -08:00
mpm@selenic.com
7189fac106 add back tempfile import
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

add back tempfile import

manifest hash: e6673585d42d0992230d23c8334a9e26eb94d34a
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCoMBAywK+sNU5EO8RAvTAAKCwlVzxvm9enBR+xMmkj2aRMEYkkwCfXUqT
SlEdijBZ9fnktzxadp7/evU=
=uL7e
-----END PGP SIGNATURE-----
2005-06-03 12:40:32 -08:00
mpm@selenic.com
788383bd38 make pull work for multiple heads
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

make pull work for multiple heads

add repository.heads()
teach remoterepository and hgweb about heads command
teach getchangegroup about multiple heads
break apart addchangegroup and merge (cleaning up merge saved for later)

after this change, it is now possible to pull and get multiple heads, but
not possible to merge the heads

manifest hash: 86fe3ede296254698fdd4c97df02944993ef2cbb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCn8SZywK+sNU5EO8RAkSvAJ9NOA4UZ3cFyyzymlYBZnV+PpGRcACeLL+R
PFaSgJHGKvxsXpvPYiZA0O0=
=L2Xr
-----END PGP SIGNATURE-----
2005-06-02 18:46:49 -08:00
mpm@selenic.com
4a3f7fbb37 change dircache into dirstate
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

change dircache into dirstate

The dircache now tracks adds and removes directly

diffdir now makes a proper distinction between added and unknown files

Add a forget command to unadd files

Undo tries to fix up the state of just the files in the undone commit

Add and remove complain about files that are not in a proper state of
existence


manifest hash: ca0cd6abc5e119670acf11a54fefa2bc986eadf3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCn7TRywK+sNU5EO8RAhnSAKC2oHg1HJOCGsvpUYj4SBEq0HmuJQCgr5gl
jEBTs5AFD5IhF73YAgrcnkE=
=prQA
-----END PGP SIGNATURE-----
2005-06-02 17:39:29 -08:00
mpm@selenic.com
9c2cf95fb6 merge: catch unexpected responses
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

merge: catch unexpected responses

This dumps the data received from the remote server in case we fail to
parse its output.

manifest hash: da5232649a0e02645bccd8b50665d9c3e247fdc2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCnkMRywK+sNU5EO8RApAGAKCw7ZHF4YUaTi3ychbUe5Lr47OsCwCfUqKg
lxA/sgDmeDMbmwbV5S+Beik=
=y6TB
-----END PGP SIGNATURE-----
2005-06-01 15:21:53 -08:00
mpm@selenic.com
8f7a14f45c hg annotate: actually annotate the given version
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hg annotate: actually annotate the given version

Bug spotted by Edouard Gomez

manifest hash: 3e29a7a8eb70b92483958ceffe94045a82899c61
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCnkF7ywK+sNU5EO8RAvvnAJsFjkpFdzQ+cPyrvQE25V16/z3dBQCeIyzf
S/N2S/RcfFd9Ca56Xvf/jAM=
=0qMq
-----END PGP SIGNATURE-----
2005-06-01 15:15:07 -08:00
mpm@selenic.com
4e26999123 hg undo: fixup working dir state
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hg undo: fixup working dir state

manifest hash: 60fd7a5621f7c4e87c7c36097aaf11b22e7ee0b4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCngETywK+sNU5EO8RAiC/AKChvIgy61YfOLJcTQg5BKkTLLErRgCgnJMr
+xb+XsjeNfK+83MzeuE8UOk=
=EIlj
-----END PGP SIGNATURE-----
2005-06-01 10:40:19 -08:00
mpm@selenic.com
5064b78681 Move ui class to its own module
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Move ui class to its own module

manifest hash: f75c8f9cdfe16f143ab633d0072c14ba88ac88be
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCnVxxywK+sNU5EO8RAgPgAJ48p7w4Do/saCC8WkBvHj/rdnoiEgCgrSs9
Wu1fOSgST3rn/2JpZAdFRdA=
=91tt
-----END PGP SIGNATURE-----
2005-05-31 22:57:53 -08:00
mpm@selenic.com
79bacd4c40 hg rawcommit command
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hg rawcommit command

From: Christopher Li <hg@chrisli.org>

This allows direct access to the commit command, primarily for
importing from other SCMs.

manifest hash: bea39fa8207582c9fa7ba0904721eb5113c61cf4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCnUinywK+sNU5EO8RAhWqAJ9PiafRbfEIA3VsO07BbGZr5adNvgCfT2k7
blYTdkrIiRzzCxn6yPq8Yu4=
=o8k0
-----END PGP SIGNATURE-----
2005-05-31 21:33:27 -08:00
mpm@selenic.com
4c466962c7 annotate: memory efficiency
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

annotate: memory efficiency

Keep track of how many times a given ancestor is referenced and delete
the annotation information after it's no longer relevant. This tends
to reduce the number of cached revisions to just a couple.

manifest hash: 281e48b67ce310e355bed1615e0f16a643850f56
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCnJjyywK+sNU5EO8RAkZ1AKCugPjkRgwVB+71amZf8H5dLCbNvgCfePIB
4FHI1c9IOEzHUNkYPDGqt+0=
=OnFo
-----END PGP SIGNATURE-----
2005-05-31 09:03:46 -08:00
mpm@selenic.com
8037bd584f annotate: deal with merges
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

annotate: deal with merges

This rewrite of the annotate code deals with merges:
- - find all ancestors
- - sort ancestors topologically
- - for each ancestor, pairwise annotate with parents
- - keep a cache of annotations for efficiency

manifest hash: b960d9b9c6a7f6ba351c97675b00a1dd3004dcf1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCnJclywK+sNU5EO8RAphZAKCkUuHh4jEJz7YwD9uzCT76GaSR/wCfUVUQ
VbGna/9jrOAFlrB3mZ3e4qg=
=yDFy
-----END PGP SIGNATURE-----
2005-05-31 08:56:05 -08:00
mpm@selenic.com
55d14e5d8d Changes to network protocol
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Changes to network protocol

Stream changes at the delta level rather than at whole delta groups
 this breaks the protocol - we now send a zero byte delta to indicate
 the end of a group rather than sending the entire group length up front
Fix filename length asymmetry while we're breaking things
Fix hidden O(n^2) bug in calculating changegroup
 list.append(e) is O(n), list + [element] is not
Decompress chunks on read in revlog.group()
Improve status messages
 report bytes transferred
 report nothing to do
Deal with /dev/null path brokenness
Remove untriggered patch assertion

manifest hash: 3eedcfe878561f9eb4adedb04f6be618fb8ae8d8
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCmzlqywK+sNU5EO8RAn0KAJ4z4toWSSGjLoZO6FKWLx/3QbZufACglQgd
S48bumc++DnuY1iPSNWKGAI=
=lCjx
-----END PGP SIGNATURE-----
2005-05-30 08:03:54 -08:00
mpm@selenic.com
32cfa6a5d1 merge: add count of new manifests, files, and revisions
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

merge: add count of new manifests, files, and revisions

manifest hash: ff29e3124693a0172ac936fac03fd73cc91778f5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCmfrjywK+sNU5EO8RAnHZAJ4gwnv4QUipIcP2PhyFVS1lXh9TQwCgipSi
r+6d9lUHu2U9UJGFkJPyi/4=
=Caod
-----END PGP SIGNATURE-----
2005-05-29 09:24:51 -08:00
mpm@selenic.com
afc4fce136 merge: short-circuit search for merge into empty repo
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

merge: short-circuit search for merge into empty repo

We should have 3 cases for merge:

- - we have no changesets
- - we have less than half the changesets
- - we have more than half the changesets

For no changesets, we can immediately tell that we need everything.
This happens when we initially branch from a remote repo, so we simply shortcircuit the search and grab everything from the root

When we're actually tracking a project, we should generally have most
of the changesets, so the current search algorithm should minimize
searching.

It should rarely occur that upstreams gets far ahead of us, in which
case, we suffer a longer search.

manifest hash: eabd55841b03225176ea72b985aad36431a438a9
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCmfajywK+sNU5EO8RAuyKAKCf7Nw6XSK5HEzbrZae7Q06e3dk4wCgjbK6
YUTEfkpPP1h3mNHIHRKz+aI=
=eGMq
-----END PGP SIGNATURE-----
2005-05-29 09:06:43 -08:00
mpm@selenic.com
0c92a53dcc Fix two minor merge bugs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Fix two minor merge bugs

Fix variable name for printing manifest node
Trouble with empty between lists from remote repos

manifest hash: 000e9267b17c870f673210c8aae50d99e0e5b72b
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCmOmtywK+sNU5EO8RAs7AAJ9dVyOn5Ne+EopdUqOe8IKVH86R3wCfUhNO
CLpuRURCB5Ang19YZ5MLGeg=
=NF1T
-----END PGP SIGNATURE-----
2005-05-28 13:59:09 -08:00
mpm@selenic.com
68acd15143 Add $HGEDITOR hook and example script
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Add $HGEDITOR hook and example script

This hook makes signing commits easier.

manifest hash: ba8723e4b52323528dfa681a58658a5b4b2c02e4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCmONFywK+sNU5EO8RAj87AKCEa5r9EepdYPiYRGo/jAjjwCIcVACfeBPe
QDInXr7karo6/P8d2bM/tVU=
=rxIQ
-----END PGP SIGNATURE-----
2005-05-28 13:31:49 -08:00
mpm@selenic.com
868bdf2214 Add manifest hash to commit messages for easy signing
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Here's an example:

This is the current manifest hash:

 e06d11165178d03c296ea7e7854f91e612a8d6bf

It was copied from the HG: comment lines that are added to the commit.
Then I wrote this commit message, signed it, then closed the commit.

The manifest hash is a hash of all the files in the project together
with the hashes of manifest's parents. Thus, signing the manifest hash
allows us to verify the entire state of project at the time of the
commit.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCmMrcywK+sNU5EO8RAoKwAJ4gPz2dI1Xh44N3tra43clUGhLVggCbBxuu
8pBZt85SA9ty39+e2+hL9WI=
=t/xS
-----END PGP SIGNATURE-----
2005-05-28 11:48:00 -08:00
mpm@selenic.com
57a99c80af Change hg: protocol name to http: and http: to old-http:
hg: will continue to work for a bit
old-http: will be phased out soon
2005-05-27 12:26:14 -08:00
mpm@selenic.com
3d6a44cc6c trivial tweak to merge3 2005-05-26 18:20:24 -08:00
mpm@selenic.com
f86593199d Make undo and recover friendlier
Add them to the help display, have them report failure
2005-05-26 09:48:50 -08:00
mpm@selenic.com
683f21be6a Implement recover and undo commands
This adds an interface to transaction to rollback with a given journal file
and commands to rollback an existing .hg/journal or .hg/undo.
2005-05-26 09:04:54 -08:00
mpm@selenic.com
0058e326b8 Simply repository locking
This is a first pass at implementing repo locking. Next up, journal
recovery and undo.
2005-05-26 08:53:04 -08:00
mpm@selenic.com
34f1196e86 Bail on attempts to do an empty commit 2005-05-25 08:53:34 -08:00
mpm@selenic.com
a9d4acea6a Pass filename to $HGMERGE
This lets the merge program be slightly more user-friendly
2005-05-24 23:34:06 -08:00
mpm@selenic.com
0616f6d8db Improve pruning of branches in outstanding changeset algorithm
These changes make the client keep track of what it's seen more
carefully to avoid some redundant requests.
2005-05-24 23:13:25 -08:00
mpm@selenic.com
cbe151d218 Handle merge with deletions
If you merge with a repo that has deleted a file after editing it, hg
attempted to resolve the file. This (correctly) resulted in hg verify
errors because the resolved version didn't show up in the manifests.

This moves the manifest resolution before file resolution and decides
which files to resolve based on the (partially) resolved manifest.
After files are resolved, the final manifest is committed.
2005-05-24 20:30:35 -08:00
mpm@selenic.com
a2b716acff Fix transaction handling bug by reverting fileopener change 2005-05-23 22:14:41 -08:00
mpm@selenic.com
84eb10c391 Minor safety checks to manifest diff 2005-05-23 16:05:48 -08:00
mpm@selenic.com
484dde5595 Add fileopener to move some pathname knowledge from filelog to repository 2005-05-20 17:38:01 -08:00
mpm@selenic.com
24c5c243a2 Simplify checkout slightly, replace checkdir with os.makedirs 2005-05-20 17:33:24 -08:00
mpm@selenic.com
066f1e4183 Sort files on check-in for good I/O patterns 2005-05-20 17:31:55 -08:00
mpm@selenic.com
c60581071a Move hg from storing files in data with base64 encoding to full
pathnames with .i and .d extensions. This means we naturally get good
FS layout, and cp and tar fix things up nicely rather than pessimizing
layout.
2005-05-20 17:27:21 -08:00
mpm@selenic.com
836655a3c5 Annotate was being too clever trying to work in place, and triggering
its assert. Simplify it, fix it, and speed it up a tiny bit.
2005-05-20 17:22:02 -08:00
mpm@selenic.com
aea9850302 Make prompting go
Minor UI tweaking
Add merge prompting
2005-05-18 18:25:37 -08:00
mpm@selenic.com
fb1218fe40 Add paranoia to diff code 2005-05-18 16:59:54 -08:00
mpm@selenic.com
785f7947d7 Add updated merge3 code 2005-05-18 16:45:44 -08:00
mpm@selenic.com
2bbb8b5a72 Beginnings of transaction undo support 2005-05-18 16:31:51 -08:00
mpm@selenic.com
7e5280f30b Refactor merge code
Delete old code
Fix calculation of newer nodes on server
Fix branch recursion on client
Fix manifest merge problems
Add more debugging and note messages to merge
2005-05-18 16:29:39 -08:00
mpm@selenic.com
060e7fe13f Fix manifest merge swap bug
Add more debug info to merge
2005-05-17 13:38:21 -08:00
mpm@selenic.com
ca952e3eda Fix merge bug, I hope 2005-05-17 11:40:45 -08:00
mpm@selenic.com
77028dbcc6 Add -q quiet option
Make -d and -v do something
Add a bunch of debug and note messages
2005-05-17 11:06:59 -08:00
mpm@selenic.com
08e7e95781 Add basic annotation support
filelog.annotate() will get the change number on each line.

Singed-Off-by: Christopher Li<hg@chrisli.org>
2005-05-17 01:12:30 -08:00
mpm@selenic.com
f16efef9d1 Add "HG: merge resolve" to editor text for merge 2005-05-17 01:07:57 -08:00
mpm@selenic.com
7c6f4b49c8 Add tag support 2005-05-13 13:12:32 -08:00
mpm@selenic.com
d9094f35ef Fix up a bunch of bugs in the new merge code
Move getchangegroup/addchangegroup to generators
2005-05-13 11:47:16 -08:00
mpm@selenic.com
264f689db9 Diff in subdirectories from Jake Edge
Dates in diff
Fix O(n^2) behaviour of manifest diff
Add a/ and b/ to work with patch -p1
2005-05-12 17:54:55 -08:00
mpm@selenic.com
f6de60c79e Add hg:// protocol
Fix some of the getchangegroup logic
2005-05-12 01:21:58 -08:00
mpm@selenic.com
27770f7f5d Add getchangegroup code to efficiently calculate and request a changegroup 2005-05-11 15:06:41 -08:00
mpm@selenic.com
1171a0a7b6 From: Thomas Arendsen Hein <thomas@intevation.de>
Good. Attached is a patch which also tries to use $EMAIL as the
commit user and removed a try/except by using os.environ.get.
2005-05-11 14:38:26 -08:00
mpm@selenic.com
40a6faf20b Fix resolve bug putting unchanged files in resolve cset 2005-05-11 09:44:12 -08:00
mpm@selenic.com
8bd85e1add Add changegroup support 2005-05-10 00:40:49 -08:00
mpm@selenic.com
af712781e7 Fix occassional diff bug with manifests 2005-05-10 00:33:48 -08:00
mpm@selenic.com
c99659b446 Date is an int as a string in changelog 2005-05-07 16:33:09 -08:00
mpm@selenic.com
90b1458af6 Move hex/bin bits to revlog
Handle lookup of rev -1 of changelog
2005-05-07 16:12:31 -08:00
mpm@selenic.com
ec57dd3c61 Support for 0, 1, or 2 diff revs 2005-05-07 09:27:52 -08:00
mpm@selenic.com
6d687f705b Add diffrevs function to compare two nodes 2005-05-06 09:09:35 -08:00
mpm@selenic.com
daf47e9d59 Fix up commit arg breakage 2005-05-05 15:20:56 -08:00
mpm@selenic.com
e36ca808fb Make diffdir take a revision argument 2005-05-05 15:05:50 -08:00
mpm@selenic.com
fc0d37860b Fix corruption from manifest.listcache optimization
Put the remove edit text in the right place
2005-05-04 22:47:25 -08:00
mpm@selenic.com
1fb1f1ae9a The actual hg remove fix from Thomas Hein 2005-05-04 15:42:30 -08:00
mpm@selenic.com
1e4e38aea7 From: Thomas Arendsen Hein <thomas@intevation.de>
mercurial 0.4d had the same problems with removing files, but
attached is a patch which fixes that problem.

The key change is in dircache.remove():
 del self[f] should have been del self.map[f]

This error was hidden by the 'except: pass' statement.
2005-05-04 15:32:16 -08:00
mpm@selenic.com
e35c6e552f Fix network pull of repo files with "%" in their base64 encoding. 2005-05-04 10:07:10 -08:00
oxymoron@cinder.waste.org
c7e0bb4f93 Fix linking of changeset revs when merging 2005-05-03 23:37:43 -08:00
mpm@selenic.com
b713cdf587 Ignore empty ignore patterns 2005-05-03 18:51:52 -08:00
mpm@selenic.com
45bf6cd115 Fix exception handling for reading current working version 2005-05-03 18:36:16 -08:00
mpm@selenic.com
ca8cb8ba67 Add back links from file revisions to changeset revisions
Add simple transaction support
Add hg verify
Improve caching in revlog
Fix a bunch of bugs
Self-hosting now that the metadata is close to finalized
2005-05-03 13:16:10 -08:00