tests/test-default-push.t
branchstable
changeset 27909 3203dfe341f9
parent 27570 44f717c87903
child 29413 31d3ab7985b8
--- a/tests/test-default-push.t	Wed Jan 06 11:01:55 2016 -0800
+++ b/tests/test-default-push.t	Sun Jan 17 21:40:21 2016 -0600
@@ -77,3 +77,32 @@
   $ hg --cwd b push doesnotexist
   abort: repository doesnotexist does not exist!
   [255]
+
+:pushurl is used when defined
+
+  $ hg -q clone a pushurlsource
+  $ hg -q clone a pushurldest
+  $ cd pushurlsource
+
+Windows needs a leading slash to make a URL that passes all of the checks
+  $ WD=`pwd`
+#if windows
+  $ WD="/$WD"
+#endif
+  $ cat > .hg/hgrc << EOF
+  > [paths]
+  > default = https://example.com/not/relevant
+  > default:pushurl = file://$WD/../pushurldest
+  > EOF
+
+  $ touch pushurl
+  $ hg -q commit -A -m 'add pushurl'
+  $ hg push
+  pushing to file:/*/$TESTTMP/pushurlsource/../pushurldest (glob)
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files
+
+  $ cd ..