sapling/edenscm/hgext
Durham Goode 984af7d7fe push: avoid vanilla push when pushing to svn/git
Summary:
pushrebase, infinitepush, remotenames, hgsubversion, and hggit wrap the
push command in very complicated ways. For instance, if hgsubversion push runs,
it will never call the original push command, and therefore if its wrapper gets
called first none of the other code gets executed. Unfortunately the opposite
can also be true, where the other extensions may make decisions that ultimately
prevent the hgsubversion code from running. I believe this is the cause of our
recent issue where someone pushed directly to hg from an svn backed repo.

The real fix is to clean up our mess of push commands, but for now we can
at least prevent remotenames from avoiding the hgsubversion push path entirely.

I believe this used to work more reliably before D14153207. In that diff it
changed the behavior from passing "None" as the destination (which is what was
passed in originally) to passing the actual url. The remotename code has some
logic that says "if the passed in destination is None, default, or default-push,
check if its svn/git and call orig". By passing in the actual url, this logic is
bypassed and we can head straight to the remotenames push code which may call
exchange.push and begin a vanilla push.

The easy fix is to just validate the passed in url directly if it exists and
call orig if its svn or git.

Reviewed By: quark-zju

Differential Revision: D15075782

fbshipit-source-id: 10c9c1c5669ff647a03987a2de5eaf1e3b474ce0
2019-04-25 22:06:16 -07:00
..
absorb mutation: add absorb support 2019-04-11 02:45:16 -07:00
amend commands: update help text for amend 2019-04-19 11:16:56 -07:00
commitcloud visibility: support cloud sync 2019-04-11 07:49:20 -07:00
convert subrepo: remove subrepo support 2019-03-11 10:43:55 -07:00
extlib blackbox: clean up blackbox logging and log more during rage 2019-04-23 02:48:50 -07:00
fastannotate hgext: reformat using black 2019-03-13 18:35:09 -07:00
fastmanifest manifest: drop manifestv2 support 2019-03-26 13:32:45 -07:00
fsmonitor blackbox: clean up blackbox logging and log more during rage 2019-04-23 02:48:50 -07:00
hgevents codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
hggit hggit: stop git-updatemeta walk when we finish commits with extras 2019-03-20 14:33:58 -07:00
hgsubversion codeformat - remove weird looking + for string concat on the same line 2019-03-13 11:40:26 -07:00
highlight codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
infinitepush infinitepush: fix the help text for scratch bookmark commands 2019-04-16 13:47:36 -07:00
lfs hg: fix lfs and journal extension postshare wrapping 2019-02-07 18:58:40 -08:00
memcommit memcommit: enforce target parent to be original parent 2019-03-13 11:50:42 -07:00
p4fastimport codeformat - remove weird looking + for string concat on the same line 2019-03-13 11:40:26 -07:00
perfsuite metrics: slightly change the API 2019-03-20 22:49:18 -07:00
pushrebase pushrebase: throw if prechangegroup fails 2019-04-22 17:10:15 -07:00
remotefilelog remotefilelog: properly drop packs before repacking 2019-04-25 18:53:06 -07:00
repogenerator codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
treemanifest remotefilelog: avoid double close of mutable packs 2019-04-22 10:15:42 -07:00
__init__.py codemod: move Python packages to edenscm 2019-01-28 18:35:41 -08:00
arcdiff.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
automv.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
blackbox.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
catnotate.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
checkmessagehook.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
chistedit.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
churn.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
cleanobsstore.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
clienttelemetry.py blackbox: clean up blackbox logging and log more during rage 2019-04-23 02:48:50 -07:00
clindex.pyx blackbox: clean up blackbox logging and log more during rage 2019-04-23 02:48:50 -07:00
clonebundles.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
commitextras.py test-revset: do not use "hg branch" directly 2019-02-14 17:44:39 -08:00
conflictinfo.py hgext: reformat using black 2019-03-13 18:35:09 -07:00
copytrace.py copytrace: fix an issue where undesirable entries are reported 2019-02-25 12:43:20 -08:00
crdump.py hgext: reformat using black 2019-03-13 18:35:09 -07:00
debugcommitmessage.py subrepo: remove subrepo support 2019-03-11 10:43:55 -07:00
debugshell.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
dialect.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
directaccess.py branchmap: drop revbranchcache and other unused logic 2019-02-22 21:02:41 -08:00
dirsync.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
disablesymlinks.py disablesymlinks: add extension to disable symlinks 2019-02-06 08:41:34 -08:00
drop.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
edrecord.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
eol.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
errorredirect.py blackbox: clean up blackbox logging and log more during rage 2019-04-23 02:48:50 -07:00
extdiff.py subrepo: remove subrepo support 2019-03-11 10:43:55 -07:00
extorder.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
extutil.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
fastlog.py fastlog: patch follow revset instead 2019-04-16 22:19:19 -07:00
fbconduit.py fbconduit: fix resolving phabricator callsign for WWW 2019-03-13 18:35:09 -07:00
fbhistedit.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
fixcorrupt.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
generic_bisect.py codemod: move Python packages to edenscm 2019-01-28 18:35:41 -08:00
githelp.py codeformat - remove weird looking + for string concat on the same line 2019-03-13 11:40:26 -07:00
gitlookup.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
gitrevset.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
globalrevs.py globalrevs: fail quickly for invalid searches during globalrev fast lookup 2019-04-02 11:23:19 -07:00
gpg.py hgext: reformat using black 2019-03-13 18:35:09 -07:00
grepdiff.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
grpcheck.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
hgsql.py hgsql: use fetchall method in committodb 2019-04-13 03:20:27 -07:00
hiddenerror.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
histedit.py histedit: fix call to hex in loginfo 2019-04-12 01:57:56 -07:00
infinitepushbackup.py infinitepushbackup: exclude hidden commits from backup heads 2019-04-11 02:45:15 -07:00
interactiveui.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
journal.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
linkrevcache.py hgext: reformat using black 2019-03-13 18:35:09 -07:00
logginghelper.py logginghelper: log normalized repo name 2019-03-04 00:05:00 -08:00
lz4revlog.py rust: move bindings to a single python extension 2019-02-01 17:53:22 -08:00
mergedriver.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
morecolors.py blackbox: clean up blackbox logging and log more during rage 2019-04-23 02:48:50 -07:00
morestatus.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
myparent.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
nointerrupt.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
ownercheck.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
patchrmdir.pyx codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
phabdiff.py Safer parsing of referenced tasknumber 2019-04-24 19:25:11 -07:00
phabstatus.py hgext: reformat using black 2019-03-13 18:35:09 -07:00
phrevset.py phrevset: avoid crashing on null graphql reply 2019-04-09 07:53:43 -07:00
progressfile.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
pullcreatemarkers.py visibility: pullcreatemarkers should exclude hidden commits 2019-04-11 07:49:21 -07:00
purge.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
rage.py blackbox: clean up blackbox logging and log more during rage 2019-04-23 02:48:50 -07:00
rebase.py blackbox: clean up blackbox logging and log more during rage 2019-04-23 02:48:50 -07:00
remotenames.py push: avoid vanilla push when pushing to svn/git 2019-04-25 22:06:16 -07:00
reset.py visibility: update visibility when commits are modified 2019-03-08 03:05:58 -08:00
sampling.py sampling: silence BaseException.message deprecation warning 2019-04-22 17:58:07 -07:00
schemes.py hgext: reformat using black 2019-03-13 18:35:09 -07:00
sendunbundlereplay.py mononoke: preserve more output from hg side in the sync job 2019-04-10 18:05:37 -07:00
share.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
shelve.py shelve: add shelvename template keyword 2019-04-15 05:44:49 -07:00
sigtrace.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
simplecache.py simplecache: add checksum to simplecache values 2019-02-20 13:56:33 -08:00
smartlog.py smartlog: move ancestor calcuation to smartlog revset 2019-03-21 17:33:45 -07:00
sparse.py blackbox: clean up blackbox logging and log more during rage 2019-04-23 02:48:50 -07:00
sshaskpass.py sshaskpass: workaround sys.executable 2019-02-26 18:19:43 -08:00
stablerev.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
stat.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
traceprof.pyx codemod: move Python packages to edenscm 2019-01-28 18:35:41 -08:00
tweakdefaults.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
undo.py visibility: add undo support 2019-03-27 04:49:14 -07:00
whereami.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
win32mbcs.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00
win32text.py codemod: import from the edenscm package 2019-01-29 17:25:32 -08:00