Skip to content

Commit

Permalink
[issue5] add HGPLAIN
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickFerber committed Jul 17, 2020
1 parent 5679fa0 commit e75f58f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
9 changes: 6 additions & 3 deletions run-cleanup.sh
Expand Up @@ -34,7 +34,8 @@ source "${VIRTUALENV}/bin/activate"

# Disable all extensions.
# (https://stackoverflow.com/questions/46612210/mercurial-disable-all-the-extensions-from-the-command-line)
HGRCPATH= hg \
HGRCPATH= HGPLAIN= \
hg \

This comment has been minimized.

Copy link
@FlorianPommerening

FlorianPommerening Jul 17, 2020

Member

Seeing in how many places HGRCPATH= HGPLAIN= occurs, I think it would make sense to set it only once per script using export HGRCPATH= and export HGPLAIN= in the beginning.

This comment has been minimized.

Copy link
@FlorianPommerening

FlorianPommerening Jul 17, 2020

Member

You could also have this as part of the setup-mercurial.sh script but then you'd have to source it to work (exported variables are available in child processes but not in the calling process) and sourcing will not work with the current setup of using exit and the return code.

--config extensions.renaming_mercurial_source="${BASE}/renaming_mercurial_source.py" \
--config extensions.hgext.convert= \
--config format.sparse-revlog=0 \
Expand All @@ -46,5 +47,7 @@ HGRCPATH= hg \
--branchmap "${BASE}/data/downward_branchmap.txt"

cd "${CLEANED_REPOSITORY}"
HGRCPATH= hg --config extensions.strip= strip "branch(issue323)" --nobackup
HGRCPATH= hg --config extensions.strip= strip "branch(ipc-2011-fixes)" --nobackup
HGRCPATH= HGPLAIN= \
hg --config extensions.strip= strip "branch(issue323)" --nobackup
HGRCPATH= HGPLAIN= \
hg --config extensions.strip= strip "branch(ipc-2011-fixes)" --nobackup
3 changes: 2 additions & 1 deletion run-conversion.sh
Expand Up @@ -18,4 +18,5 @@ fi

source "${VIRTUALENV}/bin/activate"

HGRCPATH= python3 "${CONVERT}" "${INTERMEDIATE_REPOSITORY}" "${CONVERTED_REPOSITORY}" $@
HGRCPATH= HGPLAIN= \
python3 "${CONVERT}" "${INTERMEDIATE_REPOSITORY}" "${CONVERTED_REPOSITORY}" $@
9 changes: 6 additions & 3 deletions run-order.sh
Expand Up @@ -34,11 +34,14 @@ source "${VIRTUALENV}/bin/activate"

# Disable all extensions.
# (https://stackoverflow.com/questions/46612210/mercurial-disable-all-the-extensions-from-the-command-line)
HGRCPATH= hg clone "http://hg.fast-downward.org" "${ORDERED_REPOSITORY}"
HGRCPATH= HGPLAIN= \
hg clone "http://hg.fast-downward.org" "${ORDERED_REPOSITORY}"
set +e # hg incoming has an non-zero exit code if nothing is incoming
CHANGESETS="$(hg incoming -R "${SRC_REPOSITORY}" --template "{node} " --quiet "${ORDERED_REPOSITORY}")"
set -e
if [[ ! -z "${CHANGESETS}" ]]; then
HGRCPATH= hg --config extensions.strip= strip ${CHANGESETS} --nobackup -R "${ORDERED_REPOSITORY}"
HGRCPATH= HGPLAIN= \
hg --config extensions.strip= strip ${CHANGESETS} --nobackup -R "${ORDERED_REPOSITORY}"
fi
HGRCPATH= hg pull -R "${ORDERED_REPOSITORY}" "${SRC_REPOSITORY}"
HGRCPATH= HGPLAIN= \
hg pull -R "${ORDERED_REPOSITORY}" "${SRC_REPOSITORY}"

0 comments on commit e75f58f

Please sign in to comment.