All of lore.kernel.org
 help / color / mirror / Atom feed
* When a file was locked by some program, git will work stupidly
@ 2015-11-02  4:56 dayong xie
  2015-11-02 14:33 ` Randall S. Becker
  2015-11-02 14:41 ` Mr Guillaume Seren
  0 siblings, 2 replies; 5+ messages in thread
From: dayong xie @ 2015-11-02  4:56 UTC (permalink / raw)
  To: git

To be specific
In my Unity project, there is a native plugin,  and plugin's extension
is .dll, and this plugin is
under git version control, when Unity is running, the plugin file will
be locked.
If i merge another branch, which contains modification of the plugin,
git will report error, looks
like:
error: unable to unlink old 'xxxxxxx/xxx.dll' (Permission denied)
This is not bad, however, the unfinished merge action will not revert
by git, a lot of changes
produced in repository.
usually it makes me crazy, even worse, some of my partners are not
good at using git.
Of course, this problem can be avoided by quit Unity, but not every
time we can remember. In
my opinion, git should revert the unfinished action when the error
occurred, not just stop.

-- 
--------------------------------------------------------------
Best Regards,
John Xie
--------------------------------------------------------------

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: When a file was locked by some program, git will work stupidly
  2015-11-02  4:56 When a file was locked by some program, git will work stupidly dayong xie
@ 2015-11-02 14:33 ` Randall S. Becker
  2015-11-04 21:12   ` Lasse Makholm
  2015-11-02 14:41 ` Mr Guillaume Seren
  1 sibling, 1 reply; 5+ messages in thread
From: Randall S. Becker @ 2015-11-02 14:33 UTC (permalink / raw)
  To: 'dayong xie', git


On November-01-15 11:57 PM dayong xie wrote:
>To be specific
>In my Unity project, there is a native plugin,  and plugin's extension is .dll, >and this plugin is under git version control, when Unity is running, the plugin >file will be locked.
>If i merge another branch, which contains modification of the plugin, git will >report error, looks
>like:
>error: unable to unlink old 'xxxxxxx/xxx.dll' (Permission denied) This is not >bad, however, the unfinished merge action will not revert by git, a lot of >changes produced in repository.
>usually it makes me crazy, even worse, some of my partners are not good at >using git.
>Of course, this problem can be avoided by quit Unity, but not every time we can >remember. In my opinion, git should revert the unfinished action when the error >occurred, not just stop.

What version of Unity (or Unity Pro) are you using? Is this experienced with the Commit in MonoDevelop/Visual Studio or are you using a separate git client? 

I have found similar issues in some versions of Unity and MonoDevelop or Visual Studio not saving all files, especially the project files until you have fully exited - nothing to do with git, but your git commits may not contain complete images of your change.

When I use git with Unity, I either have the source committed through MonoDevelop (no issues) if my changes are source-only, or if I have assets and project changes, then I do exit completely so that I am sure Unity flushes everything to disk and I can get a single atomic commit with all the Unity and C# bits using SourceTree or gitk.

OTOH I'm not sure you really should be storing build products out of MonoDevelop or Visual Studio in your git repository. If the DLL can be rebuild automatically on the client - usual answer is yes - then let it. Handle the release build separately - at least in a separate branch that does not involve having the Unity editor open to get in the way.

In my environment, I have added *.dll (and other stuff) to .gitignore so that I do not track dll changes - they get built on demand instead. There are recommended ways of using git in the Unity forums.

Cheers,
Randall

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: When a file was locked by some program, git will work stupidly
  2015-11-02  4:56 When a file was locked by some program, git will work stupidly dayong xie
  2015-11-02 14:33 ` Randall S. Becker
@ 2015-11-02 14:41 ` Mr Guillaume Seren
  2015-11-03 11:54   ` Mr Guillaume Seren
  1 sibling, 1 reply; 5+ messages in thread
From: Mr Guillaume Seren @ 2015-11-02 14:41 UTC (permalink / raw)
  To: git

Quoting dayong xie (2015-11-02 05:56:55)
> To be specific
> In my Unity project, there is a native plugin,  and plugin's extension
> is .dll, and this plugin is
> under git version control, when Unity is running, the plugin file will
> be locked.
> If i merge another branch, which contains modification of the plugin,
> git will report error, looks
> like:
> error: unable to unlink old 'xxxxxxx/xxx.dll' (Permission denied)
> This is not bad, however, the unfinished merge action will not revert
> by git, a lot of changes
> produced in repository.
> usually it makes me crazy, even worse, some of my partners are not
> good at using git.
> Of course, this problem can be avoided by quit Unity, but not every
> time we can remember. In
> my opinion, git should revert the unfinished action when the error
> occurred, not just stop.
> 
> -- 
> --------------------------------------------------------------
> Best Regards,
> John Xie
> --------------------------------------------------------------
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


--------------------
| Mr Guillaume Seren
|
| website: http://www.guillaumeseren.com/
| github: https://github.com/GuillaumeSeren
--------------------

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: When a file was locked by some program, git will work stupidly
  2015-11-02 14:41 ` Mr Guillaume Seren
@ 2015-11-03 11:54   ` Mr Guillaume Seren
  0 siblings, 0 replies; 5+ messages in thread
