Commit Graph

13113 Commits

Author SHA1 Message Date
Matt Mackall
39437f5a68 templater: give slightly nicer error for unknown map entries 2010-12-20 12:09:00 -06:00
Kevin Bullock
5c61f5f136 mq: update .hgsubstate if subrepos are clean (issue2499)
This patch prevents MQ from creating an inconsistent subrepo state. If
the .hgsub file has been changed, and none of the subrepos have
uncommitted changes, creating or updating a patch (using qnew, qrefresh,
or qrecord) will update .hgsubstate accordingly.

If any subrepos _do_ have uncommitted changes, qnew/qrefresh/qrecord
will abort.

Thanks to pmezard for proposing this solution.
2010-12-07 22:14:43 -06:00
Kevin Bullock
ed11f126c8 backout 0880564992de 2010-12-07 22:14:43 -06:00
Erik Zielke
d12bb06bf6 subrepo: backout 9f2d8e1439d7
backing out 9f2d8e1439d7 because it introduced a bug in
.hgsubstate handling.
2010-12-17 13:38:15 +01:00
Matt Mackall
b6a045b969 merge with i18n 2010-12-20 12:08:56 -06:00
Matt Mackall
02e03e68fb merge with stable 2010-12-20 12:08:50 -06:00
Mads Kiilerich
298ff06c2d merge with stable 2010-12-18 22:06:11 +01:00
Mads Kiilerich
97213d6b00 https: warn when server certificate isn't verified
Mercurial will verify HTTPS server certificates if web.cacerts is configured,
but it will by default silently not verify any certificates.

We now warn the user that when the certificate isn't verified she won't get the
security she might expect from https:
  warning: localhost certificate not verified (check web.cacerts config setting)

Self-signed certificates can be accepted silently by configuring web.cacerts to
point to a suitable certificate file.
2010-12-18 21:58:52 +01:00
Adrian Buehlmann
9638578b5c fncachestore: copy dh directory before the manifest
Before this patch, the copy order on clone was:

  requires
  00changelog.i
  store\data
  store\00manifest.d
  store\00manifest.i
  store\00changelog.d
  store\00changelog.i
  store\dh
  store\fncache

Which provides a theoretical non-zero probability of a race during clone where
a very early reader might see a repository with missing revlog files if it sees
00changelog.i before all files inside dh have been copied.

The dh directory is similar to the data directory -- just for files with long
names (which are hashed). The manifest refers to files in data *and* dh, so dh
should be copied before the manifest.

This patch improves the copy order to:

  requires
  00changelog.i
  store\data
  store\dh
  store\fncache
  store\00manifest.d
  store\00manifest.i
  store\00changelog.d
  store\00changelog.i

I'm putting fncache to before the manifest while I'm at it, since fncache
provides a mechanism to enumerate all repository files without visiting the
manifest revisions. fncache depends only on data and dh.

