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

2011-03-25 Thread Hillel (Sabba) Markowitz
 So it's hard to say. I would first step away from the upci alias for
 a bit, and use the manual update-ref + dcommit commands again, just to
 be sure that there's not a bug in the alias.

 Do this:

 git update-ref refs/remotes/[branch] refs/remotes/origin/[branch]

 ... followed by git svn dcommit.

DUH I found a typo in the upci definition. I left out the s in
one of the remotes. Sorry about that. It worked when I rebuilt and ran
by hand.

I do get ambiguous remote warnings when I do a pull.

--
       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-25 Thread Thomas Ferris Nicolaisen
OK, glad it worked. What kind of warnings are you getting?

On Fri, Mar 25, 2011 at 6:40 PM, Hillel (Sabba) Markowitz
sabbahil...@gmail.com wrote:
 So it's hard to say. I would first step away from the upci alias for
 a bit, and use the manual update-ref + dcommit commands again, just to
 be sure that there's not a bug in the alias.

 Do this:

 git update-ref refs/remotes/[branch] refs/remotes/origin/[branch]

 ... followed by git svn dcommit.

 DUH I found a typo in the upci definition. I left out the s in
 one of the remotes. Sorry about that. It worked when I rebuilt and ran
 by hand.

 I do get ambiguous remote warnings when I do a pull.

 --
        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-25 Thread Hillel (Sabba) Markowitz
On Fri, Mar 25, 2011 at 3:29 PM, Thomas Ferris Nicolaisen
tfn...@gmail.comwrote:

 OK, glad it worked. What kind of warnings are you getting?


Warning: refname 'master' is ambiguous

-- 
   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-25 Thread Thomas Ferris Nicolaisen
OK, this is normal. I've always had this and it never gave me any problems.

On Fri, Mar 25, 2011 at 8:32 PM, Hillel (Sabba) Markowitz
sabbahil...@gmail.com wrote:


 On Fri, Mar 25, 2011 at 3:29 PM, Thomas Ferris Nicolaisen tfn...@gmail.com
 wrote:

 OK, glad it worked. What kind of warnings are you getting?


 Warning: refname 'master' is ambiguous

 --
        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-24 Thread Sabba Hillel


On Mar 23, 2:03 am, Thomas Ferris Nicolaisen tfn...@gmail.com wrote:
 Almost, this is how:

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

 This is 5. Set up an SVN remote in the developer's repo in this 
 guide:http://blog.tfnico.com/2010/11/git-svn-mirror-for-multiple-branches.html

git branch mybranch remotes/origin/mybranch
git co mybranch

I had created the co alias for checkout and the upci alias.

I tried this and modified a file followed by

git commit -a -m test file update
git upci

It gave me an error message unable to determine upstream SVN
information from HEAD history.

Was there a step that I missed?

-- 
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-24 Thread Thomas Ferris Nicolaisen

 git branch mybranch remotes/origin/mybranch
 git co mybranch

 I had created the co alias for checkout and the upci alias.

 I tried this and modified a file followed by

 git commit -a -m test file update
 git upci

 It gave me an error message unable to determine upstream SVN
 information from HEAD history.

 Was there a step that I missed?

One note: I usually use git co -t origin/mybranch, so it is created as
a tracking branch.

This error message is very typical. It means that git-svn doesn't
recognize which commits come from SVN.

Usually you get this if the reference in .git/refs/remotes/[branch] is
missing or wrong.

It can also occur in some other situations that I can't remember from
the top of my head.

So it's hard to say. I would first step away from the upci alias for
a bit, and use the manual update-ref + dcommit commands again, just to
be sure that there's not a bug in the alias.

Do this:

git update-ref refs/remotes/[branch] refs/remotes/origin/[branch]

... followed by git svn dcommit.

If this still doesn't work, please post back here with the following
info, so I can make a more educated guess on what's wrong:

1. The output from git config -l
2. Log of the last few (say, 5) commits in SVN branch
3. Log of the last few commits in the git repo
4. Output from git remote show origin