From: Mr Guillaume Seren @ 2015-11-03 11:54 UTC (permalink / raw)
  To: git

Quoting Mr Guillaume Seren (2015-11-02 15:41:22)
> Quoting dayong xie (2015-11-02 05:56:55)
> > To be specific
> > In my Unity project, there is a native plugin,  and plugin's extension
> > is .dll, and this plugin is
> > under git version control, when Unity is running, the plugin file will
> > be locked.
> > If i merge another branch, which contains modification of the plugin,
> > git will report error, looks
> > like:
> > error: unable to unlink old 'xxxxxxx/xxx.dll' (Permission denied)
> > This is not bad, however, the unfinished merge action will not revert
> > by git, a lot of changes
> > produced in repository.
> > usually it makes me crazy, even worse, some of my partners are not
> > good at using git.
> > Of course, this problem can be avoided by quit Unity, but not every
> > time we can remember. In
> > my opinion, git should revert the unfinished action when the error
> > occurred, not just stop.
> > 
> > -- 
> > --------------------------------------------------------------
> > Best Regards,
> > John Xie
> > --------------------------------------------------------------
> > --
> > To unsubscribe from this list: send the line "unsubscribe git" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 
> --------------------
> | Mr Guillaume Seren
> |
> | website: http://www.guillaumeseren.com/
> | github: https://github.com/GuillaumeSeren
> --------------------


--------------------
| Mr Guillaume Seren
|
| website: http://www.guillaumeseren.com/
| github: https://github.com/GuillaumeSeren
--------------------

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: When a file was locked by some program, git will work stupidly
  2015-11-02 14:33 ` Randall S. Becker
@ 2015-11-04 21:12   ` Lasse Makholm
  0 siblings, 0 replies; 5+ messages in thread
From: Lasse Makholm @ 2015-11-04 21:12 UTC (permalink / raw)
  To: Randall S. Becker; +Cc: dayong xie, Git Mailing List

On 2 November 2015 at 15:33, Randall S. Becker <rsbecker@nexbridge.com> wrote:
>
> On November-01-15 11:57 PM dayong xie wrote:
>>To be specific
>>In my Unity project, there is a native plugin,  and plugin's extension is .dll, >and this plugin is under git version control, when Unity is running, the plugin >file will be locked.
>>If i merge another branch, which contains modification of the plugin, git will >report error, looks
>>like:
>>error: unable to unlink old 'xxxxxxx/xxx.dll' (Permission denied) This is not >bad, however, the unfinished merge action will not revert by git, a lot of >changes produced in repository.
>>usually it makes me crazy, even worse, some of my partners are not good at >using git.
>>Of course, this problem can be avoided by quit Unity, but not every time we can >remember. In my opinion, git should revert the unfinished action when the error >occurred, not just stop.
>
> What version of Unity (or Unity Pro) are you using? Is this experienced with the Commit in MonoDevelop/Visual Studio or are you using a separate git client?
>
> I have found similar issues in some versions of Unity and MonoDevelop or Visual Studio not saving all files, especially the project files until you have fully exited - nothing to do with git, but your git commits may not contain complete images of your change.
>
> When I use git with Unity, I either have the source committed through MonoDevelop (no issues) if my changes are source-only, or if I have assets and project changes, then I do exit completely so that I am sure Unity flushes everything to disk and I can get a single atomic commit with all the Unity and C# bits using SourceTree or gitk.

Ouch. That sounds broken. Do you have a case number with Unity for
this? I work at Unity (though not on the editor) and can ask around...

> OTOH I'm not sure you really should be storing build products out of MonoDevelop or Visual Studio in your git repository. If the DLL can be rebuild automatically on the client - usual answer is yes - then let it. Handle the release build separately - at least in a separate branch that does not involve having the Unity editor open to get in the way.
>
> In my environment, I have added *.dll (and other stuff) to .gitignore so that I do not track dll changes - they get built on demand instead. There are recommended ways of using git in the Unity forums.

The way I'm reading this, the plugin comes from a third party and is
not built as part of the project. I could be wrong though.

Dayong - do you have a case number with Unity for your problem?

And just to not make this not completely off-topic: I agree that git
should ideally do a proper rollback in case of a failed (as opposed to
conflicted) merge but I'm not sure what the precedent is for handling
failure cases like this.

Perhaps this is more easily solved, for now at least, by helping the
people who are not comfortable with git setup an alias as an
easier-to-remember way of saying e.g. git reset --hard HEAD ?

/Lasse

>
> Cheers,
> Randall
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-11-04 21:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-02  4:56 When a file was locked by some program, git will work stupidly dayong xie
2015-11-02 14:33 ` Randall S. Becker
2015-11-04 21:12   ` Lasse Makholm
2015-11-02 14:41 ` Mr Guillaume Seren
2015-11-03 11:54   ` Mr Guillaume Seren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.