Commit Graph

368 Commits

Author SHA1 Message Date
mpm@selenic.com
95f1940887 Create helper functions for I/O to files in the working directory
This simplifies some code and gives us a single place to add I/O
filters.
2005-08-24 00:32:10 -07:00
mpm@selenic.com
def38223d0 Deal with repos with missing timezones 2005-08-23 16:19:14 -07:00
mpm@selenic.com
bfbf3abdb0 Fix callers to file.revision to use file.read
This was causing unchanged files to show up as modified.
2005-08-23 12:46:43 -07:00
mpm@selenic.com
b12dc2fafb Clean up some merge logic
- rename mode to branch_merge
- use explicit update mode
- use negative mtime for updates that set mtime
- expand some cryptic variable names
- elaborate merge dirstate comments
- remove redundant manifest lookup for non-merge case
- remove impossible merge case
- fix up test cases
2005-08-23 02:19:38 -07:00
mpm@selenic.com
094f0105d6 Fix up some bugs introduced by recent merge changes
- use new changed list to track what files actually got new revlog entries
  at commit/rawcommit time
- when updating a file during a merge, don't mark it as completely unchanged
- handle file not being in parent 1 in status
2005-08-22 01:22:29 -07:00
mpm@selenic.com
5ce035aafc merge: remove remaining mark bits 2005-08-21 22:03:36 -07:00
mpm@selenic.com
cf3b118558 Fix long-standing excessive file merges
Since switching to the multihead approach, we've been creating
excessive file-level merges where files are marked as merged with
their ancestors.

