Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When you merge the activity history, why the date is not used as a condition. #39

Open
hanjie0 opened this issue Mar 7, 2014 · 4 comments

Comments

@hanjie0
Copy link

hanjie0 commented Mar 7, 2014

The following function is used to check if the history is the same
def same(a, b):
return a.subject == b.subject and a.user == b.user

But I think you should add a additional condition "date".
Only the event on the same date can be created by one checkin, right?
I mean it should be
return a.subject == b.subject and a.user == b.user and a.date ==b.date

@charleso
Copy link
Owner

charleso commented Mar 7, 2014

Hi hanjie0,

Actually I think that's what I started with originally, but it would miss things. I'm not sure I would accept a patch that does exactly that, but perhaps something like:

a.subject == b.subject and a.user == b.user and (b.date - a.date) < X

(Where I'm not exactly sure what X would be)

Out of curiosity is there any particular case where both the subject and user is matching up but it shouldn't be a single commit?

@hanjie0
Copy link
Author

hanjie0 commented Mar 8, 2014

subject is the got from first part of the comments of the checkin operation. And most of time, the developers will not write the comments seriously. the simple comments will cause the same subject of a checkin/cs.

I just cannot understand why we do not just add a.date ==b.date as additional condition?
For CC, checkin operation is a atomic operation, and the date should be the same, right?

@charleso
Copy link
Owner

charleso commented Mar 8, 2014

For CC, checkin operation is a atomic operation

You're joking right? Part of the reason it's so hard to integrate with Clearcase is that everything is done at the file level - it has to checkin one at a time. Even UCM has to synthesise an atomic commit by using tags for everything.

It's been a long time, but I'm pretty sure if you look at the lshistory of a reasonably large commit you may find the files have slightly different timestamps.

Feel free to fork git-cc and make the change, it's not like this is an actively maintained project... :)

@hanjie0
Copy link
Author

hanjie0 commented Mar 10, 2014

Dear charleso, I am so sorry, I did not do the test myself, in fact, CC environment is not available for me up to now.
I mentioned/trusted "checkin operation is a atomic operation" since I got it from the CC user manual.

I will do the test and then back to you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants