Commit Graph

2237 Commits

Author SHA1 Message Date
Thomas Arendsen Hein
8ab8678cb0 Minor fix for revert: No need to make a backup when forgetting added files.
echo foo > foo && hg add foo && hg revert foo
creates foo.orig, though foo is not changed or deleted.
2006-04-03 21:01:33 +02:00
Vadim Gelfer
0279e68d84 small changes to revert command.
fix bug 93: work with files that are in target manifest but not
dirstate.
2006-04-03 10:02:09 -07:00
Alexis S. L. Carvalho
c5f6f508f5 bash_completion: completion for commands provided by extensions
Make the bash_completion function call _hg_cmd_$cmd to generate
completion candidates for $cmd if that function exists.

Add basic completion functions for:

- mq:
  - qpop
  - qpush
  - qdelete
  - qsave
  - qcommit
  - strip

- hbisect:
  - bisect

- patchbomb:
  - email

- gpg:
  - sign
2006-04-03 14:56:00 +02:00
Thomas Arendsen Hein
ec1964014b Don't enter an endless loop if remote hg doesn't answer, show remote noise.
The endless loop is not only triggered if the remote shell is too noisy, but
even if the local ssh command dies due to an error.
2006-04-02 22:12:56 +02:00
Alexis S. L. Carvalho
bb83bf89db bash_completion: small optimization
Right now we always call "hg help $cmd" to get the canonical name of $cmd
(i.e. to go from "co" to "update").

This patch optimistically assumes that $cmd is already the canonical form
and tries to generate completions for it.  If that fails, it falls back
to canonicalizing $cmd and trying again.

This means that:

- if a command or alias is explicitly handled by the
  _hg_command_specific function, things get somewhat faster

- as long as the canonical $cmd is handled by _hg_command_specific, all
  its aliases and abbreviations are also handled.
2006-04-02 18:20:52 +02:00
Thomas Arendsen Hein
a402f37fa4 Tell the user the real "hg update -C" command, not just "-C" when aborting. 2006-04-02 18:16:06 +02:00
Thomas Arendsen Hein
4eb8d973d3 Merged with crew. 2006-04-02 08:19:41 +02:00
Thomas Arendsen Hein
7bd3e367e7 Make 'hg tags -q' only list tag names without revision numbers and hashes,
and change bash_completion to use this.
2006-04-01 23:57:24 +02:00
Alexis S. L. Carvalho
b5be2f0b92 add --options to debugcomplete and change bash_completion to use it
make debugcomplete print one item per line (this is not needed for the
bash_completion script, but should be easier to use in other scripts)
2006-04-01 22:50:12 +02:00
Thomas Arendsen Hein
ee03ece428 Group changes done by the same developer on the same with --style=changelog
Changeset and tags are appended to the change message for non-quiet and
non-verbose output, so grouping works.

Fixes last bit of issue110.
2006-04-01 21:37:08 +02:00
Thomas Arendsen Hein
f72c380299 Don't print filenames in braces for changelog style. 2006-04-01 20:56:55 +02:00
Thomas Arendsen Hein
db17ec404e Web site and wiki are now the same. 2006-04-01 19:11:59 +02:00
Thomas Arendsen Hein
51c7d29d15 Don't abort when backup files already exist. Don't allow alternative names.
Rationale:
- When the user wants to revert, he shouldn't be stopped from doing
  this just because some old backups will be overwritten.
- To not clobber important files by accident, alternative names for backup
  files were disabled. As the backup target now has a fixed name, the user
  doesn't have to be informed about the backup copy (unless --verbose)
2006-04-01 11:58:50 +02:00
Vadim Gelfer
16c52d7c61 support nested repositories.
mercurial will not recurse into a subdirectory that contains a .hg
directory. it is treated as a separate repository.
2006-03-31 17:00:09 -08:00
Vadim Gelfer
76b01baaea forgot to rerun tests after changed backup extension to .orig.
thomas a.h. found this.
2006-03-31 10:52:56 -08:00
Vadim Gelfer
cd9a2c218d rewrite revert command. fix issues 93, 123, 147.
new version does these things:

- saves backup copies of modified files (issue 147)

- prints output like other commands, and errors when files not found
  (issue 123)

- marks files added/removed (issue 93)
2006-03-31 10:37:25 -08:00
Matt Mackall
8afffd9943 ssh: skip noise generated by remote shell
we send a dummy command with known output to get in sync
2006-03-31 03:25:35 -06:00
Vadim Gelfer
a666e3186e work around python bug on solaris 10.
write to file opened mode 'a+' should write to end of file and update
offset pointer, but does not (solaris 10 has python 2.3.3).
fix is to always seek.
2006-03-30 19:28:41 -08:00
Vadim Gelfer
74afe6ba38 more windows fixes. 2006-03-30 18:35:52 -08:00
Vadim Gelfer
08cb794787 clean up lee's windows testpid fix. 2006-03-30 18:27:04 -08:00
Lee Cantey
5f23e95446 Fixes to testpid() for Windows.
Handle processes that no longer exist and processes that belong to another user.

Enables the lock breaking changes from 0ab4c12ad060 and subsequently "fixes" the left over locks reported in bug 112.
2006-03-30 18:20:08 -08:00
Thomas Arendsen Hein
6c28fa509f Use [ x = y ] instead of [ x == y ] in shell scripts. 2006-03-30 18:43:46 +02:00
Thomas Arendsen Hein
f0fd01b209 New option -i/--ignored for 'hg status' to show ignored files.
localrepo.changes() now returns an additional list of ignored files if
it is called with show_ignored=True.
2006-03-29 22:58:34 +02:00
Thomas Arendsen Hein
7563660d88 Fix hg push and hg push -r sometimes creating new heads without --force.
Fixing issue179.

