[git-users] Running a dcommit for all branches

2011-03-22 Thread Sabba Hillel
I currently have a bare repo to be used by a development team for
maintaining a project with git. I have a fetch repo which was
created using git-svn.

The fetch repo gets the updated information from the central svn
repository using

git svn --all
git push origin --mirror

This lets me pick up all branches so that the development team can set
up and use all svn branches. The trunk is tracked by master.

I would want to be able to dcommit all branches as well.

Currently I have the upci alias from blog.tfnico.com that uses awk to
determine the current branch, does an update-ref on that branch (with
the correct remote) and then does a dcommit. This does the dcommit on
the single branch that the fetch server is set to.

How could I do the pull on all branches followed by a dcommit on those
branches that had been changed. The bare repository is defined as
origin. Would I need to do this by hand or not?

--
   Sabba -  סבא הלל- Hillel
Hillel (Sabba) Markowitz | Said the fox to the fish, Join me ashore
 sabbahil...@gmail.com | The fish are the Jews, Torah is our water
http://sabbahillel.blogspot.com

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] Re: Running a dcommit for all branches

2011-03-22 Thread Sabba Hillel
There is a typo below:

On Mar 22, 1:14 pm, Sabba Hillel sabbahil...@gmail.com wrote:
 I currently have a bare repo to be used by a development team for
 maintaining a project with git. I have a fetch repo which was
 created using git-svn.

 The fetch repo gets the updated information from the central svn
 repository using

 git svn --all - typo here

git svn rebase --all
 git push origin --mirror

 This lets me pick up all branches so that the development team can set
 up and use all svn branches. The trunk is tracked by master.

 I would want to be able to dcommit all branches as well.

 Currently I have the upci alias from blog.tfnico.com that uses awk to
 determine the current branch, does an update-ref on that branch (with
 the correct remote) and then does a dcommit. This does the dcommit on
 the single branch that the fetch server is set to.

 How could I do the pull on all branches followed by a dcommit on those
 branches that had been changed. The bare repository is defined as
 origin. Would I need to do this by hand or not?


--
       Sabba     -          סבא הלל        -     Hillel
Hillel (Sabba) Markowitz | Said the fox to the fish, Join me ashore
 sabbahil...@gmail.com | The fish are the Jews, Torah is our water
http://sabbahillel.blogspot.com

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] Re: Running a dcommit for all branches

2011-03-22 Thread Thomas Ferris Nicolaisen
Just to be clear, the upci alias is explained 
here: http://blog.tfnico.com/2010/11/git-svn-mirror-for-multiple-branches.html

It's defined as:

upci = !git update-ref refs/remotes/$(git branch | grep '^*' | awk '{print 
$2}') refs/remotes/origin/$(git branch|grep '^*'|awk '{print $2}')  git 
svn dcommit

The above does update-ref and dcommit on the current branch. 

If you want to dcommit on another branch, you have to check it out first:
 git upci
 git co b_another_branch
 git commit changes
 git upci

If I understand you correctly, you want to automatically do an upci with 
each change in each branch.

I don't know how to achieve this. git svn uses the work-dir to operate, so I 
think you have to have the branch you want to dcommit actually checked out.

Perhaps a possible workaround would be to have a fetching repository for 
each branch you wish to keep in sync? This obviously doesn't scale well, but 
for less than a handful branches it could work.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] Re: Running a dcommit for all branches

2011-03-22 Thread Thomas Ferris Nicolaisen
 Thanks. Unfortunately I do have a lot of branches. Actually, the fetch
 does pick up all branches and sends them to the bare repository so
 that every fetch updates every branch. So far it is only the dcommit
 that is giving the problem. I am trying to avoid having to get
 everyone use a git svn clone from the original svn repository rather
 than a git clone from a git repository. So far, the only way to do
 this is to only dcommit to the trunk (or master).

How about having people..

* cloning the bare repository (so they don't have to wait for the very
long git svn clone process)
* doing a git svn init -s svn_url (like it is configured in the fetching repo)
* dcommit to svn themselves with upci.

 I would also have to set up automatic scripts to dcommit when everyone
 commits as well.

I think it's best that people themselves are responsible for running
dcommit/upci. Automating committing to svn like this can be a bit
dangerous.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] Re: Running a dcommit for all branches

2011-03-22 Thread Hillel (Sabba) Markowitz
On Tue, Mar 22, 2011 at 1:36 PM, Thomas Ferris Nicolaisen
tfn...@gmail.com wrote:
 Thanks. Unfortunately I do have a lot of branches. Actually, the fetch
 does pick up all branches and sends them to the bare repository so
 that every fetch updates every branch. So far it is only the dcommit
 that is giving the problem. I am trying to avoid having to get
 everyone use a git svn clone from the original svn repository rather
 than a git clone from a git repository. So far, the only way to do
 this is to only dcommit to the trunk (or master).

 How about having people..

 * cloning the bare repository (so they don't have to wait for the very
 long git svn clone process)
 * doing a git svn init -s svn_url (like it is configured in the fetching repo)
 * dcommit to svn themselves with upci.

 I would also have to set up automatic scripts to dcommit when everyone
 commits as well.

 I think it's best that people themselves are responsible for running
 dcommit/upci. Automating committing to svn like this can be a bit
 dangerous.

I don't quite follow what you mean here.

git svn init -s svn_url svn_dir

just sets up an empty situation. To get the bare repository,
wouldn't I have to have the git svn be fully cloned?

-- 
       Sabba     -          סבא הלל        -     Hillel
Hillel (Sabba) Markowitz | Said the fox to the fish, Join me ashore
 sabbahil...@gmail.com | The fish are the Jews, Torah is our water
http://sabbahillel.blogspot.com

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] Re: Running a dcommit for all branches

2011-03-22 Thread Thomas Ferris Nicolaisen
The trick is to first clone the bare repository, and then do a git svn init 
inside it, so it can be used for dcommitting.

There are two ways to set up a repository that you can dcommit from:

1) git svn clone (takes ages with big repositories)
2) git clone existing repository, and then do git svn init inside of it.

I assume you have done git svn clone once to create the fetching repo. You 
pushed all content to the bare repo.

Now, developers can clone the bare repo, do git svn init inside of it, and 
then they can dcommit from there, instead of having to do their own git svn 
clone.

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.



[git-users] Re: Running a dcommit for all branches

2011-03-22 Thread Hillel (Sabba) Markowitz
On Tue, Mar 22, 2011 at 6:38 PM, Thomas Ferris Nicolaisen
tfn...@gmail.comwrote:

 The trick is to first clone the bare repository, and then do a git svn init
 inside it, so it can be used for dcommitting.

 There are two ways to set up a repository that you can dcommit from:

 1) git svn clone (takes ages with big repositories)
 2) git clone existing repository, and then do git svn init inside of it.

 I assume you have done git svn clone once to create the fetching repo. You
 pushed all content to the bare repo.

 Now, developers can clone the bare repo, do git svn init inside of it, and
 then they can dcommit from there, instead of having to do their own git svn
 clone.


I am not sure what you mean

Is it

git clone bare-url gitdir
git svn init svn-url gitdir

Would this set up the local repo?


-- 
   Sabba -  סבא הלל- Hillel
Hillel (Sabba) Markowitz | Said the fox to the fish, Join me ashore
 sabbahil...@gmail.com | The fish are the Jews, Torah is our water
http://sabbahillel.blogspot.com

-- 
You received this message because you are subscribed to the Google Groups Git 
for human beings group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.