Note that data must be copied first, since copying data triggers the creation
of the repository write lock in the destination repo (see hg.clone).
2010-12-17 10:40:26 +01:00
Matt Mackall
6ecba9b7c1 merge with i18n 2010-12-20 12:05:50 -06:00
Greg Ward
885d349b11 merge: document some internal return values. 2010-12-13 11:46:31 -05:00
Matt Mackall
940fa28a3f check-code: catch os.path.relpath 2010-12-16 14:50:37 -06:00
Matt Mackall
cdcb8c0f47 check-code: catch "except as" 2010-12-16 14:50:36 -06:00
Matt Mackall
ad6fe18c9c tests: eliminate fast-forward merge in test-tag 2010-12-16 14:50:27 -06:00
Martin Geisler
b50a0282f6 i18n: merge with stable 2010-12-10 12:51:37 +01:00
Martin Geisler
e202cdedd7 i18n-da: synchronize with 3161970145e5 2010-12-10 12:48:57 +01:00
Matt Mackall
6bcc439bb1 merge with stable 2010-12-08 13:12:12 -06:00
Matt Mackall
4dbec2c466 build: don't delete precious version information on 'make clean'
setup.py rebuilds version information if it's locally available,
regardless if file already exists.
2010-12-08 11:18:26 -06:00
Brodie Rao
1d9f172d6c record: move copystat() hack out of util.copyfile() and into record
226847bf9cab updated copyfile to also copy over atimes and
mtimes. That behavior is specifically to trick editors into thinking
files that hg record has modified haven't changed. We don't really
care about preserving times in the general case.
2010-12-07 20:03:05 +11:00
Dan Villiom Podlaski Christiansen
1c69d6eb9a util: make atomicfiles closable 2010-12-07 16:03:42 +01:00
Brodie Rao
7b0127774f bookmarks: create undo.bookmarks using repo.opener instead of util.copyfile
This more closely matches how the other undo files are created, and we
don't care about settings permissions or times on the file, which can
fail if the user running hg doesn't own the file.
2010-12-07 20:03:04 +11:00
Brodie Rao
08a14dad90 archival: don't set gzip filename header when there's no filename
This mainly affects hgweb, which can generate tar.gz archives without
filenames. Without this change, the header would be set to ".gz",
which can confuse Safari into extracting the file and renaming it to
"gz" when "Open 'safe' files after downloading" is enabled.

file(1) before:

hg-crew-439421eab08d.tar.gz: gzip compressed data, was ".gz", last modified: Thu Dec  2 11:46:20 2010, max compression

after:

hg-crew-439421eab08d.tar.gz: gzip compressed data, last modified: Thu Dec  2 11:46:20 2010, max compression
2010-12-07 19:47:53 +11:00
Kevin Bullock
6d031e2cdb tag: abort if not at a branch head (issue2552)
Since it's usually only desirable to make tag commits on top of branch
heads, abort if the working dir parent is not a branch head. -f/--force
may be passed to commit at a non-head anyway.

Does not abort if working dir parent is a named branch head but not a
topological head.
2010-12-06 22:04:10 -06:00
Kevin Bullock
90e6b3e885 tag: fix uncommitted merge check and error message (issue2542)
This patch corrects the check for tagging on an uncommitted merge. We
should never commit a new tag changeset on an uncommitted merge, whether
or not --rev is specified. It also changes the error message from:

  abort: cannot partially commit a merge (do not specify files or patterns)

to the much more accurate (and terse):

  abort: uncommitted merge

Local tags are ok.
2010-12-07 08:02:54 +01:00
Kevin Bullock
85d737621f tag: don't check .hgtags status if --local passed
Local tags don't create a commit, so we don't need to check the status
of .hgtags.
2010-12-13 21:20:30 -06:00
Steve Borho
1493f6fe1b util: work around behavior change in Python 2.7.1 2010-12-13 11:51:01 -06:00
Martin Geisler
dcc33331f5 merge stable heads in crew and main 2010-12-13 11:52:21 +01:00
Matt Mackall
be1d11e804 hook: fix import path handling for repo=None 2010-12-10 19:18:02 -06:00
Alexander Solovyov
e86de517fe hook: assume relative path to hook is given from repo root 2010-12-07 15:27:04 +01:00
Matt Mackall
eec34ddf7c subrepo: backed out changeset 9ce26f91f137 2010-12-10 19:08:17 -06:00
Mads Kiilerich
9933c7a60f subrepo: initialize subrepo relative default paths relative to their root 2010-12-10 01:30:16 +01:00
Mads Kiilerich
9772d9af5a merge: fast-forward merge with descendant
issue2538 gives a case where a changeset is merged with its child (which is on
another branch), and to my surprise the result is a real merge with two
parents, not just a "fast forward" "merge" with only the child as parent.

That is essentially the same as issue619.

Is the existing behaviour as intended and correct?

Or is the following fix correct?

Some extra "created new head" pops up with this fix, but it seems to me like
they could be considered correct. The old branch head has been superseeded by
changes on the other branch, and when the changes on the other branch is merged
back to the branch it will introduce a new head not directly related to the
previous branch head.

