[MacPorts] #27485: make "port sync" git - aware
MacPorts
noreply at macports.org
Sat Aug 10 11:18:04 PDT 2013
#27485: make "port sync" git - aware
--------------------------+---------------------------------------------
Reporter: andy@… | Owner: macports-tickets@…
Type: enhancement | Status: new
Priority: Normal | Milestone:
Component: base | Version: 1.9.2
Resolution: | Keywords: git, subversion, sync, haspatch
Port: |
--------------------------+---------------------------------------------
Comment (by jeremyhu@…):
Some (trivial) changes in base cause this to fail to merge now. I'm
considering this version:
{{{
Index: macports.tcl
===================================================================
--- macports.tcl (revision 109219)
+++ macports.tcl (working copy)
@@ -2233,8 +2233,14 @@
incr numfailed
continue
}
- } elseif {$git_cmd ne {} && [file exists
${portdir}/.git]} {
- set git_commandline "pushd $portdir ; $git_cmd pull
--rebase ; popd"
+ } elseif {$git_cmd ne {} && ![catch {exec sh -c "cd
${portdir} && $git_cmd rev-parse --is-inside-work-tree"} result]} {
+ # determine what type of git repository this is
+ if {![catch {exec sh -c "cd ${portdir} && $git_cmd
config --local --get svn-remote.svn.url"} result]} {
+ set git_action "svn rebase"
+ } else {
+ set git_action "pull --rebase"
+ }
+ set git_commandline "cd ${portdir} && $git_cmd
$git_action"
ui_debug $git_commandline
if {
[catch {
}}}
--
Ticket URL: <https://trac.macports.org/ticket/27485#comment:9>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list