-- 
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-23 Thread Thomas Ferris Nicolaisen
Almost, this is how:

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

This is 5. Set up an SVN remote in the developer's repo in this guide: 
http://blog.tfnico.com/2010/11/git-svn-mirror-for-multiple-branches.html 

-- 
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-23 Thread Hillel (Sabba) Markowitz
On Wed, Mar 23, 2011 at 2:03 AM, Thomas Ferris Nicolaisen
tfn...@gmail.com wrote:
 Almost, this is how:
 git clone bare-url gitdir
 cd gitdir
 git svn init svn-url

 This is 5. Set up an SVN remote in the developer's repo in this guide:
 http://blog.tfnico.com/2010/11/git-svn-mirror-for-multiple-branches.html


When I do the full git svn clone, it creates the SHA1 files branch
name in .git/refs/remotes. I need to set up a loop to so that it can
obtain and do the update-ref command. Once I do that, then when I do
git svn rebase --all it actually builds the entire same way as if I
had built it from the start. Is there a good way of doing this?

I am trying to set it up with a python script so that the other
developers in the team can do this quickly.

-- 
       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-23 Thread Sabba Hillel


On Mar 23, 2:03 am, Thomas Ferris Nicolaisen tfn...@gmail.com wrote:
 Almost, this is how:

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

 This is 5. Set up an SVN remote in the developer's repo in this 
 guide:http://blog.tfnico.com/2010/11/git-svn-mirror-for-multiple-branches.html

When I do the full git svn clone, it creates the SHA1 files branch
name in .git/refs/remotes. I need to set up a loop to so that it can
obtain and do the update-ref command. Once I do that, then when I do
git svn rebase --all it actually builds the entire same way as if I
had built it from the start. Is there a good way of doing this?

I am trying to set it up with a python script so that the other
developers in the team can do this quickly.


Another problem is how to handle the svn externals. Currently I do it
in this way

git svn clone svn-url/name1 base-dir

git svn clone svn-url/name2 base-dir/dir1/subdir/dir2


etc.

I set this up via a python scripte that builds from the svn external
list. Is there a better way?

--
   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-23 Thread Thomas Ferris Nicolaisen
On Wed, Mar 23, 2011 at 4:41 PM, Hillel (Sabba) Markowitz
sabbahil...@gmail.com wrote:
 On Wed, Mar 23, 2011 at 2:03 AM, Thomas Ferris Nicolaisen
 tfn...@gmail.com wrote:
 Almost, this is how:
 git clone bare-url gitdir
 cd gitdir
 git svn init svn-url

 This is 5. Set up an SVN remote in the developer's repo in this guide:
 http://blog.tfnico.com/2010/11/git-svn-mirror-for-multiple-branches.html


 When I do the full git svn clone, it creates the SHA1 files branch
 name in .git/refs/remotes. I need to set up a loop to so that it can
 obtain and do the update-ref command. Once I do that, then when I do
 git svn rebase --all it actually builds the entire same way as if I
 had built it from the start. Is there a good way of doing this?

 I am trying to set it up with a python script so that the other
 developers in the team can do this quickly.

I assume now, that you are trying to do a setup equal to the one I've
written about in my blog-post. If not, I've misunderstood (and my
instructions will be misleading, most likely).

The idea in said blog-post is that the developers won't have to do git
svn rebase --all.

They can just do pull --rebase from the bare repository, which is
automatically synced with svn by the fetching repository.

-- 
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-23 Thread Thomas Ferris Nicolaisen
No, I haven't heard of any git-svn dealings with svn:externals. That would 
be beyond my expectations of what git-svn is made to deal with. 

There are some Google 
resultshttp://www.google.com/search?q=git+svn+externalsabout it though. Maybe 
you find something there?

-- 
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 Hillel (Sabba) Markowitz
On Tue, Mar 22, 2011 at 1:25 PM, Thomas Ferris Nicolaisen
tfn...@gmail.com wrote:

 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.

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).

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

--
       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
 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.