How to setup branch tracking when starting local?

2012-02-07 Thread Thomas Koch
Hi,

I've written a twoline script that sets up the remote for a vcsh repo:

#!/bin/sh
VCSH_REMOTE_BASE=koch.ro:git/vcsh
vcsh $1 remote add origin $VCSH_REMOTE_BASE/$1.git

When I first run mr push I got the complaint:
  No refs in common and none specified; doing nothing.
  Perhaps you should specify a branch such as 'master'.

So I need to cd .config/vcsh/repo.d/MYREPO and do a manual git push origin 
master the first time.

What would be the appropriate git command to put in my above script to setup 
that the master branch should be pushed to origin?

Regards,

Thomas Koch, http://www.koch.ro
___
vcs-home mailing list
vcs-home@lists.madduck.net
http://lists.madduck.net/listinfo/vcs-home


Re: .mrconfig in vcsh docu should not rely on XDG_ variables set

2012-02-07 Thread Vincent Demeester
On mar., févr. 07, 2012 at 10:21:15 +0100, Thomas Koch wrote:
 Hi,
Hi,

 I've changed the include line in .mrconfig to account for the normal case 
 that 
 $XDG_CONFIG_HOME is not set:
 
 include = cat ${XDG_CONFIG_HOME:-$HOME/.config}/mr/config.d/*
This is already handled in vcsh (from RichiH at least) :

Line 10: [ -z $XDG_CONFIG_HOME ]  XDG_CONFIG_HOME=$HOME/.config

 You may want to change this in the readme file?
 
 Best regards,
Regard

 Thomas Koch, http://www.koch.ro
 ___
 vcs-home mailing list
 vcs-home@lists.madduck.net
 http://lists.madduck.net/listinfo/vcs-home
___
vcs-home mailing list
vcs-home@lists.madduck.net
http://lists.madduck.net/listinfo/vcs-home


Re: .mrconfig in vcsh docu should not rely on XDG_ variables set

2012-02-07 Thread Richard Hartmann
On Tue, Feb 7, 2012 at 12:31, Vincent Demeester vinc...@demeester.fr wrote:

 Line 10: [ -z $XDG_CONFIG_HOME ]  XDG_CONFIG_HOME=$HOME/.config

He was referring to README.md.

-- 
Richard

PS: Forgot to hit send, thus the delay in sending the latter.
___
vcs-home mailing list
vcs-home@lists.madduck.net
http://lists.madduck.net/listinfo/vcs-home


Re: How to setup branch tracking when starting local?

2012-02-07 Thread Brian May
On 7 February 2012 21:41, Thomas Koch tho...@koch.ro wrote:

 #!/bin/sh
 VCSH_REMOTE_BASE=koch.ro:git/vcsh
 vcsh $1 remote add origin $VCSH_REMOTE_BASE/$1.git

Maybe:

#!/bin/sh
VCSH_REMOTE_BASE=koch.ro:git/vcsh
vcsh run $1 remote git add origin $VCSH_REMOTE_BASE/$1.git
vcsh run $1 remote git push origin master

Note that I wouldn't personally use the shortcuts inside a script -
just in the unlikely case you ever have a repository name that
conflicts with a vcsh command.

Also note that this won't work unless there is something to push.

My script I created to add a new repository looks like (note: I use
unison to sync ~/tree between computers).

--- cut ---
#!/bin/sh
set -ex

NAME=$1

git init --bare $HOME/tree/vcsh.repos/$NAME

vcsh init $NAME
vcsh run $NAME git remote add origin ~/tree/vcsh.repos/$NAME

cat  EOF  $HOME/.config/mr/available.d/$NAME.vcsh
[\$HOME/.config/vcsh/repo.d/$NAME.git]
checkout = vcsh clone ~/tree/vcsh.repos/$NAME $NAME
EOF

ln -s ../available.d/$NAME.vcsh $HOME/.config/mr/config.d
--- cut ---

This doesn't do the initial push however, because this needs a commit
to work. At least it does make things a bit easier then doing
everything by hand.
-- 
Brian May br...@microcomaustralia.com.au
___
vcs-home mailing list
vcs-home@lists.madduck.net
http://lists.madduck.net/listinfo/vcs-home