(I guess the intention with existing behaviour could be to ensure that the
changesets on the branch are directly connected and that no new heads pops up
on merges.)
2010-12-07 03:29:21 +01:00
Steve Borho
6796ac95d5 record: teach parsepatch() about non-git style headers
These changes are not useful to record itself, since it is hard coded
to always generate git style diffs.  But it makes parsepatch() more
generally useful for parsing normal patch files.
2010-12-08 22:14:18 -06:00
Eric Eisner
8113ebb989 template: add showbranch template for {branch}
Like showbranches, but always yields exactly one branch. Replaces the less
correct {branches|nonempty}.
2010-12-13 10:30:15 -05:00
Eric Eisner
44d5bac715 subrepo: drop arguments unsupported by old git 2010-12-06 21:17:27 -05:00
Eric Eisner
6bdb7bc8d7 subrepo: work around old git's remote naming scheme
Older git versions use 'origin/master'
Current git uses 'remotes/origin/master'
2010-12-06 21:17:27 -05:00
Eric Eisner
6c1163de81 subrepo: use environment variable instead of git commit's --date
Older git versions do not have a --date flag.
2010-12-06 21:17:27 -05:00
Eric Eisner
11aba86609 subrepo: parse git status's human-readable output
Older git versions do not have a machine-readable output, but the default
format has not changed over time.
2010-12-06 21:17:27 -05:00
Eric Eisner
d9f3d5258c subrepo: use subprocess's cwd instead of git's --work-tree
Some older git commands (e.g. git merge) do not properly recognize the
--work-tree argument, so abstract that away from git.
2010-12-06 21:17:27 -05:00
Eric Eisner
bdf59c0067 test-subrepo-git.t: make gitroot pushable earlier
Older git versions get confused when the git repo becomes bare.
2010-12-06 21:17:27 -05:00
Eric Eisner
3cd880088d test-subrepo-git.t: silence git output
Older git versions have different ideas of what output is considered quiet,
so the tests can be more version-blind.
2010-12-06 21:17:27 -05:00
Matt Mackall
4b21988877 bdiff: Fix bogus NULL return 2010-12-06 16:59:43 -06:00
Matt Mackall
338e4487bf bdiff: dynamically allocate hunks
Make the hunk list a singly-linked list rather than a large array.
2010-12-06 16:42:48 -06:00
Matt Mackall
ff87cdb9b3 merge with stable 2010-12-06 16:03:00 -06:00
Arne Babenhauserheide
ed51fada87 i18n-de: translated strings for the purge extension 2010-12-04 19:28:15 +01:00
Patrick Mezard
744f417d4c patch: write .rej files without rewriting EOLs
Do not pass reject file content to patchfile.writelines() to:
- Avoid line endings transformations
- Avoid polluting overriding implementations with unrelated data. They should
  override write_rej() to deal or ignore reject files properly.

Bug report, analysis and original patch and test by
Shun-ichi GOTO <shunichi.goto@gmail.com>
2010-12-03 11:40:30 +09:00
Wagner Bruna
0d012abbee i18n-pt_BR: synchronized with d3c56a9887e7 2010-12-02 01:28:38 -02:00
Matt Mackall
bfd7e8ec89 Added signature for changeset 3bfdb3ab811e 2010-12-01 18:46:20 -06:00
Christian Ebert
7130ab35da keyword: copy: when copied source is a symlink, follow it
1) hg cp symlink copy -> copy is a symlink.
2) cp symlink copy; hg cp -A symlink copy -> copy is a regular file.

In the second case we have to follow the symlink to its target
to find out whether we have to unexpand keywords in the copy.

Add test covering the case where the copied link's target is ignored
by keyword but has content which would match the regex for expanded
keywords to check whether we indeed leave the destination alone.
2010-12-01 10:51:49 +01:00
Adrian Buehlmann
31d1e36f3f makedirs: abort if parent == name (issue2531)
catches unknown drive letters on Windows
2010-12-01 21:15:31 +01:00