[llvm-commits] [llvm] r173472 - /llvm/trunk/docs/GettingStarted.rst

Michael Gottesman mgottesman at apple.com
Fri Jan 25 11:31:10 PST 2013


Author: mgottesman
Date: Fri Jan 25 13:31:09 2013
New Revision: 173472

URL: http://llvm.org/viewvc/llvm-project?rev=173472&view=rev
Log:
Added new section to the git-svn getting started section that provides a
custom git script called git-svnup which handles all of the work of
using the git-mirrors/keeping the git-svn numbers in sync.

Modified:
    llvm/trunk/docs/GettingStarted.rst

Modified: llvm/trunk/docs/GettingStarted.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/GettingStarted.rst?rev=173472&r1=173471&r2=173472&view=diff
==============================================================================
--- llvm/trunk/docs/GettingStarted.rst (original)
+++ llvm/trunk/docs/GettingStarted.rst Fri Jan 25 13:31:09 2013
@@ -639,6 +639,34 @@
 ``checkout`` each working branch individually and ``rebase`` it on top of its
 parent branch.
 
+For those who wish to be able to update an llvm repo in a simpler fashion,
+consider placing the following git script in your path under the name
+``git-svnup``:
+
+.. code-block:: bash
+
+  #!/bin/bash
+
+  STATUS=$(git status -s | grep -v "??")
+
+  if [ ! -z "$STATUS" ]; then
+      STASH="yes"
+      git stash >/dev/null
+  fi
+
+  git fetch
+  old_branch=$(git rev-parse --abbrev-ref HEAD)
+  git checkout master 2> /dev/null
+  git svn rebase -l
+  git checkout $old_breanch 2> /dev/null
+
+  if [ ! -z $STASH ]; then
+      git stash pop >/dev/null
+  fi
+
+Then to perform the aforementioned update steps go into your source directory
+and just type ``git-svnup`` or ``git svnup`` and everything will just work.
+
 To commit back changes via git-svn, use ``dcommit``:
 
 .. code-block:: console





More information about the llvm-commits mailing list