1
0
mirror of https://github.com/git/git.git synced 2024-10-22 13:39:05 +02:00
Commit Graph

1817 Commits

Author SHA1 Message Date
Felipe Contreras
34d75e78f4 remote-hg: trivial cleanups
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28 07:59:30 -07:00
Felipe Contreras
9529cce86e remote-hg: ensure remote rebasing works
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28 07:59:30 -07:00
Felipe Contreras
68b1611678 remote-hg: upgrade version 1 marks
As suggested by Jed Brown; there's no need to re-import all the commits.

Cc: Jed Brown <jed@59a2.org>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28 07:59:30 -07:00
Felipe Contreras
93ae203495 remote-hg: switch from revisions to SHA-1 noteids
Otherwise we won't know if revisions are replaced.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28 07:59:29 -07:00
Felipe Contreras
c43c06b186 remote-hg: add version checks to the marks
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28 07:59:29 -07:00
Felipe Contreras
e936a5d484 remote-hg: improve node traversing
We won't be able to count the unmarked commits, but we are not going to
be able to do that anyway when we switch to SHA-1 ids.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28 07:59:29 -07:00
Felipe Contreras
52036431ff remote-hg: shuffle some code
In preparation to shift to SHA-1's.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28 07:59:20 -07:00
Felipe Contreras
6796d49ed0 remote-hg: use a shared repository store
This way we don't have to have duplicated Mercurial objects.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28 07:59:20 -07:00
Felipe Contreras
cab3829d2b remote-hg: load all extensions
The user might have then configured differently, plus, all of them will
be loaded anyway later on.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28 07:59:19 -07:00
Felipe Contreras
f6f00b46ae remote-hg: test: simplify previous branch checkout
@{-1} does the same thing.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28 07:59:19 -07:00
Felipe Contreras
5f5e92fb79 remote-helpers: test: simplify remote URLs
No need to specify $PWD any more.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28 07:59:19 -07:00
Felipe Contreras
531594e5aa remote-helpers: tests: general improvements
So that we don't need a temporary directory.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28 07:59:19 -07:00
Felipe Contreras
dde67d794c remote-helpers: test: cleanup style
So it's more standardized between all the tests.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28 07:59:19 -07:00
Felipe Contreras
4080ac81e5 remote-helpers: test: cleanup white-spaces
We prefer tabs to spaces.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28 07:59:19 -07:00
Felipe Contreras
294ff7b233 remote-hg: trivial reorganization
We only need to get the remote dict once.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28 07:59:18 -07:00
Felipe Contreras
cf08a7e15f remote-hg: test: be a little more quiet
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-28 07:59:18 -07:00
Felipe Contreras
0c27c12d21 remote-hg: tests: fix hg merge
Let's specify a merge tool, otherwise mercurial might open one and hang
our tests waiting for user input.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-21 11:59:48 -07:00
Felipe Contreras
02a607260f remote-helpers: tests: use python directly
These remote helpers use 'env python', not PYTHON_PATH, so that's where
we should check for the extensions. Otherwise, if 'python' is not
PYTHON_PATH (e.g. /usr/bin/python: Makefile's default), there will be a
mismatch between the python libraries actually accessible to the remote
helpers.

Suggested by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-21 11:59:44 -07:00
Felipe Contreras
5e49f30c85 remote-hg: fix order of configuration comments
The other configurations were added in the wrong place.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-21 09:33:24 -07:00
Felipe Contreras
92c4369907 remote-hg: trivial configuration note cleanup
Follow the style of the previous configurations.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-21 09:33:21 -07:00
Felipe Contreras
737044517f completion: regression fix for zsh
zsh completion wrapper doesn't reimplement __gitcompadd(). Although it
should be trivial to do that, let's use __gitcomp_nl() which achieves
exactly the same thing, specially since the suffix ($4) has to be empty.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-21 09:28:45 -07:00
Amit Bakshi
5dbe064d8c remote-hg: set stdout to binary mode on win32
git clone hangs on windows, and file.write would return errno 22 inside
of mercurial's windows.winstdout wrapper class. This patch sets stdout's
mode to binary, fixing both issues.

[fc: cleaned up]

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-20 11:18:43 -07:00
Felipe Contreras
31eb360b43 remote-bzr: fixes for older versions of bzr
Down to v2.0, by using older but still valid interfaces.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-17 11:43:36 -07:00
Sandor Bodo-Merle
a70ae5873d remote-bzr: fix old organization destroy
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-17 10:59:08 -07:00
Felipe Contreras
629b60a77d Revert "remote-hg: update bookmarks when pulling"
This reverts commit 24317ef32ac3111ed00792f9b2921dc19dd28fe2.

Different versions of Mercurial have different arguments for
bookmarks.updatefromremote(), while it should be possible to call the
right function with the right arguments depending on the version, it's
safer to restore the old behavior for now.

Reported by Rodney Lorrimar.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-16 15:54:18 -07:00
Felipe Contreras
4f4e7e9b62 remote-bzr: fix cloning of non-listable repos
Commit 95b0c60 (remote-bzr: add support for bzr repos) introduced a
regression by assuming all bzr remote repos are listable, but they are
not.

If they are not listable they are basically useless, so let's assume
there is no bzr repo.

Reported-by: Thorsten Kranzkowski <dl8bcu@dl8bcu.de>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-16 09:29:26 -07:00
Junio C Hamano
0c2b1cf812 Merge branch 'fc/remote-hg' (early part)
* 'fc/remote-hg' (early part):
  remote-hg: update bookmarks when pulling
  remote-hg: don't push fake 'master' bookmark
  remote-hg: disable forced push by default
  remote-hg: fix new branch creation
  remote-hg: add new get_config_bool() helper
  remote-hg: enable track-branches in hg-git mode
  remote-hg: get rid of unused exception checks
  remote-hg: trivial cleanups
2013-05-15 14:58:56 -07:00
Felipe Contreras
24317ef32a remote-hg: update bookmarks when pulling
Otherwise, the user would never ever see new bookmarks, only the
ones that (s)he initially cloned.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-15 12:41:13 -07:00
Felipe Contreras
9ed920a680 remote-hg: don't push fake 'master' bookmark
We skip it locally, but not for the remote, so let's do so.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-15 12:40:59 -07:00
Felipe Contreras
06f4213355 remote-hg: disable forced push by default
In certain situations we might end up pushing garbage revisions
(e.g. in a rebase), and the patches to deal with that haven't been
merged yet.  So let's disable forced pushes by default.

We are essentially reverting back to the old v1.8.2 behavior, to
minimize the possibility of regressions, but in a way the user can
configure.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-15 12:40:16 -07:00
Felipe Contreras
637333673a remote-hg: fix new branch creation
When a user creates a new branch with git:

 % git checkout -b branches/devel

and then pushes this branch

 % git push origin branches/devel

which is the way to push new mercurial branches, we do want to
create a branch, but the command would fail without newbranch=True.

This only matters when force_push=False, but setting newbranch=True
unconditionally does not hurt.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-15 12:35:51 -07:00
Felipe Contreras
760ee1c70a remote-hg: add new get_config_bool() helper
No functional changes.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-15 12:33:39 -07:00
Felipe Contreras
679e87c02b remote-hg: enable track-branches in hg-git mode
The user can turn this off.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-15 12:33:15 -07:00
Felipe Contreras
557399e9bd remote-hg: get rid of unused exception checks
Remove try/except check because we are no longer calling
check_output(), which may throw an exception.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-15 12:31:54 -07:00
Felipe Contreras
eb7976e7dd remote-hg: trivial cleanups
Drop unused "global", and remove redundant comparison of two files.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-15 12:30:36 -07:00
Felipe Contreras
6a3ac18ba3 remote-bzr: update old organization
If a clone exists with the old organization (v1.8.2) it will prevent
the new shared bzr repository organization from working, so let's
remove this repository, which is not used any more.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-14 15:51:00 -07:00
Torsten Bögershausen
8d97506e4b test-bzr: do not use unportable sed '\+'
Using sed -e '/[0-9]\+//' to find "one or more digits" is not
portable.

Use the Basic Regular Expression '/[0-9][0-9]*//' instead.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-11 12:51:19 -07:00
Paul Walmsley
a7b102302a git-svn: added an --include-path flag
The SVN::Fetcher module is now able to filter for inclusion as well
as exclusion (as used by --ignore-path). Also added tests, documentation
changes and git completion script.

If you have an SVN repository with many top level directories and you
only want a git-svn clone of some of them then using --ignore-path is
difficult as it requires a very long regexp. In this case it's much
easier to filter for inclusion.

[ew: remove trailing whitespace]

Signed-off-by: Paul Walmsley <pjwhams@gmail.com>
Signed-off-by: Eric Wong <normalperson@yhbt.net>
2013-05-09 01:13:36 +00:00
Felipe Contreras
0df860383e remote-helpers: trivial cleanup
The comment was copied from hg-fast-export, not used anymore.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-07 22:42:20 -07:00
Felipe Contreras
435f39a3e8 remote-bzr: fix for disappeared revisions
It's possible that the previous tip goes away, we should not assume it's
always present. Fortunately we are only using it to calculate the
progress to display to the user, so only that needs to be fixed.

Also, add a test that triggers this issue.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-07 22:38:40 -07:00
Junio C Hamano
bba5367183 Merge branch 'fc/remote-bzr'
* fc/remote-bzr:
  remote-bzr: avoid bad refs
  remote-bzr: convert all unicode keys to str
  remote-bzr: access branches only when needed
  remote-bzr: delay peer branch usage
  remote-bzr: iterate revisions properly
  remote-bzr: improve progress reporting
  remote-bzr: add option to specify branches
  remote-bzr: add custom method to find branches
  remote-bzr: improve author sanitazion
  remote-bzr: add support for shared repo
  remote-bzr: fix branch names
  remote-bzr: add support for bzr repos
  remote-bzr: use branch variable when appropriate
  remote-bzr: fix partially pushed merge
  remote-bzr: fixes for branch diverge
  remote-bzr: add support to push merges
  remote-bzr: always try to update the worktree
  remote-bzr: fix order of locking in CustomTree
  remote-bzr: delay blob fetching until the very end
  remote-bzr: cleanup CustomTree
2013-05-06 22:16:26 -07:00
Felipe Contreras
4c00819910 remote-bzr: avoid bad refs
Versions of fast-export before v1.8.2 throws a bad 'reset' commands
because of a behavior in transport-helper that is not even needed.
We should ignore them, otherwise we will treat them as branches and
fail.

This was fixed in v1.8.2, but some people use this script in older
versions of git.

Also, check if the ref was a tag, and skip it for now.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-06 18:19:55 -07:00
Felipe Contreras
081811216e remote-bzr: convert all unicode keys to str
Otherwise some versions of bazaar might barf.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-06 09:18:52 -07:00
Junio C Hamano
1c937682c2 Sync with maint
* maint:
  completion: zsh: don't override suffix on _detault
  Documentation/git-commit: Typo under --edit
2013-05-03 15:17:38 -07:00
Felipe Contreras
6606a69f45 completion: zsh: don't override suffix on _detault
zsh is smart enough to add the right suffix while completing, there's no
point in trying to do the same as bash.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-03 15:10:05 -07:00
Junio C Hamano
b9347eb224 Merge branch 'zk/prompt-rebase-step'
* zk/prompt-rebase-step:
  bash-prompt.sh: show where rebase is at when stopped
2013-05-01 15:23:57 -07:00
Felipe Contreras
d421c02b41 remote-bzr: access branches only when needed
Bazaar doesn't seem to be tested for multiple usage of branches, so
resources seem to be leaked all over. Let's try to minimize this by
accessing the Branch objects only when needed.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-30 22:06:47 -07:00
Felipe Contreras
747c9a377f remote-bzr: delay peer branch usage
So it doesn't time out.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-30 22:06:47 -07:00
Felipe Contreras
38cecbdf52 remote-bzr: iterate revisions properly
This way we don't need to store the list of all the revisions, which
doesn't seem to be very memory efficient with bazaar's design, for
whatever reason.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-30 22:06:47 -07:00
Felipe Contreras
a397699950 remote-bzr: improve progress reporting
No need to manually count the revisions, and also, this would help to
iterate more properly.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-30 22:06:47 -07:00