summaryrefslogtreecommitdiff
path: root/contrib
AgeCommit message (Collapse)Author
2013-05-15Merge branch 'fc/remote-hg' (early part)Junio C Hamano
* '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-15remote-hg: update bookmarks when pullingFelipe Contreras
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-15remote-hg: don't push fake 'master' bookmarkFelipe Contreras
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-15remote-hg: disable forced push by defaultFelipe Contreras
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-15remote-hg: fix new branch creationFelipe Contreras
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-15remote-hg: add new get_config_bool() helperFelipe Contreras
No functional changes. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-15remote-hg: enable track-branches in hg-git modeFelipe Contreras
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-15remote-hg: get rid of unused exception checksFelipe Contreras
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-15remote-hg: trivial cleanupsFelipe Contreras
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-14remote-bzr: update old organizationFelipe Contreras
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-11test-bzr: do not use unportable sed '\+'Torsten Bögershausen
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-09git-svn: added an --include-path flagPaul Walmsley
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-08remote-helpers: trivial cleanupFelipe Contreras
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-08remote-bzr: fix for disappeared revisionsFelipe Contreras
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-07Merge branch 'fc/remote-bzr'Junio C Hamano
* 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-07remote-bzr: avoid bad refsFelipe Contreras
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-06remote-bzr: convert all unicode keys to strFelipe Contreras
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-03Sync with maintJunio C Hamano
* maint: completion: zsh: don't override suffix on _detault Documentation/git-commit: Typo under --edit
2013-05-03completion: zsh: don't override suffix on _detaultFelipe Contreras
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-01Merge branch 'zk/prompt-rebase-step'Junio C Hamano
* zk/prompt-rebase-step: bash-prompt.sh: show where rebase is at when stopped
2013-05-01remote-bzr: access branches only when neededFelipe Contreras
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-05-01remote-bzr: delay peer branch usageFelipe Contreras
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-05-01remote-bzr: iterate revisions properlyFelipe Contreras
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-05-01remote-bzr: improve progress reportingFelipe Contreras
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-05-01remote-bzr: add option to specify branchesFelipe Contreras
We might not want all the branches. And branch handling in bazaar is rather tricky, so it's safer to simply specify them. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-01remote-bzr: add custom method to find branchesFelipe Contreras
The official method is incredibly inefficient and slow. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-01remote-bzr: improve author sanitazionFelipe Contreras
So that we don't end up with '<None>', and also synchronize it with the one from remote-hg. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-01remote-bzr: add support for shared repoFelipe Contreras
This way all the remotes share the same data, so adding multiple remotes, or renaming them doesn't create extra overhead. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-01remote-bzr: fix branch namesFelipe Contreras
When branches have '/' in their name (aka. sub-branches), bazaar seems to choke while creating the new directory. Also, git cannot have both 'foo' and 'foo/bar'. So let's replace slashes with a plus sign. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-01remote-bzr: add support for bzr reposFelipe Contreras
In bazaar, a repository can contain multiple branches, and previously we were supporting only one branch at a time. Now we fetch them all. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-01remote-bzr: use branch variable when appropriateFelipe Contreras
There should be no functional changes. Basically we want to reserve the 'repo' variable. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-01remote-bzr: fix partially pushed mergeFelipe Contreras
If part of the merge was already pushed, we don't have the blob_marks available, however, the commits are already stored in bazaar, so we can use the revision_tree to fetch the contents. We want to do this only when there's no other option. There's no easy way to test this. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-01remote-bzr: fixes for branch divergeFelipe Contreras
If the branches diverge we want to reset the pointer to where the remote actually is. Since we can access remote branches just as easily as local ones, let's do so. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-01remote-bzr: add support to push mergesFelipe Contreras
In order to do that, we need to store the marks of every file, so that they can be fetched when needed. Unfortunately we can't tell bazaar that nothing changed, we need to send the data so that it can figure it out by itself. And since it will be requesting a bunch of information by the file_id, it's better to have a helper dict (rev_files), so that we can fetch it quickly. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-01remote-bzr: always try to update the worktreeFelipe Contreras
And fail properly when we can't. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-01remote-bzr: fix order of locking in CustomTreeFelipe Contreras
It doesn't seem to make any difference, but revision_tree() requires a lock. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-01remote-bzr: delay blob fetching until the very endFelipe Contreras
Might be more efficient, but the real reason to use the marks will be revealed in upcoming patches. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-05-01remote-bzr: cleanup CustomTreeFelipe Contreras
This code was not used at all. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-29git-completion.bash: add remote.pushdefault to config listRamkumar Ramachandra
224c2171 (remote.c: introduce remote.pushdefault, 2013-04-02) introduced the remote.pushdefault configuration variable, but forgot to teach git-completion.bash about it. Fix this. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-29git-completion.bash: add branch.*.pushremote to config listRamkumar Ramachandra
9f765ce (remote.c: introduce branch.<name>.pushremote, 2013-04-02) introduced the configuration variable branch.*.pushremote, but forgot to teach git-completion.bash about it. Fix this. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-29Merge branch 'maint'Junio C Hamano
* maint: complete: zsh: use zsh completion for the main cmd complete: zsh: trivial simplification git-completion.bash: complete branch.*.rebase as boolean git-completion.bash: add diff.submodule to config list git-completion.bash: lexical sorting for diff.statGraphWidth
2013-04-29Merge branch 'fc/zsh-completion' into maintJunio C Hamano
* fc/zsh-completion: complete: zsh: use zsh completion for the main cmd complete: zsh: trivial simplification
2013-04-29complete: zsh: use zsh completion for the main cmdFelipe Contreras
So that we can have a nice zsh completion output: % git <tab> add -- add file contents to the index bisect -- find by binary search the change that introduced a bug branch -- list, create, or delete branches checkout -- checkout a branch or paths to the working tree clone -- clone a repository into a new directory commit -- record changes to the repository diff -- show changes between commits, commit and working tree, etc fetch -- download objects and refs from another repository grep -- print lines matching a pattern init -- create an empty Git repository or reinitialize an existing one log -- show commit logs merge -- join two or more development histories together mv -- move or rename a file, a directory, or a symlink pull -- fetch from and merge with another repository or a local branch push -- update remote refs along with associated objects rebase -- forward-port local commits to the updated upstream head reset -- reset current HEAD to the specified state rm -- remove files from the working tree and from the index show -- show various types of objects status -- show the working tree status tag -- create, list, delete or verify a tag object signed with GPG And other niceties, like 'git --git-dir=<tab>' showing only directories. For the rest, the bash completion stuff is still used. Also, add my copyright, since this more than a thin wrapper. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-29complete: zsh: trivial simplificationFelipe Contreras
There should be no functional changes. The only reason I wrapped this code around a sub-function is because zsh did the same in it's bashcompinit script in order to declare the special variable 'words' as hidden, but only in this context. There's no need for that any more since we access __git_main directly, so 'words' is not modified, so there's no need for the sub-function. In zsh mode the array indexes are different though. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-29git-completion.bash: complete branch.*.rebase as booleanRamkumar Ramachandra
6fac1b83 (completion: add missing config variables, 2009-06-29) added "rebase" to the list of completions for "branch.*.*", but forgot to specify completions for the values that this configuration variable can take (namely "false" and "true"). Fix this. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-29git-completion.bash: add diff.submodule to config listRamkumar Ramachandra
c47ef57 (diff: introduce diff.submodule configuration variable, 2012-11-13) introduced the diff.submodule configuration variable, but forgot to teach git-completion.bash about it. Fix this. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-29git-completion.bash: lexical sorting for diff.statGraphWidthRamkumar Ramachandra
df44483a (diff --stat: add config option to limit graph width, 2012-03-01) added the option diff.startGraphWidth to the list of configuration variables in git-completion.bash, but failed to notice that the list is sorted alphabetically. Move it to its rightful place in the list. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-27completion: add missing format-patch optionsFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-26remote-bzr: strip extra newlineFelipe Contreras
It's added by fast-export, the user didn't type it. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-04-26remote-bzr: tell bazaar to be quietFelipe Contreras
Otherwise we get notification, progress bars, and what not. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>