aboutsummaryrefslogtreecommitdiff
path: root/contrib/remote-helpers
Commit message (Collapse)AuthorAge
* remote-hg: fix order of configuration commentsFelipe Contreras2013-05-21
| | | | | | | 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>
* remote-hg: trivial configuration note cleanupFelipe Contreras2013-05-21
| | | | | | | 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>
* remote-hg: set stdout to binary mode on win32Amit Bakshi2013-05-20
| | | | | | | | | | | 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>
* remote-bzr: fixes for older versions of bzrFelipe Contreras2013-05-17
| | | | | | | 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>
* remote-bzr: fix old organization destroySandor Bodo-Merle2013-05-17
| | | | | Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Revert "remote-hg: update bookmarks when pulling"Felipe Contreras2013-05-16
| | | | | | | | | | | | | | 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>
* remote-bzr: fix cloning of non-listable reposFelipe Contreras2013-05-16
| | | | | | | | | | | | | 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>
* Merge branch 'fc/remote-hg' (early part)Junio C Hamano2013-05-15
|\ | | | | | | | | | | | | | | | | | | | | | | * '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
| * remote-hg: update bookmarks when pullingFelipe Contreras2013-05-15
| | | | | | | | | | | | | | | | 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>
| * remote-hg: don't push fake 'master' bookmarkFelipe Contreras2013-05-15
| | | | | | | | | | | | | | 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>
| * remote-hg: disable forced push by defaultFelipe Contreras2013-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * remote-hg: fix new branch creationFelipe Contreras2013-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * remote-hg: add new get_config_bool() helperFelipe Contreras2013-05-15
| | | | | | | | | | | | | | No functional changes. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * remote-hg: enable track-branches in hg-git modeFelipe Contreras2013-05-15
| | | | | | | | | | | | | | The user can turn this off. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * remote-hg: get rid of unused exception checksFelipe Contreras2013-05-15
| | | | | | | | | | | | | | | | 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>
| * remote-hg: trivial cleanupsFelipe Contreras2013-05-15
| | | | | | | | | | | | | | 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>
* | remote-bzr: update old organizationFelipe Contreras2013-05-14
| | | | | | | | | | | | | | | | | | 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>
* | test-bzr: do not use unportable sed '\+'Torsten Bögershausen2013-05-11
|/ | | | | | | | | | 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>
* 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>
* 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>
* 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>