This explicitly checks at commit time whether the two parent versions
are linearly related, and if so, reduces the file check-in to a
non-merge. Then the file is compared against the remaining parent,
and, if equal, skips check-in of that file (as it's not changed).

Since we're not checking in all files that were different between
versions, we no longer need to mark so many files for merge. This
removes most of the 'm' state marking as well.

Finally, it is possible to do a tree-level merge with no file-level
changes. This will happen if one user changes file A and another
changes file B. Thus, if we have have two parents, we allow commit to
proceed even if there are no file-level changes.
2005-08-21 21:59:55 -07:00
mpm@selenic.com
a4548bef7f Remove call to non-existent date_parser 2005-08-20 01:35:45 -07:00
Samuel Tardieu
e3495dfc0a [PATCH] Take DST into account
Right now, mercurial doesn't take daylight saving time into account
because it uses time.timezone inconditionally, instead of resorting to
time.altzone if daylight saving time is on.
2005-08-19 23:26:32 -08:00
mpm@selenic.com
93c3566358 Add --ssh and --remotecmd to push
This uses the new setconfig options passing mechanism
2005-08-19 21:36:57 -08:00
mpm@selenic.com
8fd52eb092 Fix path handling for deleting files on merge 2005-08-17 00:36:36 -08:00
tksoh@users.sf.net
564f653a74 Fixed --repository option when handling relative path
When specifying relative path to --repository option, 'log' and
'diff' were unable to find the files specified. Here's the fix.
2005-08-17 00:33:53 -08:00
mpm@selenic.com
4eed373ac4 Add a local() method to repository classes 2005-08-16 19:17:01 -08:00
mpm@selenic.com
5bcea47997 Add basic https support for pull 2005-08-16 17:12:25 -08:00
mpm@selenic.com
8ff3edc761 whitespace cleanup 2005-08-16 15:30:26 -08:00
Thomas Arendsen Hein
6abcd01c6a Fix .hgignore parsing if last line has no EOL, ignore trailing white space.
(and don't use tabs in python code)
2005-08-15 08:08:11 +01:00
mason@suse.com
5784da7ba8 Allow the changegroup generator to completely load the buffer.
This makes is possible to delete or truncate away revisions and still
use the changegroup later.
2005-08-14 20:09:21 -08:00
mason@suse.com
7c05a98feb Change repo.comit to return None on error or the new revision number on
success

This allows the caller to correctly record the new revision number
2005-08-14 20:09:01 -08:00
mason@suse.com
9e36a1edf3 Add force option to repo.commit, allowing commits where no files change 2005-08-14 20:08:35 -08:00
mason@suse.com
914365e493 Add searching for named branches
named branching is when you identify a head by a tag on an earlier revision.
This patch adds repo.branchlookup for searching through the tree to
find branch tags for heads.

hg update -b tag is added to checkout based on branch tags
hg heads -b is added to print the tag associated with each head
2005-08-14 12:23:45 -08:00
Bryan O'Sullivan
1486c1162f Merge with TAH. 2005-08-13 15:23:06 -08:00
Bryan O'Sullivan
0b40afa588 Fix bug involving "hg debugwalk -Ipattern" from repository root. 2005-08-13 15:09:37 -08:00
mpm@selenic.com
505146283c Merge with TAH 2005-08-12 23:54:09 -08:00
Bryan O'Sullivan
dcc0f582eb Fix walk path handling on Windows 2005-08-12 15:06:52 -08:00
Bryan O'Sullivan
52caea4f69 Fix walk code for files that do not exist anywhere, and unhandled types.
Prior to this, a file that did not exist was reported as showing up in
the filesystem, as were files of unsupported types (such as fifos).

Now, an error message is printed and nothing is returned in such cases.

This change also moves the commands.pathto function to the util module,
as the walk code needs it to print non-confusing error messages.
2005-08-12 11:16:58 -08:00
mason@suse.com
b44281b503 dirstate walking optimizations
The repo walking code introduces a number of calls to dirstate.map.copy(),
significantly slowing down the walk on large trees.  When a list of
files is passed to the walking code, we should only look at map entries
relevant to the file list passed in.

dirstate.filterfiles() is added to return a subset of the dirstate map.
The subset includes in files passed in, and if one of the files requested
is actually a directory, it includes any files inside that directory tree.

This brings the time for hg diff Makefile down from 1.7s to .3s on
a linux kernel repo.

Also, the diff command was unconditionally calling makewalk, leading
to an extra pass through repo.changes.  This patch avoids the call
to makewalk when commands.diff isn't given a list of patterns, cutting
the time for hg diff (with no args) in half.

Index: mine/mercurial/hg.py
===================================================================
2005-08-12 07:10:21 -08:00
Thomas Arendsen Hein
0fcb836019 Cleanup after previous changes:
- there are only two states for the exec bit, so no need to override it.
- file_ variable is only once now, so it self.file(f) can be used directly.
2005-08-10 08:41:23 +01:00
Thomas Arendsen Hein
6ab968eb5c Use length of file instead of length of change for the dirstate entry. 2005-08-10 07:51:37 +01:00
Thomas Arendsen Hein
20e6210ce8 Fix 3-way-merge of original parent, workdir and new parent.
The dirstate has to match what is in the repository (what would be
checked out with 'hg update -C'), because the resulting file may be
identical to the new parent, or it may be completely different.
Previously the dirstate wasn't updated, so if you changed the file to
look like the original parent, it might be considered unmodified
relative to the new parent.
2005-08-10 06:47:46 +01:00
Bryan O'Sullivan
3a382ee2e1 Merge with mpm. 2005-08-09 17:24:38 -08:00
Edouard Gomez
d27cf121e6 Trap OSError when deleting env vars
On the other OS, it seems that case insensitivity for
environment vars can bite users when using some unknown
combination of python 2.4.1 and win2kSP4+minsys (and
probably other vversions of these softwares).

The best way to avoid problems in those weird cases is to
ignore OSError exception during env var deletion.
2005-08-09 09:36:34 -08:00
Thomas Arendsen Hein
afee016a1d dirstate.changes() now distinguishes 'hg remove'd or just deleted files.
Interface is not yet changed.
Non-regular files are considered to be removed or deleted.
Removed the unneeded match(fn) call for adding to the unknown list.
2005-08-09 11:32:30 +01:00
Bryan O'Sullivan
75e6a5bd0e Teach walk code about absolute paths.
The first consequence of this is that absolute and relative paths now
all work in the same way.  The second is that paths that lie outside
the repository now cause an error to be reported, instead of something
arbitrary and expensive being done.

Internally, all of the serious work is in the util package.  The new
canonpath function takes an arbitrary path and either returns a
canonical path or raises an error.  Because it needs to know where the
repository root is, it must be fed a repository or dirstate object, which
has given commands.matchpats and friends a new parameter to pass along.

The util.matcher function uses this to canonicalise globs and relative
path names.

Meanwhile, I've moved the Abort exception from commands to util, and
killed off the redundant util.CommandError exception.
2005-08-07 12:43:11 -08:00
Thomas Arendsen Hein
9d8a9110b0 Fixed encoding of directories ending in .d or .i:
One .d and .i was mixed up, and string replace method doesn't work in-place.
2005-08-07 17:41:13 +01:00
mpm@selenic.com
9161f5c8e4 Merge with BOS 2005-08-02 08:57:32 -08:00
mpm@selenic.com
c0f58ac983 Make ssh URL parsing more robust 2005-08-01 23:23:51 -08:00
mpm@selenic.com
7c0d9a3cf7 Warn on pushing unsynced repo or adding new heads
By popular demand
2005-08-01 23:17:22 -08:00
Bryan O'Sullivan
a159000a3d Attempt to yield names in sorted order when walking.
This is an improvement in behaviour, but the walk and changes code still
has some flaws that make sorted name presentation difficult:

- changes returns tuples of names, instead of a sorted list of (name,
  status) pairs.

- walk yields deleted names after all others.
2005-07-31 18:03:46 -08:00
Bryan O'Sullivan
25438a68e9 Ensure that dirstate.walk only yields names once.
Its predecessor code used to do this, and now it does, too.
2005-07-31 17:54:00 -08:00
Bryan O'Sullivan
2f2a31ce76 Clean up walk and changes code to use normalised names properly.
New function: commands.pathto returns the relative path from one path
to another.  For example, given foo/bar and baz/quux, it will return
../../baz/quux.  This new function is used by the walk and status code
to print relative paths correctly.

New command: debugwalk exercises the walk code without doing anything
more.

hg.dirstate.walk now yields normalised names.  For example, if you're
in the baz directory and you ask it to walk ../foo/bar/.., it will yield
names starting with foo/.

As a result of this change, all of the other walk and changes methods
in this module also return normalised names.

The util.matcher function now normalises globs and path names, so that
it will match normalised names properly.

Finally, util.matcher uses the non-glob prefix of a glob to tell walk
which directories to scan.  Perviously, a glob like foo/* would scan
everything, but only return matches for foo/*.  Now, foo/* only scans
under foo (using the globprefix function), which is much faster.
2005-07-31 17:42:46 -08:00
mpm@selenic.com
b90578da57 Merge with BOS 2005-07-30 09:00:14 -08:00
mpm@selenic.com
c29a4a3c68 add note about -C to update message 2005-07-30 08:30:12 -08:00
Bryan O'Sullivan
e6c1da7c61 Adapt commit to use file matching code.
The code is slightly complicated by the need to commit all outstanding
changes in the repository if no file names are given (other commands
operate on the current directory and its subdirectories in this case).

localrepository.changes has acquired an optional match parameter, to let
it filter out include/exclude options.
2005-07-29 15:02:27 -08:00
mpm@selenic.com
04d7166797 Fix the directory and revlog collision problem
This adds escaping for directory names so that directory foo.i doesn't
collide with the revision data for file foo.
2005-07-27 18:50:32 -08:00
mpm@selenic.com
e4d910ab82 Fix undo after aborted commit bug
Commit would overwrite undo.dirstate unconditionally, so an undo after
an aborted commit would restore the dirstate from the aborted commit
and not the prior transaction.

This copies dirstate to journal.dirstate and moves it after a
successful transaction.
2005-07-27 18:16:20 -08:00
mpm@selenic.com
6b8940724b Fix copy in subdirectories
Spotted by Chad Netzer
2005-07-27 10:05:12 -08:00
mpm@selenic.com
185e6a4945 Add changegroup hook for push/pull 2005-07-27 09:07:28 -08:00
mpm@selenic.com
3823d6eace Make pull count jargon less confusing
revisions are now synonymous with changesets, and not file changes
2005-07-25 12:02:29 -05:00
mpm@selenic.com
9520e62074 Fix local file changes being ignored after non-branch merge
Bug introduced in 45dd84ebbed8
Spotted by TAH
2005-07-23 10:00:56 -05:00
mpm@selenic.com
f8e53b93db Hack to fix missing '/' problem in URLs 2005-07-22 20:07:14 -05:00
mpm@selenic.com
8e0881ad8a Don't mark files with 'm'erge unless we're actually merging branches
For 3-way merges, we were marking files as 'm', which should only be
used for branch merges. This was causing files to show up in 'hg
status' that aren't actually modified.
2005-07-22 19:23:00 -05:00
mpm@selenic.com
1f521ec7c5 Check protocol versions
This also allows the old unidentified protocol
2005-07-21 18:20:13 -05:00
mpm@selenic.com
e16b6ba2ce Simplify content type checking 2005-07-21 18:19:20 -05:00
Muli Ben-Yehuda
0bf14d0d7e When pulling from a non hg repository URL (e.g. http://www.kernel.org/hg)
you geta pretty obscure error (zlib: uknown compression type). The
attached patch modifies hgweb.py and hg.py to supply and check a
'Content-type: application/hg-0.1' HTTP header for the branches,
between and changegroup commands, so that we know it's a proper hg
repo before snarfing the input. Comments appreciated!
2005-07-21 18:18:43 -05:00
mpm@selenic.com
f70080b8c0 Fix some line wrapping
manifest hash: 43af5dafa55e01f89727096f4d6784317f3eb0d6
2005-07-20 20:11:23 -05:00
Bryan O'Sullivan
6e8461ae49 Merge with Matt's tip. 2005-07-20 03:52:06 -08:00
Bryan O'Sullivan
89e035ebd1 An empty .hgignore file must cause us to ignore nothing, not everything! 2005-07-20 03:37:01 -08:00
Bryan O'Sullivan
e5a5499cf6 Only walk over files that match our criteria. 2005-07-20 02:57:20 -08:00
mpm@selenic.com
59b4a46202 Fix verify error reporting bug
Spotted by Chris Mason

manifest hash: d5a6e5cb65d2de65a68d1f85c8692e79622844d3
2005-07-19 15:09:04 -05:00
Bryan O'Sullivan
fc2a7aae7c Add a source designator to the walk methods.
If the source is 'f' (the filesystem), the file definitely exists in
the filesystem.  If 'm' (a rev or dirstate manifest), the file may not
still exist with the given name.
2005-07-19 07:15:59 -08:00
Bryan O'Sullivan
b9dc9cad21 Merge with Matt's tip. 2005-07-19 07:00:03 -08:00
Bryan O'Sullivan
4e963737e8 Get add and locate to use new repo and dirstate walk code.
They use a walk function that abstracts out the irritating details, so
that there's a higher likelihood of commands behaving uniformly.
2005-07-18 06:54:21 -08:00
Bryan O'Sullivan
f3838c3254 Work on walk code. 2005-07-16 15:13:40 -08:00
Thomas Arendsen Hein
8734e61b04 Added missing newline after two error messages.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Added missing newline after two error messages.

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

iD8DBQFC2B0mW7P1GVgWeRoRAjXJAJ48fbg6jXN65pBPGW/YmWn9OtKakACgjnr9
DPySaeLr3/bU7KhFdZPI7/4=
=Lvsx
-----END PGP SIGNATURE-----
2005-07-15 21:31:35 +01:00
Thomas Arendsen Hein
061a741620 merge program setting from hgrc wasn't used.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

merge program setting from hgrc wasn't used.

manifest hash: 49da647e02534f51324a7a955a34c64c05bd8fa0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFC1pKjW7P1GVgWeRoRAt6AAJ9ZB6NerDpWA/k2ZZeN6VUsSDkB8wCePhMd
Xr+Tb86zo+xFhHq7YkDvLak=
=+BY9
-----END PGP SIGNATURE-----
2005-07-14 17:28:19 +01:00
mpm@selenic.com
09e51635fb HG environment variables take precedence over hgrc
manifest hash: c128b53429f861c0b75c2a81c6ad4907e4779810
2005-07-13 01:48:03 -08:00
mpm@selenic.com
437dd476b1 Minor merge fixups
return a proper errorlevel on abort
let force jump across branches
catch exception on unlink

manifest hash: 6787814cd75e9f9623c56dc36f865afd54f56bfa
2005-07-13 01:46:50 -08:00
Matt Mackall
6219c06395 Reapply startswith() changes that got lost with stale edit
manifest hash: 16d7feedd561591a21727a4c13a1223019d802a7
2005-07-12 00:51:49 -08:00
Matt Mackall
68b8829c92 Sort files for removal 2005-07-11 15:07:04 -08:00
Matt Mackall
bfd9f3d6ab Handle undeletion of files when checking out old revisions
Spotted by Marc Singer
2005-07-11 15:06:32 -08:00
Matt Mackall
7235bde6be Actually move .hg into ignore 2005-07-11 10:28:20 -08:00
chad.netzer@gmail.com
899bc83dfc Make consistent use of str.startswith() in conditionals.
# HG changeset patch
# User chad.netzer@gmail.com
# Node ID 45db196de89a15fd045cd789f701b0180fd276f1
# Parent  852adf9ffa4dd2cb1a504bd207f0cad178ac4024
Make consistent use of str.startswith() in conditionals.
2005-07-10 16:14:56 -08:00
Matt Mackall
5fb8ca60d2 Move .hg into ignore() 2005-07-10 16:13:39 -08:00
mwilli2@localhost.localdomain
f2f576fe2c .hgignore speedups patch incorporating Matt's feedback.
# HG changeset patch
# User mwilli2@localhost.localdomain
# Node ID c78a9d4398c63b6bc689e456e1cab3850a846c8a
# Parent  5155a0b6300820be38eb7e04d26525be39307df2
.hgignore speedups patch incorporating Matt's feedback.
2005-07-10 16:03:20 -08:00
mark.williamson@cl.cam.ac.uk
7d47f35832 A number of minor fixes to problems that pychecker found.
# HG changeset patch
# User mark.williamson@cl.cam.ac.uk
# Node ID 55d38977b7f2e73b8c1090179928ac96c8922b90
# Parent  0bda45294416406d4c6fbaf1cb643dd0bf6b3a16
A number of minor fixes to problems that pychecker found.
2005-07-10 16:01:11 -08:00
Matt Mackall
2156cc914b Move commit hook after commit completes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Move commit hook after commit completes

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

iD8DBQFC0ZwSywK+sNU5EO8RAuAjAJsHGTXsOCnxq+xbq/Q0H+ayGnzaiQCfdWn6
or+IWK3sjYILYncTxMFZJdE=
=mQb7
-----END PGP SIGNATURE-----
2005-07-10 14:07:14 -08:00
Matt Mackall
bc958d41d5 Whitespace cleanup
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Whitespace cleanup

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

iD8DBQFC0ZvmywK+sNU5EO8RAhhDAJ0YXOx5B2F/3NjFB+5YcUtkHqVyuQCgnNyp
tWbRrjDz/SbKz/tFAsxJDqo=
=xB66
-----END PGP SIGNATURE-----
2005-07-10 14:06:30 -08:00
Matt Mackall
c4c7a27643 Generate a friendlier except for failed lookups
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Generate a friendlier except for failed lookups

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

iD8DBQFC0Ws6ywK+sNU5EO8RArBGAJ9EA0mCNGqO+w6LaO358sVe19o7lQCdGffF
MmQ/ZIvxoJOjYTo+PLBWMqI=
=4VIg
-----END PGP SIGNATURE-----
2005-07-10 10:38:50 -08:00
Matt Mackall
2b45be3873 dirstate.forget() takes a list
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

dirstate.forget() takes a list

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

iD8DBQFC0WO+ywK+sNU5EO8RAlmYAJ9pcSgpvvuqLzfUkeApXZyOb3j6pQCgi9Te
e8ZI236WNWfyrwEASxFIeLM=
=yDVZ
-----END PGP SIGNATURE-----
2005-07-10 10:06:54 -08:00
Matt Mackall
9f4ad36efb Warn about bogus ignore expressions
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Warn about bogus ignore expressions

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

iD8DBQFC0IPqywK+sNU5EO8RAsOdAJ0bFxZoUjSk/BxWZ9C50SlxlDBlBQCeKbu0
QVzZZKIFlDRVWOsi8zfamHA=
=zAVL
-----END PGP SIGNATURE-----
2005-07-09 18:11:54 -08:00
Matt Mackall
ad29857686 Non-grouping regex for ignore
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Non-grouping regex for ignore

Suggested by Mark Williamson

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

iD8DBQFCzjX3ywK+sNU5EO8RAnc1AJ4/sKzyZJiRs6UzE3uksE2U9rOkVQCeJsZf
PhHsNtEt/WyL+v44mBfk8Mk=
=e+Qy
-----END PGP SIGNATURE-----
2005-07-08 00:14:47 -08:00
Matt Mackall
e4ed038d5b Fix bug in reverting deleted files
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Fix bug in reverting deleted files

Force updates and reverts wouldn't restore deleted files in the
working dir. This should fix that.

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

iD8DBQFCzjOJywK+sNU5EO8RAqVLAKCC1BF6JhNiO6n4LJGvy9RBTgOelwCdF9Tr
sADRnovYt9xSnUGmd1Om9JQ=
=SdcP
-----END PGP SIGNATURE-----
2005-07-08 00:04:25 -08:00
Matt Mackall
b9a708f99a Experimental ignore regex speed-up
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Experimental ignore regex speed-up

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

iD8DBQFCzWkvywK+sNU5EO8RAohzAJ9BwkFJQzs0QRH71r1Y1Wm0QCSmEwCgrESQ
Ej3Kt/y0JdhOJzQLsAiufqk=
=SPjY
-----END PGP SIGNATURE-----
2005-07-07 09:41:03 -08:00
Matt Mackall
cbe4c5f492 Attempt to read all remaining remote output at close
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Attempt to read all remaining remote output at close

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

iD8DBQFCzM60ywK+sNU5EO8RAudsAJwPW/MPUBXFV13UbYmZyiwdzSr8QwCfYJqc
l1ZDWPZPTN5UGUlfs0CCu7Y=
=2Tat
-----END PGP SIGNATURE-----
2005-07-06 22:41:56 -08:00
Matt Mackall
d35c78a55f Show remote client output with "remote:" 2005-07-06 22:30:00 -08:00
mason@suse.com
5cc69df211 Performance enhancements for manifest.add()
# HG changeset patch
# User mason@suse.com

Performance enhancements for manifest.add()

Improve manifest.add performance by using bisect to insert/remove
changed items into the manifest list.  This also generates the
manifest delta directly based on the changes being made.
2005-07-06 22:28:35 -08:00
Matt Mackall
073fa93171 Add addchangegroup to the ssh protocol 2005-07-06 22:23:57 -08:00
Matt Mackall
8cf75f2dfd Add a scheme for handling remote locking
This adds an object that remembers to unlock the remote repo on
destruction and lock/unlock functions for the ssh protocol. The remote
repository should also unlock itself when the connection goes down.
2005-07-06 22:23:27 -08:00
Matt Mackall
46871ef83d Fix up the broken bits in findoutgoing 2005-07-06 22:21:23 -08:00
Matt Mackall
f8a8da4071 Move the empty changeset detection out of findincoming to pull
This lets us reuse findincoming for findoutgoing
2005-07-06 22:20:56 -08:00
Matt Mackall
e873216620 Protocol switch from using generators to stream-like objects.
This allows the the pull side to precisely control how much data is
read so that another encapsulation layer is not needed.

An http client gets a response with a finite size. Because ssh clients
need to keep the stream open, we must not read more data than is sent
in a response. But due to the streaming nature of the changegroup
scheme, only the piece that's parsing the data knows how far it's
allowed to read.

This means the generator scheme isn't fine-grained enough. Instead we
need file-like objects with a read(x) method. This switches everything
for push/pull over to using file-like objects rather than generators.
2005-07-06 22:20:12 -08:00
Matt Mackall
e16fdada85 Add a repo method to report repo device
This is used to establish whether repos are on the same device for
hard linking. Remote repos all return -1.
2005-07-06 22:14:10 -08:00
Bryan O'Sullivan
39b21b4b72 Add locate command.
# HG changeset patch
# User Bryan O'Sullivan <bos@serpentine.com>
# Node ID ebf5eba347a17a5c09000b3342caf350cd060a1b
# Parent  4309b0a5a6010dd2e5811b77d2bc29a51acf290f
Add locate command.

Used for finding files with names that match specific patterns,
such as "*.c".

This patch also introduces localrepository.getcwd, which returns the
current directory relative to the repository root.
2005-07-05 18:19:01 -08:00
Matt Mackall
5dd4f6c486 Add an sshrepository class and hg serve --stdio 2005-07-05 17:55:22 -08:00
Matt Mackall
3cc4e98ed3 Change remote repository to httprepository 2005-07-05 17:50:43 -08:00
Matt Mackall
4db088e7cd Add generic repo commands for pull and push 2005-07-05 17:50:02 -08:00
Matt Mackall
4c5093f684 Add a function to calculate the outgoing changegroup 2005-07-05 17:49:01 -08:00
maf46@burn.cl.cam.ac.uk
7b2a775c50 Fix zombie files in merge
# HG changeset patch
# User maf46@burn.cl.cam.ac.uk
# Node ID 57667c9b93a5a743e4629d15a0e6bd76699130c3
# Parent  4309b0a5a6010dd2e5811b77d2bc29a51acf290f

Fix zombie files in merge

Keir Fraser observed the following:

> I made a small test case that illustrates the bug in merging changesets
> with 'hg remove's in them:
>
> 1. Create a repository A containing files foo & bar.
> 2. Create clone called B.
> 3. A removes file bar, and commits this removal.
> 4. B edits file foo, and commits this edit.
>
> Now, if B:
>   # hg pull ../A; hg update -m; hg commit
> Then bar remains deleted.
>
> If A:
>   # hg pull ../B; hg update -m; hg commit
> Then bar is resurrected!
>
> It looks as though, when you merge across a branch, any deletions in
> your own branch are forgotten.
> ...
> Fixing this is a must, as zombie files are a real pain. :-)

Keir later patched our local copy of hg as shown below, which fixes
the problem.  I've also enclosed a test which captures the test Keir
outlined...

Files deleted on a branch should not automatically reappear in a merge

Patch notes:
 1. The first chunk does not change behaviour, but cleans up the code
    to more closely match check of 'force' in the second chunk. I
    think it makes the code clearer.
 2. The second chunk fixes two bugs --
    i.  If we choose to keep a remotely-changed locally-deleted file,
        then we need to 'get' that file. If we choose to delete it
        then no action need be taken (it is already deleted in the
        working manifest). Without this fix, choosing to delete would
        get a Python traceback.
    ii. The test for whether the file was remotely-created is
        insufficient. It is only true if f is not in the common
        ancestor. Otherwise the file was deleted locally, and should
        remain deleted. (this is the most important fix!)


Index: hg/tests/test-merge6
===================================================================
2005-07-04 12:38:34 -08:00
shaleh@speakeasy.net
6e0d7d452c * clean up error handling when user requests to use a non file object
# HG changeset patch
# User shaleh@speakeasy.net
# Node ID 1ae21732349f5b6dba2941609a044d9c365a6fb2
# Parent  d3df6f5c87d045ba97457269261c35c30b04524b
* clean up error handling when user requests to use a non file object
  - use os.path.exists() to verify the item exists
  - use os.path.isfile() to check whether the item is a file or not

diff -r d3df6f5c87d0 -r 1ae21732349f mercurial/hg.py
2005-07-04 11:20:20 -08:00
Matt Mackall
b1602d40de [PATCH] hg tag: local tag support in file .hg/localtags
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[PATCH] hg tag: local tag support in file .hg/localtags

From: Radoslaw Szkodzinski <astralstorm@gorzow.mm.pl>

Support local tags in .hg/localtags

Also minor cleanups in related functions

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

iD8DBQFCyYdJywK+sNU5EO8RAhohAKC2I3U44EXi+k4ofo5AWHBOg+94bgCfcbzs
VQ2yWkPPHZycjtswOBmepa8=
=v5AX
-----END PGP SIGNATURE-----
2005-07-04 11:00:25 -08:00
Matt Mackall
c77de876fa Add username/merge/editor to .hgrc
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Add username/merge/editor to .hgrc

These take priority over the equivalent environment vars
Deprecate HGMERGE, HGUSER, and HGEDITOR in docs
Add ui section to docs
Remove undocumented HG_OPTS
Raise username code out of changelog class
Make tests ignore ~/.hgrc

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

iD8DBQFCyM5NywK+sNU5EO8RAuU7AJ9zKk1TFrJXHM04jOOJJeBSp8jlTgCeP+tr
qwGFd+WaNqTepZ0wun5g9Uc=
=QEBu
-----END PGP SIGNATURE-----
2005-07-03 21:51:09 -08:00
mpm@selenic.com
c7c6ca830d [PATCH] hg revert
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[PATCH] hg revert

From: Bryan O'Sullivan <bos@serpentine.com>

Add revert command.

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

iD8DBQFCx2BaywK+sNU5EO8RAigMAKCrvgTtIDuirCsMVlbiTMqaJy3UNgCdEcTL
hMN1X8FZi6sH+NjUdr9sYBg=
=i58L
-----END PGP SIGNATURE-----
2005-07-02 19:49:46 -08:00
mpm@selenic.com
4394004b4a Remove all remaining print statements
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Remove all remaining print statements

Convert most prints to ui.warn or ui.write
Pass a write function into transactions

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

iD8DBQFCx1Q3ywK+sNU5EO8RAqSTAJwM5t/m+JOlf2ZXOjuItCSdFiubcwCdFm3G
HoicikSYpTgfCj2pIRfyLjo=
=Loqo
-----END PGP SIGNATURE-----
2005-07-02 18:57:59 -08:00
mpm@selenic.com
ecca3da73a Actually warn on pulling from an unrelated repository
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Actually warn on pulling from an unrelated repository

add some comments to findincoming
track the base nodes of the fetch set
report if the base set only contains nullid
add a test case

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

iD8DBQFCx0yLywK+sNU5EO8RAlK6AJ9J/GKPpYSMzTqmguXPWOISJ+zY5gCghd+j
ClLpn0dKZnB46dh0F8zhuuk=
=emNb
-----END PGP SIGNATURE-----
2005-07-02 18:25:15 -08:00
mpm@selenic.com
be3df7015c Remove empty directories on update
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Remove empty directories on update

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

iD8DBQFCxyVoywK+sNU5EO8RAklKAKCzSUhuFClkHN85qlnDp5iVscZbtgCeJVwx
dqaqG20GjPMWBg0d1ggI/ro=
=o2Uv
-----END PGP SIGNATURE-----
2005-07-02 15:38:16 -08:00
mpm@selenic.com
cfb252ef59 Handle unknown files better on update
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Handle unknown files better on update

If we spot an unknown file that's identical to one that's in the
update, we get the updated one so that it shows up in the dirstate
properly.

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

iD8DBQFCxyFyywK+sNU5EO8RAjmiAKCTgINXMPB1CxHt0OgHYPucfjCS7QCcDpJJ
VgKqZS54hTAWN3jL2yllUhI=
=iPQD
-----END PGP SIGNATURE-----
2005-07-02 15:21:22 -08:00
mpm@selenic.com
40aeb3c129 More whitespace cleanups
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

More whitespace cleanups

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

iD8DBQFCxwm/ywK+sNU5EO8RAnl+AKCg/7ZCW7zIoG0nefksZzgLzgNmFACgnAFz
ZkW0LyZcU/hkFgXoGwo7ktk=
=AW+0
-----END PGP SIGNATURE-----
2005-07-02 13:40:15 -08:00
mpm@selenic.com
6c1bdb9b2f repo.changes: fix duplicate changes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

repo.changes: fix duplicate changes

We need to discard the changed and added lists from dirstate.changes
before adding to them when comparing manifests. Otherwise something
that changed from rev->parent->working dir will appear twice.

Bug spotted by Goffredo Baroncelli <kreijack@libero.it>

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

iD8DBQFCxcT3ywK+sNU5EO8RAivLAJ4gqbWfMnt+BdyGac/ZGduy2KbNegCgncPV
D4ay6Qw9sIodEPjRebvk3GE=
=AZd2
-----END PGP SIGNATURE-----
2005-07-01 14:34:31 -08:00
mpm@selenic.com
af937ff86a Fix dodiff/changes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Fix dodiff/changes

dodiff was failing to pass both nodes to changes
changes was comparing things backwards, resulting in added/deleted confusion
  in dodiff
changes was deleting things from cached manifests, use copy()
changes now sorts output lists

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

iD8DBQFCxZhZywK+sNU5EO8RApZWAJ9mYv1zc7IjXPIMwbVsfroQs8jfBACgn7R7
rTqLTTyIkM1OpL/ebnMtCOY=
=VcIr
-----END PGP SIGNATURE-----
2005-07-01 11:24:09 -08:00
mpm@selenic.com
ace13bb9eb recover: the journal is named 'journal'
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

recover: the journal is named 'journal'

spotted by K Thananchayan <thananck@yahoo.com>

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

iD8DBQFCxXVbywK+sNU5EO8RAmiBAKCgULQVAZ42xuPRyzb3Rrk794LtaACgoLdF
TNtgK/MqF6+EjWNJ5mm2geE=
=m5U3
-----END PGP SIGNATURE-----
2005-07-01 08:54:52 -08:00
mpm@selenic.com
24ce1f4da4 Move dirstate.uniq to util.unique
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Move dirstate.uniq to util.unique

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

iD8DBQFCxQAqywK+sNU5EO8RAsTiAJ9E9/cALe+W8ojtfVdiXXre5dB/9gCeOgxr
mRnVw/WDplkATW5450Pgsug=
=xSfl
-----END PGP SIGNATURE-----
2005-07-01 00:34:50 -08:00
mpm@selenic.com
916122bc8c Fix braindamage in repo.changes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Fix braindamage in repo.changes

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

iD8DBQFCxPRxywK+sNU5EO8RAh/vAJ0buHjZ7w4Y2I6l9FnHl0prmTURrgCbBqOU
cJ6wUXXPaRmQJS4ECFPCZcE=
=WMC4
-----END PGP SIGNATURE-----
2005-06-30 23:44:49 -08:00
mpm@selenic.com
d78c234443 Propagate file list through dodiff
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Propagate file list through dodiff

This speeds up operations like 'hg diff Makefile'. Previously it would
walk the entire directory tree looking for changes. Now it will only
stat Makefile. Further, if Makefile appears untouched, it will skip
reading the manifest.

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

iD8DBQFCxNRyywK+sNU5EO8RAgb6AKC2TzWmRjNsWq0Q9Pa+ppCZ6Y+pdwCfdHUA
UHu024/2Wt6C6WZ5vcWfPbo=
=E35L
-----END PGP SIGNATURE-----
2005-06-30 21:28:18 -08:00
mpm@selenic.com
bb74daf6a1 Refactor diffrevs/diffdir into changes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Refactor diffrevs/diffdir into changes

Add dirstate.changes to replace most of diffdir
Add localrepository.changes to replace diffrevs/diffdir

This code can now efficiently check for changes in single files, and
often without consulting the manifest. This should eventually make 'hg
diff Makefile' in a large project much faster.

This also fixes a bug where 'hg diff -r tip' failed to account for
files that had been added but not committed yet.

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

iD8DBQFCxMxpywK+sNU5EO8RAhzOAJ9VLQJoC+hiRYQtTSPbDhXBEJfQZwCgpDx9
GAwQ9jZHNsgXckBfXNCkJV8=
=hMuc
-----END PGP SIGNATURE-----
2005-06-30 20:54:01 -08:00
mpm@selenic.com
fc6637cb83 Attempt to fix negative revision count from pull
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Attempt to fix negative revision count from pull

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

iD8DBQFCw4yUywK+sNU5EO8RApUkAKCCYTpBG3Wpu15aVeG0iBWE612S5wCgnSBi
PEfXF4NI2O9AqWijOMBq6aM=
=AyGw
-----END PGP SIGNATURE-----
2005-06-29 22:09:24 -08:00
mpm@selenic.com
986879ff2d Fix empty pull bug that appeared this morning
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Fix empty pull bug that appeared this morning

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

iD8DBQFCwxdJywK+sNU5EO8RAuoPAJ4tb9fd1Emm21/HLAEpyntaW2uoHQCfcc8z
J8LB4mVG3gTsvRtiLZBVV/g=
=+2C3
-----END PGP SIGNATURE-----
2005-06-29 13:48:57 -08:00
mpm@selenic.com
0cdd5f0aa9 Change getchangegroup to findincoming
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Change getchangegroup to findincoming

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

iD8DBQFCwuwAywK+sNU5EO8RAoV/AJ9GaoLTKMo2aoycSIZyBt/8r073vQCeK/tO
W1PwSot4HmnmcpR6RVIy9+0=
=PiBt
-----END PGP SIGNATURE-----
2005-06-29 10:44:16 -08:00
mpm@selenic.com
0fb5db6915 Whitespace cleanups
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Whitespace cleanups

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

iD8DBQFCwuubywK+sNU5EO8RAluIAJ98XQpNdZUpSmYKgDmrMRlbL76ZzQCfes0t
rknNUN/PhtyA4bzL646dOz4=
=UyCE
-----END PGP SIGNATURE-----
2005-06-29 10:42:35 -08:00
mpm@selenic.com
1e42f2bba3 change unrelated repository error to a warning
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

change unrelated repository error to a warning

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

iD8DBQFCwZ+xywK+sNU5EO8RAnnjAJ494NZfAdMVP48VegHQ+WeZ05DPogCbBEWC
d3N47FYG87x1CJOh9VzwVCQ=
=lrGp
-----END PGP SIGNATURE-----
2005-06-28 11:06:25 -08:00
mpm@selenic.com
9397a75d94 Disallow merging of unrelated projects
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Disallow merging of unrelated projects

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

iD8DBQFCwZn6ywK+sNU5EO8RAmdeAJ9TAaGSe0nGMdL+Du3AGwm9x28IUgCgpfGG
UunOBkobMVLGdHegnOvQkmQ=
=VwVi
-----END PGP SIGNATURE-----
2005-06-28 10:42:02 -08:00
mpm@selenic.com
9a1b46a47d Use $USERNAME as a fallback for commit
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Use $USERNAME as a fallback for commit

Suggested by Giuseppe Bilotta <bilotta78@hotpop.com>

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

iD8DBQFCwSPvywK+sNU5EO8RAqpYAKCmwfTfeNGCTqy2wuBs/bmtxMKt1ACeIpRo
/vencPT6Z/WNXW+6p9NlZRY=
=jFZ/
-----END PGP SIGNATURE-----
2005-06-28 02:18:23 -08:00
mpm@selenic.com
fa23bbfb7e Better messages for rollback and undo
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Better messages for rollback and undo

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

iD8DBQFCwSBtywK+sNU5EO8RAhNEAJ9MGJxgZjIKegh1TA7++wGbAzkovACgqL3I
k1ii4X5PEWEDcoyOp0VqJn4=
=wzlT
-----END PGP SIGNATURE-----
2005-06-28 02:03:25 -08:00
mpm@selenic.com
255a41b58b Add exception class for repository errors
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Add exception class for repository errors

This gives friendlier errors for repo exceptions

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

iD8DBQFCwRCfywK+sNU5EO8RAg7fAJ9PMka8pJCy7mMTqFFJ5aQFemHpxwCfezPR
cZRAXmbWTTI+/WnVFDjpfM0=
=8crk
-----END PGP SIGNATURE-----
2005-06-28 00:55:59 -08:00
mpm@selenic.com
1bbff51e92 Add initial hook support
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Add initial hook support

This adds the basic hook code as well as pre and post-commit hooks.
Argument passing is by environment variable key/value pairs so that
extra data can be passed over time. File lists will generally not be
passed to hooks as these can be extremely long (>1M).

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

iD8DBQFCwOukywK+sNU5EO8RAsVsAJ9QipR2aKRSSvoRNo+3If6JddUDkwCgkZrM
KEmZpUOxhNHqezFVrHDRTjE=
=aedm
-----END PGP SIGNATURE-----
2005-06-27 22:18:12 -08:00
Thomas Arendsen Hein
a9e1f4b47e Handle errors in .hgtags or hgrc [tags] section more gracefully.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Handle errors in .hgtags or hgrc [tags] section more gracefully.

manifest hash: 85c62e1bf3ad78b243ee60f43c3c577700a8c96d
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFCvp6jW7P1GVgWeRoRAo23AKCZRU22IweynNtf9k3q4pEyqEaozACeMIRV
6tNOkr3h6jTiMZ2bJgPeabg=
=+U5s
-----END PGP SIGNATURE-----
2005-06-26 13:25:07 +01:00
mpm@selenic.com
3173ade5df Minor annotate performance tweaks
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Minor annotate performance tweaks

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

iD8DBQFCvfQeywK+sNU5EO8RAsYSAJ0R8SuWnyQxVgauoaEuezOe3Taq/wCbBnEs
+VG0LNrXnQM9khQyc0+pCeg=
=U5gX
-----END PGP SIGNATURE-----
2005-06-25 16:17:34 -08:00
mpm@selenic.com
00dfb16988 Add 'local' tags
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Add 'local' tags

Local tags are repository-private tags that override the usual tags.
They're not version controlled.

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

iD8DBQFCu3SSywK+sNU5EO8RAlVAAJ9sTyIW2EkzBPSPp+3uU6a+6DUC6QCcD0vE
jiwqhtfCuvG5LLs54LkzamY=
=D9IP
-----END PGP SIGNATURE-----
2005-06-23 18:48:50 -08:00
mpm@selenic.com
8510fbd2d1 rawcommit: do lookup of parents at the appropriate layer
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

rawcommit: do lookup of parents at the appropriate layer

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

iD8DBQFCu2UoywK+sNU5EO8RApdDAJ9Vph6qVyzL++YeXyFC8HKf9ZhkGgCeNc0Y
j2AMu6aWmuLuy2XwztS8gms=
=f8mQ
-----END PGP SIGNATURE-----
2005-06-23 17:43:04 -08:00
mpm@selenic.com
4b67f9b493 rawcommit dirstate tweak
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

rawcommit dirstate tweak

Before this patch, rawcommit can mess up the dirstate unless it is
committing against the current parent.

This patch changes rawcommit, such that when adding a child to some
node other than the current parent, rawcommit does not attempt update
the current dirstate.

This seems easily debatable; it creates an asymmetric behavior for
rawcommit. It means that when doing a rawcommit against the current
parent, there's effectively an implied "hg update" to the newly
created node. When doing a rawcommit against any other node, no such
"hg update" occurs.

The other obvious alternates would be:
1) rawcommit never update the dirstate
2) rawcommit always does an "hg update"...

This patch also includes a test for various uses of rawcommit...

Michael Fetterman


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

iD8DBQFCuymPywK+sNU5EO8RAvdvAKCxW1QZtyOviNfuwO592IaKApwvEACfdrYD
83m/o8oJvRKu3yGvNGHtwfk=
=KbmU
-----END PGP SIGNATURE-----
2005-06-23 13:28:47 -08:00
mpm@selenic.com
0ef8f163ee Permission handling for the other OS
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Permission handling for the other OS

From: K Thananchayan <thananck@yahoo.com>

Preserve exec permission under Windows on existing source files. Not an ideal
solution as there is no way to specify exec permission for a new file.
Nevertheless, this helps working on crossplatform projects.

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

iD8DBQFCuvJeywK+sNU5EO8RAscXAJ40eAHZjTip5to6BGPdoXxxL5gNQQCgl5GT
8S1Ckank5I/0ScGtapZKqTA=
=QrQp
-----END PGP SIGNATURE-----
2005-06-23 09:33:18 -08:00
mpm@selenic.com
20411bdc00 Optimize annotate a bit
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Optimize annotate a bit

Keep the original text around so we don't need to rejoin it
Use slice insert-in-place rather than += to construct new lists
Construct the decorated list with list multiply rather than comprehension

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

iD8DBQFCuca0ywK+sNU5EO8RAtvQAJwOViomGCtlZx/R76i8/CZGvGPqUwCfdybd
nRUv1854GjzCbfygzXfeIes=
=6Q+E
-----END PGP SIGNATURE-----
2005-06-22 12:14:44 -08:00
mpm@selenic.com
c6e599029c Replace difflib with bdiff for annotate
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Replace difflib with bdiff for annotate

This is a quick hack to get bdiff working for annotate, can still be
optimized quite a bit.

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

iD8DBQFCubxGywK+sNU5EO8RAv7RAJ9lTdxRAVqzGs4XnPoZAmx/fbeUZwCfWar2
RqLGipS5JmMOy1pL1ehNxqY=
=KLgM
-----END PGP SIGNATURE-----
2005-06-22 11:30:14 -08:00
mpm@selenic.com
663c3fc4ae Pull from TAH
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Pull from TAH

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

iD8DBQFCuPFxywK+sNU5EO8RAjfzAKC18Zc2EOkXhy1zcpgGnyPHnFMdmgCfW5Ut
I5HSWqZMt8H0WJx1Or7ajNc=
=27D5
-----END PGP SIGNATURE-----
2005-06-21 21:04:49 -08:00
mpm@selenic.com
b2a320abcc Fix typo in merging new files
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Fix typo in merging new files

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

iD8DBQFCuOvVywK+sNU5EO8RArovAJ4ua9EhnO8wWfKRZ36E6F4Wrv5JPACghCXn
sHr/TSkxdy48OUVkhTbhhhQ=
=poww
-----END PGP SIGNATURE-----
2005-06-21 20:40:53 -08:00
mpm@selenic.com
5e62f2ce10 [PATCH] rename under the other OS
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[PATCH] rename under the other OS

From: K Thananchayan <thananck@yahoo.com>

Rename fails under windows if dest file exists. This
patch add a rename method to util module that removes
the dest file and retries if initial attempt fails.

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

iD8DBQFCuNzDywK+sNU5EO8RAsPBAJ9NQN3bTuJvTem5x+utGnoMkhYc0QCbBFSJ
PoMP69H1UnVE6drFlnlFE0s=
=pePw
-----END PGP SIGNATURE-----
2005-06-21 19:36:35 -08:00
mpm@selenic.com
d9341c39ce [PATCH] Repo locator fix for the other `OS'
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[PATCH] Repo locator fix for the other `OS'

From: K Thananchayan <thananck@yahoo.com>

The following patch modifies repo locator to behave
properly under windows.

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

iD8DBQFCuNv5ywK+sNU5EO8RAvD9AJ9mYSzmn99sc2vNtw68sPaKKWe2UQCgoiLd
1q1t+JMs57+I0LUdwrwsEDw=
=dlmm
-----END PGP SIGNATURE-----
2005-06-21 19:33:13 -08:00
mpm@selenic.com
1a1ca5cd0e [PATCH] file seperator handling for the other 'OS'
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[PATCH]  file seperator handling for the other 'OS'

From: K Thananchayan <thananck@yahoo.com>

The following patch maintains repo root relative source file names in
canonical form (with '/' as file seperator).

Mercurial calls os.path.join, os.path.normpath, os.path.walk that use
platform's file seperator. This patch does not change seperator in
these circumstances (except when the result refer to source files).

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

iD8DBQFCuNuBywK+sNU5EO8RAhAZAKCV8cz11+rdof9n1tHb0uDScF34GgCeITNi
4aVikToPXqXyReN9kFP5pnY=
=xcV5
-----END PGP SIGNATURE-----
2005-06-21 19:31:13 -08:00
mpm@selenic.com
0ae2f84e6d Minor tweak to binary mode patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Minor tweak to binary mode patch

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

iD8DBQFCuNr1ywK+sNU5EO8RAs83AJ9i+yafrjWWjWm1lTwCr0fO8cAU+gCghmxg
+S1W1KuMzgxJAtuhq6h6uBk=
=9JhP
-----END PGP SIGNATURE-----
2005-06-21 19:28:53 -08:00
mpm@selenic.com
a88586e98c [PATCH] file type fixes for the other 'OS'
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[PATCH] file type fixes for the other 'OS'

From: K Thananchayan <thananck@yahoo.com>

Filetype fixes:
All working files and files in the repository are processed as binary.
.hgignore is read as text when constructing ignorelist as this file
is intended to be edited.

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

iD8DBQFCuNoRywK+sNU5EO8RAjarAJ9ScUoFL1A7mpO7qorCy6okhi0nggCcDgpp
dfDl4dALGQA0PqXqtI+T5gU=
=IVxr
-----END PGP SIGNATURE-----
2005-06-21 19:25:05 -08:00
mpm@selenic.com
ee0f69d039 [PATCH] Removal of a file added by merging branches
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[PATCH] Removal of a file added by merging branches

From: Michael A Fetterman <Michael.Fetterman@cl.cam.ac.uk>

Fixing a bug where removal of a file which is added when doing a merge
would cause python exception to be thrown.

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

iD8DBQFCuNjLywK+sNU5EO8RAo44AJ4mvjsJcYOj/EmVDFrdkK3D3WHFSwCffxfV
cRl8mXc252/oRcYaMZbgrlg=
=S5x6
-----END PGP SIGNATURE-----
2005-06-21 19:19:39 -08:00
mpm@selenic.com
bc5ccf31e3 [PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[PATCH] Don't prompt user for keep-vs-delete when the merge is about to be aborted
From: Michael A Fetterman <Michael.Fetterman@cl.cam.ac.uk>

If an "hg update" is attempted across branches, it is aborted with an
error message, basically saying that "update -m" is required.  Don't
prompt the user for "keep vs delete" kinds of questions before deciding
to abort.

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

iD8DBQFCuNeDywK+sNU5EO8RAu2BAJwNWXXN2L+4TnOUGaOe9iBj6CgOYgCfRKIE
RF5czx2UQ2pSIP119xzq9mQ=
=Akj6
-----END PGP SIGNATURE-----
2005-06-21 19:14:11 -08:00
mpm@selenic.com
46f265df70 remove double assignment
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

remove double assignment

spotted by Goffredo Baroncelli

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

iD8DBQFCuNXhywK+sNU5EO8RAh9yAJ0aVTnxsumDAdF3JORp1pDebxeE8wCgisdG
vf/JwxHbQEqGrefU1nbs928=
=NDGW
-----END PGP SIGNATURE-----
2005-06-21 19:07:13 -08:00
mpm@selenic.com
d5711e92d7 [PATCH]: Typo in localrepository.update
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[PATCH]: Typo in localrepository.update

From: Goffredo Baroncelli <kreijack@libero.it>

I think that there is an error in the method update() of the class
localrepository. The variable 'm2n' was used instead of 'man'; so the
parent2 flags is computed instead of the ancestor flags.

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

iD8DBQFCuNWpywK+sNU5EO8RAv9ZAKCxwbd242xZQ1CCrW2WDdQ4gclKtACghXYl
7j1YTRpINItwdXzak3cBS60=
=+Tf8
-----END PGP SIGNATURE-----
2005-06-21 19:06:17 -08:00
mpm@selenic.com
1cfde4e8cc [PATCH] Merging files that are deleted in both branches
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[PATCH] Merging files that are deleted in both branches
From: Michael A Fetterman <Michael.Fetterman@cl.cam.ac.uk>

OK, attached is an improved version of this patch...

When I went back through it, I discovered that the prior version was wrong
when doing real merges (as opposed to jumping between revisions that have
a simple linear relationship).  So that's been addressed here, too.

> Here's an hg changeset patch that deals with simultaneous deletion of a
file
> in both the working directory and in a merged branch.
>
> Test case included in the patch.

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

iD8DBQFCuNF8ywK+sNU5EO8RArtdAJ9syw/JXRZzP1sxnEYXzZywkJLAPACeKpqL
5osA3AggrCbbSLTNcYVXJ8U=
=T5Ik
-----END PGP SIGNATURE-----
2005-06-21 18:48:28 -08:00
mpm@selenic.com
659dbef2f6 [PATCH] Merging identical changes from another branch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[PATCH] Merging identical changes from another branch

From: Michael A Fetterman <Michael.Fetterman@cl.cam.ac.uk>

The issue comes up when a local uncommitted *new* file (i.e. not in the
current manifest) is being merged with an identical file from a branch.
Since the file is not in the current manifest (it's either in the
current "to-be-added" list, or in the "unknown" state), there's no
(local) node from which to create a mergepoint.

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

iD8DBQFCuM/1ywK+sNU5EO8RAn7xAKCJoH/CgzVK4h4xPJDrd2lY9XOINACgmt01
92uuMswZXcoCchQAaxew7C0=
=qRsk
-----END PGP SIGNATURE-----
2005-06-21 18:41:57 -08:00
mpm@selenic.com
f0a7e9bd41 Check if repository exists
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Check if repository exists

From: Goffredo Baroncelli <kreijack@libero.it>
Subject: Re: Trivial: in remoterepository.__init__ check if the repository
        exist

I hope that this is correct :-)

Another typo, another patch, tank to Peter Stamfest and Radoslaw Szkodzinski.

The patch is trivial: adds a check in the body of the init method of the
+remoterepository
class. Before if the path didn't exist, hg would not raise any error.

Test manually performed after the patch has been merged:

test:                                                     result
create a new repository from another local repository     OK ( no problem )
create an empty repository                                OK ( no problem )
pull from a not existent repositary                       OK ( raise an error )

(error message tweaked by mpm)

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

iD8DBQFCuM0gywK+sNU5EO8RAsnGAJ42HE3m01tlGqrIR3GVfuhvCjEJkgCfffvp
bEhfvjaiAdBV50HMULq8N00=
=QDHW
-----END PGP SIGNATURE-----
2005-06-21 18:29:52 -08:00
mpm@selenic.com
11f489a590 [PATCH] (3/4) Removing an added file
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[PATCH] (3/4) Removing an added file

From: Michael A Fetterman <Michael.Fetterman@cl.cam.ac.uk>

Here's an hg changeset that deals with "hg add"ing and then "hg remove"ing
a file without ever committing it.  Previously, this caused a python
exception
at commit time.

Test case included in the patch.

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

iD8DBQFCuMPtywK+sNU5EO8RAuxMAKCmeMLqOUBmUfCfbQgYOAysOvKkwgCfcJai
2My0M7KqhwnJSbZXbGIOcow=
=N7N0
-----END PGP SIGNATURE-----
2005-06-21 17:50:37 -08:00
Thomas Arendsen Hein
1f53e34055 Allow hgrc's proxy host and $http_proxy env var to start with http://
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Allow hgrc's proxy host and $http_proxy env var to start with http://

manifest hash: 5bf4bb43606f3e5544d55be886502ab5a61f9ff3
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFCtcR6W7P1GVgWeRoRArk0AKCgHpelPjAKjbzh3iifZayAhovm+gCeL0hl
XU7LBUrK2Z2qQHN0w9I8XUk=
=QaAW
-----END PGP SIGNATURE-----
2005-06-19 20:16:10 +01:00
Thomas Arendsen Hein
1f172db45e Allow override of HTTP_PROXY, http_proxy and no_proxy; make no_proxy work.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Allow override of HTTP_PROXY, http_proxy and no_proxy; make no_proxy work.

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

iD8DBQFCtIp/W7P1GVgWeRoRAgNRAJ4//Ptbq9Cba7S2L5ltvP92gcijZQCeKuU/
S/togHQXp34v2ypVH+8wyP4=
=jpn2
-----END PGP SIGNATURE-----
2005-06-18 21:56:31 +01:00
Thomas Arendsen Hein
d126bd1067 Fixed problems with extra spaces around tags in .hgtags
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Fixed problems with extra spaces around tags in .hgtags

manifest hash: 2a40f403d5d7d9c4d39e52fa6edefa74d5797167
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFCspTvW7P1GVgWeRoRAg9PAJ9OWdUii+qO+U5ioaAbkFeIROA/7gCdGgau
ZP8jmI1h95ZK3KS/QlQMeQ4=
=lRFd
-----END PGP SIGNATURE-----
2005-06-17 10:16:31 +01:00