Package com.gitblit.models

Examples of com.gitblit.models.RefLogEntry.updateRef()


          refChange = new DailyLogEntry(entry.repository, entry.date);
        } else {
          // real reflog entry
          refChange = new RefLogEntry(entry.repository, entry.date, entry.user);
        }
        refChange.updateRef(ref, entry.getChangeType(ref), entry.getOldId(ref), entry.getNewId(ref));
        refChange.addCommits(entry.getCommits(ref));
        refMap.get(ref).add(refChange);
      }
    }
View Full Code Here


          refMap.put(ref, new ArrayList<RefLogEntry>());
        }

                // construct new ref-specific log entry
                RefLogEntry refPush = new RefLogEntry(entry.repository, entry.date, entry.user);
                refPush.updateRef(ref, entry.getChangeType(ref), entry.getOldId(ref), entry.getNewId(ref));
        refPush.addCommits(entry.getCommits(ref));
        refMap.get(ref).add(refPush);
      }
    }
View Full Code Here

                              UserModel tagUser = newUserModelFrom(ref.getAuthorIdent());
                              Date tagDate = commit.getAuthorIdent().getWhen();
                              tags.put(dateStr, new DailyLogEntry(repositoryName, tagDate, tagUser));
                                }
                                RefLogEntry tagEntry = tags.get(dateStr);
                                tagEntry.updateRef(ref.getName(), ReceiveCommand.Type.CREATE);
                                RepositoryCommit rc = repoCommit.clone(ref.getName());
                                tagEntry.addCommit(rc);
                            } else if (ref.getName().startsWith(Constants.R_PULL)) {
                                // treat pull requests as special events in the log
                                if (!pulls.containsKey(dateStr)) {
View Full Code Here

                              UserModel commitUser = newUserModelFrom(ref.getAuthorIdent());
                              Date commitDate = commit.getAuthorIdent().getWhen();
                              pulls.put(dateStr, new DailyLogEntry(repositoryName, commitDate, commitUser));
                                }
                                RefLogEntry pullEntry = pulls.get(dateStr);
                                pullEntry.updateRef(ref.getName(), ReceiveCommand.Type.CREATE);
                                RepositoryCommit rc = repoCommit.clone(ref.getName());
                                pullEntry.addCommit(rc);
                            }
                        }
                    }
View Full Code Here

      }
      list.add(log);
      for (PathChangeModel change : changedRefs) {
        switch (change.changeType) {
        case DELETE:
          log.updateRef(change.path, ReceiveCommand.Type.DELETE);
          break;
        default:
          String content = JGitUtils.getStringContent(repository, push.getTree(), change.path);
          String [] fields = content.split(" ");
          String oldId = fields[1];
View Full Code Here

        default:
          String content = JGitUtils.getStringContent(repository, push.getTree(), change.path);
          String [] fields = content.split(" ");
          String oldId = fields[1];
          String newId = fields[2];
          log.updateRef(change.path, ReceiveCommand.Type.valueOf(fields[0]), oldId, newId);
          if (ObjectId.zeroId().getName().equals(newId)) {
            // ref deletion
            continue;
          }
          try {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.