The algorithm checks if there not more new heads on the remote side than heads
which become non-heads due to getting children.

Pushing this repo:
    m
   /\
3 3a|
|/  /
2 2a
|/
1

to a repo only having 1, 2 and 3 didn't abort requiring --force before.

Added test cases for this and some doc strings for used methods.
2006-03-29 22:35:21 +02:00
Vadim Gelfer
5be632c4fa merge with crew. 2006-03-29 10:31:58 -08:00
Vadim Gelfer
dfe0de6855 add merge command. means same thing as "update -m".
repo.addchangegroup method now returns number of heads modified and added,
so command line can tell whether update or merge needed.  this makes
tiny change to ssh wire protocol, but change is backwards compatible.

pull command now returns 0 if no changes to pull.
2006-03-29 10:27:16 -08:00
Vadim Gelfer
a8b4fd1116 merge with crew. 2006-03-29 10:16:04 -08:00
Thomas Arendsen Hein
f1f4d4860e Catch HTTPException when reading from remote http repository.
If the server dies very early, an httplib.IncompleteRead exception may be
raised, because httplib can't read a single byte. Catching all HTTPException
subclasses here will prevent ugly backtraces for similar things, too.
2006-03-29 12:45:33 +02:00
Vadim Gelfer
22c33ffb7d merge with crew. 2006-03-28 09:26:38 -08:00
Eung-Ju Park
e46cb8a4f8 Fix error on Windows if "hg log | more" exits. 2006-03-28 09:24:29 -08:00
Vadim Gelfer
0597d30d8f merge with crew. 2006-03-28 09:04:33 -08:00
TK Soh
12159bb34c add missing filename title to gitweb's filelog page 2006-03-28 19:02:00 +02:00
Vadim Gelfer
959e983875 fix backtrace printed when cannot get lock.
change lock error handling code so exceptions have useful info and
exception handling in one place.

add test case for when cannot get lock.
2006-03-28 09:01:07 -08:00
TK Soh
8a6dd65e43 don't overquote description on gitweb summary page (issue 184) 2006-03-28 18:54:00 +02:00
Vadim Gelfer
6f9a8ca88b fix appendfile problem on macos.
when i open file with mode 'a+' on linux, seek position is 0.
on macos seek position is end of file instead.  not documented.
2006-03-27 08:31:33 -08:00
Thomas Arendsen Hein
50b1410ead Fix broken hgignore tests due to full path showing up in output. 2006-03-26 22:54:05 +02:00
Thomas Arendsen Hein
2aaeef325d Don't ignore everything if all hgignore files are empty. 2006-03-26 22:32:44 +02:00
TK Soh
27ace0dd4d show committer's name on gitweb's summary page (issue 137) 2006-03-26 07:28:52 -08:00
Thomas Arendsen Hein
694e91d66d Show reason why an ignore file can't be read and state that it is skipped. 2006-03-25 10:31:06 +01:00
mcmillen@cs.cmu.edu
eb8285512e On error parsing hgignore file, print the correct filename. 2006-03-25 10:12:23 +01:00
mcmillen@cs.cmu.edu
33e91a5d4e Add warning if user-configured hgignore file isn't found 2006-03-25 10:02:39 +01:00
mcmillen@cs.cmu.edu
dc6517d798 Implementation of per-user .hgignore.
Reference: http://www.selenic.com/mercurial/bts/issue166

If the [ui] section of .hgrc contains keys like "ignore" or
"ignore.something", the values corresponding to these keys are
treated as per-user hgignore files. These hgignore files apply to all
repositories used by that user.
2006-03-24 20:18:02 +01:00
Thomas Arendsen Hein
639ae71888 Calling revlog.addgroup with an empty changegroup now raises RevlogError.
The empty changegroup can be caused by remote servers dying soon after
findincoming, and further code in pull assumes (correctly) that there are
new changesets.
2006-03-24 19:51:05 +01:00
Lee Cantey
da54525c97 Windows py2exe version didn't handle names given to templatepath() correctly 2006-03-24 10:33:18 -08:00
Vadim Gelfer
73fed42d5f add benoit's test for issue148. 2006-03-24 10:31:23 -08:00
Vadim Gelfer
da16d78bcf forgot to add new module. 2006-03-24 09:23:11 -08:00
Vadim Gelfer
0713422393 fix race in localrepo.addchangegroup.
localrepo.addchangegroup writes to changelog, then manifest, then normal
files.  this breaks access ordering.  if reader reads changelog while
manifest is being written, can find pointers into places in manifest
that are not yet written.  same can happen for manifest and normal files.

fix is to make almost no change to localrepo.addchangegroup.  it must
to write changelog and manifest data early because it has to read them
while writing other files.  instead, write changelog and manifest data
to temp file that reader cannot see, then append temp data to manifest
after all normal files written, finally append temp data to changelog.

temp file code is in new appendfile module.  can be used in other places
with small changes.

much smaller race still left.  we write all new data in one write call,
but reader can maybe see partial update because python or os or filesystem
cannot always make write really atomic. file locking no help: slow, not
portable, not reliable over nfs.  only real safe other plan is write to
temp file every time and rename, but performance bad when manifest or
changelog is big.
2006-03-24 09:08:12 -08:00
Thomas Arendsen Hein
bddf3b4cc7 Added missing gettext import to changegroup.py. 2006-03-24 15:19:08 +01:00
Thomas Arendsen Hein
9a771f7b4c Don't mention deprecated HGEDITOR variable in the help text of commit. 2006-03-24 15:03:15 +01:00
mcmillen@cs.cmu.edu
9d80060582 Spelling fix: "commited" -> "committed" 2006-03-24 14:53:23 +01:00