Source

hg-remotebranches / tests / test-remotebranches

Augie Fackler 9550d5a 








Brendan Cully 29646ca 
Augie Fackler 9550d5a 


Augie Fackler 7e74033 
Augie Fackler 9550d5a 





Augie Fackler 0e5b007 
Augie Fackler 9550d5a 




















Augie Fackler 0e5b007 
Augie Fackler 9550d5a 






Augie Fackler d85c98f 



#!/bin/sh


echo "[extensions]" >> $HGRCPATH
echo "graphlog=" >> $HGRCPATH
echo "remotebranches=$(echo $(dirname $(dirname $0)))/hg_remotebranches.py" >> $HGRCPATH

FILTERPWD="sed s%$PWD/%%g"

mkcommit()
{
    echo $1 > $1
    hg add $1
    hg ci -m "add $1" | grep -v 'created new head'
}

hg init alpha
cd alpha
mkcommit a
mkcommit b
hg branch stable | grep -v 'permanent and global'
mkcommit c
cd ..
hg clone alpha beta | $FILTERPWD
cd beta
mkcommit d
hg co -C stable
hg merge default
hg ci -m 'merged'
cd ..

hg init gamma
cd gamma
cat > .hg/hgrc <<EOF
[paths]
default = ../alpha
alpha = ../alpha
beta = ../beta
EOF
hg pull | $FILTERPWD
hg pull beta | $FILTERPWD
hg co -C default
hg branch default | grep -v 'permanent and global'
mkcommit e
hg merge stable
hg ci -m 'merging stable'

echo
echo % graph shows tags for the branch heads of each path
hg log --graph

echo
echo % make sure bogus revisions in .hg/remotebranches do not break hg
echo deadbeefdeadbeefdeadbeefdeadbeefdeadbeef default/default > .hg/remotebranches
hg parents
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.