aboutsummaryrefslogtreecommitdiff
path: root/contrib
Commit message (Collapse)AuthorAge
* remote-helpers: trivial cleanupFelipe Contreras2013-05-07
| | | | | | | 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>
* remote-bzr: fix for disappeared revisionsFelipe Contreras2013-05-07
| | | | | | | | | | | 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>
* Merge branch 'fc/remote-bzr'Junio C Hamano2013-05-06
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * remote-bzr: avoid bad refsFelipe Contreras2013-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * remote-bzr: convert all unicode keys to strFelipe Contreras2013-05-06
| | | | | | | | | | | | | | 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>
| * remote-bzr: access branches only when neededFelipe Contreras2013-04-30
| | | | | | | | | | | | | | | | | | 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>
| * remote-bzr: delay peer branch usageFelipe Contreras2013-04-30
| | | | | | | | | | | | | | So it doesn't time out. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * remote-bzr: iterate revisions properlyFelipe Contreras2013-04-30
| | | | | | | | | | | | | | | | | | 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>
| * remote-bzr: improve progress reportingFelipe Contreras2013-04-30
| | | | | | | | | | | | | | | | 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>
| * remote-bzr: add option to specify branchesFelipe Contreras2013-04-30
| | | | | | | | | | | | | | | | 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>
| * remote-bzr: add custom method to find branchesFelipe Contreras2013-04-30
| | | | | | | | | | | | | | 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>
| * remote-bzr: improve author sanitazionFelipe Contreras2013-04-30
| | | | | | | | | | | | | | | | 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>
| * remote-bzr: add support for shared repoFelipe Contreras2013-04-30
| | | | | | | | | | | | | | | | 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>
| * remote-bzr: fix branch namesFelipe Contreras2013-04-30
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * remote-bzr: add support for bzr reposFelipe Contreras2013-04-30
| | | | | | | | | | | | | | | | 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>
| * remote-bzr: use branch variable when appropriateFelipe Contreras2013-04-30
| | | | | | | | | | | | | | | | 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>
| * remote-bzr: fix partially pushed mergeFelipe Contreras2013-04-30
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * remote-bzr: fixes for branch divergeFelipe Contreras2013-04-30
| | | | | | | | | | | | | | | | | | 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>
| * remote-bzr: add support to push mergesFelipe Contreras2013-04-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * remote-bzr: always try to update the worktreeFelipe Contreras2013-04-30
| | | | | | | | | | | | | | 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>
| * remote-bzr: fix order of locking in CustomTreeFelipe Contreras2013-04-30
| | | | | | | | | | | | | | | | 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>
| * remote-bzr: delay blob fetching until the very endFelipe Contreras2013-04-30
| | | | | | | | | | | | | | | | 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>
| * remote-bzr: cleanup CustomTreeFelipe Contreras2013-04-30
| | | | | | | | | | | | | | 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>
* | Sync with maintJunio C Hamano2013-05-03
|\ \ | | | | | | | | | | | | | | | * maint: completion: zsh: don't override suffix on _detault Documentation/git-commit: Typo under --edit
| * | completion: zsh: don't override suffix on _detaultFelipe Contreras2013-05-03
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge branch 'zk/prompt-rebase-step'Junio C Hamano2013-05-01
|\ \ \ | |_|/ |/| | | | | | | | * zk/prompt-rebase-step: bash-prompt.sh: show where rebase is at when stopped
| * | bash-prompt.sh: show where rebase is at when stoppedZoltan Klinger2013-04-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a rebase stops (e.g. interrupted by a merge conflict), it could be useful to know how far a rebase has progressed and how many commits in total this rebase will apply. Teach the __git_ps1() command to display the number of commits so far applied and the total number of commits to be applied, like this: ((3ec0a6a...)|REBASE 2/5) In the example above the rebase has stopped at the second commit due to a merge conflict and there are a total number of five commits to be applied by this rebase. This information can be already obtained from the following files which are being generated during the rebase: GIT_DIR/.git/rebase-merge/msgnum (git-rebase--merge.sh) GIT_DIR/.git/rebase-merge/end (git-rebase--merge.sh) GIT_DIR/.git/rebase-apply/next (git-am.sh) GIT_DIR/.git/rebase-apply/last (git-am.sh) but "rebase -i" does not leave necessary clues. Implement this feature by doing these three things: 1) Modify git-rebase--interactive.sh to also create GIT_DIR/.git/rebase-merge/msgnum GIT_DIR/.git/rebase-merge/end files for the number of commits so far applied and the total number of commits to be applied. 2) Modify git-prompt.sh to read and display info from the above files. 3) Update test t9903-bash-prompt.sh to reflect changes introduced by this patch. Signed-off-by: Zoltan Klinger <zoltan.klinger@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | git-completion.bash: add remote.pushdefault to config listRamkumar Ramachandra2013-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | git-completion.bash: add branch.*.pushremote to config listRamkumar Ramachandra2013-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge branch 'maint'Junio C Hamano2013-04-29
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | * 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
| * | Merge branch 'fc/zsh-completion' into maintJunio C Hamano2013-04-29
| |\ \ | | | | | | | | | | | | | | | | | | | | * fc/zsh-completion: complete: zsh: use zsh completion for the main cmd complete: zsh: trivial simplification
| | * | complete: zsh: use zsh completion for the main cmdFelipe Contreras2013-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | complete: zsh: trivial simplificationFelipe Contreras2013-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | git-completion.bash: complete branch.*.rebase as booleanRamkumar Ramachandra2013-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | git-completion.bash: add diff.submodule to config listRamkumar Ramachandra2013-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | git-completion.bash: lexical sorting for diff.statGraphWidthRamkumar Ramachandra2013-04-29
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | completion: add missing format-patch optionsFelipe Contreras2013-04-27
| | | | | | | | | | | | | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | remote-bzr: strip extra newlineFelipe Contreras2013-04-26
| | | | | | | | | | | | | | | | | | | | | 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>
* | | remote-bzr: tell bazaar to be quietFelipe Contreras2013-04-26
| | | | | | | | | | | | | | | | | | | | | 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>
* | | remote-bzr: store converted URLFelipe Contreras2013-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | Bazaar might convert the URL to something more appropriate, like an absolute path. Lets store that instead of the original URL, which won't work from a different working directory if it's relative. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | remote-hg: use hashlib instead of hg sha1 utilFelipe Contreras2013-04-26
| | | | | | | | | | | | | | | | | | | | | To be in sync with remote-bzr. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | remote-bzr: add support to push URLsFelipe Contreras2013-04-26
| | | | | | | | | | | | | | | | | | | | | Just like in remote-hg. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | remote-bzr: fix bad state issueFelipe Contreras2013-04-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Carried from remote-hg. The problem reportedly happened after doing a push that fails, the abort causes the state of remote-hg to go bad, this happens because remote-hg's marks are not stored, but 'git fast-export' marks are. Ensure that the marks are _always_ stored. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | remote-hg: remove extra checkFelipe Contreras2013-04-26
| | | | | | | | | | | | | | | | | | | | | Not needed since we use xrange ourselves. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | remote-helpers: trivial cleanupsFelipe Contreras2013-04-26
| | | | | | | | | | | | | | | | | | | | | | | | No functional changes. Typos, unused variables, redundant operations, and white-spaces. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'fc/remote-hg'Junio C Hamano2013-04-26
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fc/remote-hg: remote-hg: strip extra newline remote-hg: use marks instead of inlined files remote-hg: small performance improvement remote-hg: allow refs with spaces remote-hg: don't update bookmarks unnecessarily remote-hg: add support for schemes extension remote-hg: improve email sanitation remote-hg: add custom local tag write code remote-hg: write tags in the appropriate branch remote-hg: custom method to write tags remote-hg: add support for tag objects remote-hg: add branch_tip() helper remote-hg: properly mark branches up-to-date remote-hg: use python urlparse remote-hg: safer bookmark pushing remote-helpers: avoid has_key
| * | | remote-hg: strip extra newlineFelipe Contreras2013-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no functional change since mercurial commit operation strips that anyway, but that's no excuse for us not to do the right thing. So let's be explicit about it. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | remote-hg: use marks instead of inlined filesFelipe Contreras2013-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So that we can find already exported ones. We can never be 100% sure that we already exported such data, due to mercurial design, it at least sometimes we should detect them, and so should give us some performance boost. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | remote-hg: small performance improvementFelipe Contreras2013-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Load previous manifest first as Mercurial does; for caching reasons. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | | remote-hg: allow refs with spacesFelipe Contreras2013-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Mercurial supports them, Git doesn't. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>