Skip to contentSkip to conversation

README: Sketch out what tg rename OLD NEW would do.

PATCH In review Thomas Schwinge 2 participants 3 messages Jun 15, 2016 – Aug 13, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 README: Sketch out what tg rename OLD NEW would do.

... as proposed by me and acknowledged by David Bremner and Uwe Kleine-König on 2010-01-27 in #topgit (freenode).

---
 README |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)
README +16 -1
index 495c70b..eab6fcd 100644
@@ -486,7 +486,22 @@ tg push
 	repository.  By default the remote gets all dependencies
 	(both tgish and non-tgish) and bases pushed to.
 
-TODO: tg rename
+tg rename
+~~~~~~~~~
+	There is no such command yet, but here's a receipe what ``tg rename OLD
+	NEW'' would do:
+
+	  - Have a clean state before beginning.
+	  - git banch -r OLD NEW
+	  - git update-ref refs/top-bases/NEW refs/top-bases/OLD ''
+	  - for BRANCH in (all branches that depend on OLD,
+			   i.e. reference OLD in .topdeps); do
+	      git checkout BRANCH
+	      sed -i 's%^OLD$%NEW$' .topdeps
+	      git commit -m 'OLD -> NEW' .topdeps
+	    done
+	  - tg summary
+	  - tg update as appropriate
 
 
 IMPLEMENTATION
Signature · 1 line
1.6.0.4
#1 lore raw

Hello Thomas,

Quoted 11 lines · Thomas Schwinge

... as proposed by me and acknowledged by David Bremner and Uwe Kleine-König on 2010-01-27 in #topgit (freenode).

---
 README |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)
README +0 -0
index 495c70b..eab6fcd 100644

README tg push · line 494

Quoted 10 lines
README +6 -1
@@ -486,7 +486,22 @@ tg push
 	repository.  By default the remote gets all dependencies
 	(both tgish and non-tgish) and bases pushed to.
 
-TODO: tg rename
+tg rename
+~~~~~~~~~
+	There is no such command yet, but here's a receipe what ``tg rename OLD
+	NEW'' would do:
+
+	  - Have a clean state before beginning.

- assert NEW doesn't already exist?

README tg push · line 495

Quoted 1 line
README +1 -0
+	  - git banch -r OLD NEW

s/banch/branch/

README tg push · line 507

Quoted 12 lines
README +9 -0
+	  - git update-ref refs/top-bases/NEW refs/top-bases/OLD ''
+	  - for BRANCH in (all branches that depend on OLD,
+			   i.e. reference OLD in .topdeps); do
+	      git checkout BRANCH
+	      sed -i 's%^OLD$%NEW$' .topdeps
+	      git commit -m 'OLD -> NEW' .topdeps
+	    done
+	  - tg summary
+	  - tg update as appropriate
 
 
 IMPLEMENTATION

Otherwise looks OK

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
#2 lore raw

PATCH 1/1 README: Sketch out what tg rename OLD NEW would do.

... as proposed by me and acknowledged by David Bremner and Uwe Kleine-König on 2010-01-27 in #topgit (freenode).

---
 README |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)
README +17 -1
index 495c70b..a0c1bfa 100644
@@ -486,7 +486,23 @@ tg push
 	repository.  By default the remote gets all dependencies
 	(both tgish and non-tgish) and bases pushed to.
 
-TODO: tg rename
+tg rename
+~~~~~~~~~
+	There is no such command yet, but here's a receipe what ``tg rename OLD
+	NEW'' would do:
+
+	  - Have a clean state before beginning.
+	  - Assert NEW doesn't already exist.
+	  - git branch -m OLD NEW
+	  - git update-ref refs/top-bases/NEW refs/top-bases/OLD ''
+	  - for BRANCH in (all branches that depend on OLD,
+			   i.e. reference OLD in .topdeps); do
+	      git checkout BRANCH
+	      sed -i 's%^OLD$%NEW$' .topdeps
+	      git commit -m 'OLD -> NEW' .topdeps
+	    done
+	  - tg summary
+	  - tg update as appropriate
 
 
 IMPLEMENTATION
Signature · 1 line
tg: (341a371..) t/tg_rename (depends on: master)