jira-importer commented on issue #629:
URL: https://github.com/apache/maven-scm/issues/629#issuecomment-2964607849

   **[Alison 
Winters](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=alisonatwork)**
 commented
   
   I think Torsten is on the right track here.  If you svn update the directory 
before tagging it will work by using the current directory (".").  To protect 
against the scenario where someone else might have updated trunk in between i 
think we could look at the following fix (sorry for pseudo code, i'm not 
familiar enough with the Maven internals to provide a real patch).
   
   ```
   boolean forceUpdate = getForceUpdateArgument();
   int revision = getHeadRevision();
   if (!forceUpdate && hasChanges(revision)) {
     println("Head revision has the following changes, do you wish to update?");
     printChanges(revision);
     if (!yesNo()) {
       return;
     }
   }
   update(revision);
   doTag(".");
   ```
   
   There is still a tiny race condition where someone checks something into 
head in between when you get the latest revision number and when you hit "yes" 
in non-force-update mode, but if that fails then it's no worse than the 
situation right now.  This will at least fix the case for most of us who have 
segmented trees where it is very unlikely we will be tagging something from a 
branch that anyone else is simultaneously editing.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to